Skip to content

Commit 2f9644e

Browse files
committed
Added inlay hints
1 parent 86fd4fd commit 2f9644e

File tree

6 files changed

+146
-12
lines changed

6 files changed

+146
-12
lines changed

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
***************************************************************************
2+
**NOTE**
3+
Please verify that the `base repository` above has the intended destination!
4+
Github by default opens Pull Requests against the parent of a forked repository.
5+
If this is your personal fork and you didn't intend to open a PR for contribution
6+
to the original project then adjust the `base repository` accordingly.
7+
**************************************************************************
8+

init.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,16 @@ vim.api.nvim_create_autocmd('TextYankPost', {
395395
pattern = '*',
396396
})
397397

398+
vim.api.nvim_create_autocmd("LspAttach", {
399+
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
400+
callback = function(args)
401+
local client = vim.lsp.get_client_by_id(args.data.client_id)
402+
if client.server_capabilities.inlayHintProvider then
403+
vim.lsp.inlay_hint.enable(args.buf, true)
404+
end
405+
-- whatever other lsp config you want
406+
end
407+
})
398408
-- [[ Configure Telescope ]]
399409
-- See `:help telescope` and `:help telescope.setup()`
400410
require('telescope').setup {

lazy-lock.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
{
22
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
3-
"LuaSnip": { "branch": "master", "commit": "825a61bad1d60d917a7962d73cf3c683f4e0407e" },
3+
"LuaSnip": { "branch": "master", "commit": "be7be2ca7f55bb881a7ffc16b2efa5af034ab06b" },
44
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
55
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
66
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
7-
"fidget.nvim": { "branch": "main", "commit": "933db4596e4bab1b09b6d48a10e21819e4cc458f" },
7+
"fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" },
88
"friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" },
9-
"fzf": { "branch": "master", "commit": "9b9ad77e1c330e70c3c3d815f1ff08fc3d82ed55" },
9+
"fzf": { "branch": "master", "commit": "f97d2754134607b24849fc4a2062dbfcaafddd6a" },
1010
"fzf.vim": { "branch": "master", "commit": "45d96c9cb1213204479593236dfabf911ff15443" },
1111
"fzfx.nvim": { "branch": "main", "commit": "be147216edf164a1739430c7fda210f9876cc430" },
12-
"gitsigns.nvim": { "branch": "main", "commit": "1389134ba94643dd3b8ce2e1bf142d1c0432a4f2" },
12+
"gitsigns.nvim": { "branch": "main", "commit": "d96ef3bbff0bdbc3916a220f5c74a04c4db033f2" },
1313
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
1414
"kanagawa": { "branch": "master", "commit": "bfa818c7bf6259152f1d89cf9fbfba3554c93695" },
1515
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
16-
"lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" },
17-
"mason-lspconfig.nvim": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" },
16+
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
17+
"mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" },
1818
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
19-
"neo-tree.nvim": { "branch": "v3.x", "commit": "16d1b194376bf1fc2acd89ccb3c29ba8315bfcea" },
19+
"neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" },
2020
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
2121
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
2222
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
2323
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
24-
"nvim-lspconfig": { "branch": "master", "commit": "96e5711040df23583591391ce49e556b8cd248d8" },
25-
"nvim-treesitter": { "branch": "master", "commit": "8f444c9fcb7f9610184a34b44e922fa30989c96f" },
26-
"nvim-treesitter-textobjects": { "branch": "master", "commit": "f5183cea0fda26126e22e789382c208e7b1120f4" },
27-
"nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" },
24+
"nvim-lspconfig": { "branch": "master", "commit": "da0b236ef3c7fdac8aec758fa88b028cd9358495" },
25+
"nvim-treesitter": { "branch": "master", "commit": "1ba86026f7d4650d98fb9d4c0f2ab409c428ae41" },
26+
"nvim-treesitter-textobjects": { "branch": "master", "commit": "6e9bb569a510bdfab6095c217a2f714af7a3d116" },
27+
"nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" },
2828
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
2929
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
3030
"telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
31-
"vim-fugitive": { "branch": "master", "commit": "c0b03f1cac242d96837326d300f42a660306fc1a" },
31+
"vim-fugitive": { "branch": "master", "commit": "dac8e5c2d85926df92672bf2afb4fc48656d96c7" },
3232
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
3333
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
3434
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },

lua/kickstart/health.lua

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
--[[
2+
--
3+
-- This file is not required for your own configuration,
4+
-- but helps people determine if their system is setup correctly.
5+
--
6+
--]]
7+
8+
local check_version = function()
9+
local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
10+
if not vim.version.cmp then
11+
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
12+
return
13+
end
14+
15+
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
16+
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
17+
else
18+
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
19+
end
20+
end
21+
22+
local check_external_reqs = function()
23+
-- Basic utils: `git`, `make`, `unzip`
24+
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
25+
local is_executable = vim.fn.executable(exe) == 1
26+
if is_executable then
27+
vim.health.ok(string.format("Found executable: '%s'", exe))
28+
else
29+
vim.health.warn(string.format("Could not find executable: '%s'", exe))
30+
end
31+
end
32+
33+
return true
34+
end
35+
36+
return {
37+
check = function()
38+
vim.health.start 'kickstart.nvim'
39+
40+
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
41+
42+
Fix only warnings for plugins and languages you intend to use.
43+
Mason will give warnings for languages that are not installed.
44+
You do not need to install, unless you want to use those languages!]]
45+
46+
local uv = vim.uv or vim.loop
47+
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
48+
49+
check_version()
50+
check_external_reqs()
51+
end,
52+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
return {
2+
{ -- Add indentation guides even on blank lines
3+
'lukas-reineke/indent-blankline.nvim',
4+
-- Enable `lukas-reineke/indent-blankline.nvim`
5+
-- See `:help ibl`
6+
main = 'ibl',
7+
opts = {},
8+
},
9+
}

lua/kickstart/plugins/lint.lua

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
return {
2+
3+
{ -- Linting
4+
'mfussenegger/nvim-lint',
5+
event = { 'BufReadPre', 'BufNewFile' },
6+
config = function()
7+
local lint = require 'lint'
8+
lint.linters_by_ft = {
9+
markdown = { 'markdownlint' },
10+
}
11+
12+
-- To allow other plugins to add linters to require('lint').linters_by_ft,
13+
-- instead set linters_by_ft like this:
14+
-- lint.linters_by_ft = lint.linters_by_ft or {}
15+
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
16+
--
17+
-- However, note that this will enable a set of default linters,
18+
-- which will cause errors unless these tools are available:
19+
-- {
20+
-- clojure = { "clj-kondo" },
21+
-- dockerfile = { "hadolint" },
22+
-- inko = { "inko" },
23+
-- janet = { "janet" },
24+
-- json = { "jsonlint" },
25+
-- markdown = { "vale" },
26+
-- rst = { "vale" },
27+
-- ruby = { "ruby" },
28+
-- terraform = { "tflint" },
29+
-- text = { "vale" }
30+
-- }
31+
--
32+
-- You can disable the default linters by setting their filetypes to nil:
33+
-- lint.linters_by_ft['clojure'] = nil
34+
-- lint.linters_by_ft['dockerfile'] = nil
35+
-- lint.linters_by_ft['inko'] = nil
36+
-- lint.linters_by_ft['janet'] = nil
37+
-- lint.linters_by_ft['json'] = nil
38+
-- lint.linters_by_ft['markdown'] = nil
39+
-- lint.linters_by_ft['rst'] = nil
40+
-- lint.linters_by_ft['ruby'] = nil
41+
-- lint.linters_by_ft['terraform'] = nil
42+
-- lint.linters_by_ft['text'] = nil
43+
44+
-- Create autocommand which carries out the actual linting
45+
-- on the specified events.
46+
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
47+
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
48+
group = lint_augroup,
49+
callback = function()
50+
require('lint').try_lint()
51+
end,
52+
})
53+
end,
54+
},
55+
}

0 commit comments

Comments
 (0)