Skip to content

Commit f2449c9

Browse files
BiboursMogzVlaDexafolkedam9000tjdevries
authored
Upstream update (#3)
* which-key v3 update (nvim-lua#1022) * which-key v3 update * remove unneeded brackets from which-key registration * fix(lazy): added error handling for bootstrap (nvim-lua#1001) * fix: add required parsers from nvim-treesitter * Fix neo-tree keymap description (nvim-lua#932) The lazy.nvim keys parameter does not need the `desc` to be inside a table in the way that vim.keymap.set() does. With this fix the keymap description will be properly shown for example in telescope keymap search * Remove redundant require (nvim-lua#959) * Make debug lazy loadable (nvim-lua#978) * Update README.md | %userprofile%\appdata\local -> %localappdata% (nvim-lua#963) - Replace `%userprofile%\AppData\Local\nvim\` and `$env:USERPROFILE\AppData\Local\nvim` to `%localappdata%\nvim` and `$env:LOCALAPPDATA\nvim respectfully` * Make conform.nvim be lazy-loadable again (nvim-lua#977) The PR that disabled lazy loading (nvim-lua#818) was to fix plugin not being loaded before write. This sets up lazy to load conform before write. * Fix comment about mini.ai example (nvim-lua#985) This example wasn't using `'` so this makes more sense * Neovim 0.10 updates (nvim-lua#936) * Neovim 0.10 updates Provide the buffer for which to enable inlay hints Co-authored-by: Matt Mirus <[email protected]> * refactor: replace vim.loop with vim.uv * Upgrade folke/neodev (sunsetting) to folke/lazydev * Update checkhealth for 0.10 release --------- Co-authored-by: Matt Mirus <[email protected]> Co-authored-by: mrr11k <[email protected]> Co-authored-by: Seb Tomasini <[email protected]> * Update lazydev config to fix "Undefined field `fs_stat`" LSP error (nvim-lua#1040) 7513ec8 switched from neodev to lazydev, but in the process it introduced an LSP error in `init.lua`, which degrades the desired "first timer" experience of kickstart.nvim. This commit follows the configuration suggested in https://github.com/folke/lazydev.nvim/tree/6184ebbbc8045d70077659b7d30c705a588dc62f#-installation which resolves the LSP error. * lint: fix lsp warning in `vim.lsp.inlay_hint.is_enabled` (nvim-lua#947) * fix: lsp warning * review suggestion Co-authored-by: Tom Kuson <[email protected]> --------- Co-authored-by: Tom Kuson <[email protected]> * Update comment about the toggle inlay hints keymap (nvim-lua#1041) * Remove redundant hlsearch option (nvim-lua#1058) * Modify conform comments to prevent deprecation warning when used (nvim-lua#1057) * refactor: remove lazydev and luvit-meta as lsp dependencies (nvim-lua#1047) * performance: defer clipboard because xsel and pbcopy can be slow (nvim-lua#1049) * Remove treesitter prefer_git option (nvim-lua#1061) - It's not safe and can corrupt other git repos - nvim-treesiter maintainers consider `prefer_git` as deprecated and no longer needed. See nvim-treesitter PR for details: nvim-treesitter/nvim-treesitter#6959 * Add explicit dependency of nvim-lspconfig on cmp-nvim-lsp (nvim-lua#1042) * Update README.md (nvim-lua#1091) * Add note in README about lazy-lock.json (nvim-lua#1090) * Check for loop or uv for lazypath (nvim-lua#1095) * refactor: update treesitter and which-key config (nvim-lua#1068) * Include visual mode in LSP code action keymap (nvim-lua#1060) (nvim-lua#1064) * Enable silent option for default neo-tree plugin keybinding (nvim-lua#1108) * Fix: updated the windows installation commands (nvim-lua#1101) * Update README.md * Update README.md * Fix: updated the windows installation commands * fix: remove deprecated opt for conform.nvim (nvim-lua#1070) - changed lsp_fallback -> lsp_format - updated format_on_save function to reflect change above * cleanup: refactor which-key configuration for cleaner setup (nvim-lua#1102) - Moved `which-key` configuration from inline `config` to `opts` for better organization. - Updated the key mappings setup to use `spec` for defining existing key chains. - Removed deprecated or unnecessary comments and code. This change aligns with updated `which-key` configuration practices, improving readability and maintainability as recommended by @VlaDexa in nvim-lua#1068. * Fix the which-key spec issue caused by recent cleanup (nvim-lua#1113) The recent cleanup accidentally broke the leader key specs because the spec block was in the wrong level of braces. That resulted in which-key no longer showing the description of the <leader> key chains such as [S]earch and others. * feat: update references of tsserver to ts_ls (nvim-lua#1131) * fix: update lazy uninstall information link (nvim-lua#1148) * Disable linting autocmd for readonly buffers (nvim-lua#1202) * Disable linting autocmd for readonly buffers This should avoid linting in buffers outside of the user's control, having in mind especially the handy LSP pop-ups that describe your hovered symbol using markdown. Co-authored-by: Robin Gruyters <[email protected]> * Justify guarding try_lint in readonly buffers Co-authored-by: Robin Gruyters <[email protected]> --------- Co-authored-by: Robin Gruyters <[email protected]> * samarth-nagar fix: lazy help tag on line 931 (nvim-lua#1167) * samarth-nagar fix: lazy help tag on line 931 found in issue nvim-lua#1152 * fixed white space --------- Co-authored-by: sam <[email protected]> * Change diagnostic symbols if vim.g.have_nerd_font is true (nvim-lua#1195) * feat: Change diagnostic symbols if vim.g.have_nerd_font is true * feat: Comment out changes regarding diagnostic symbols so that only those who want to change them can do so --------- Co-authored-by: name <email> * Set breakpoint icons and their highlight colors (nvim-lua#1194) * feat: Set breakpoint icons and their highlight colors * docs: Delete reference URL (written in PR) feat: "Break" and "Stop" arguments of vim.api.nvim_set_hl are changed because they are too common nouns feat: Comment out changes regarding diagnostic symbols so that only those who want to change them can do so --------- Co-authored-by: name <email> * Remove two because there are more than two. (nvim-lua#1213) * feat: Change to prepare for upcoming deprecation of configuring diagnostic-signs using sign_define() (nvim-lua#1232) * Fix nvim-dap not lazy loading (nvim-lua#1216) * Fix nvim-dap not lazy loading The keys property had local variables 'dap' and 'dap-ui' that used `require` and prevented all DAP related plugins from lazy-loading. Fixed this by changing keys to a table and substituting the local variables with a lamba function * Make debug keybind descriptions more consistent * fix: which-key comment typo (nvim-lua#1227) --------- Co-authored-by: Vladislav Grechannik <[email protected]> Co-authored-by: Folke Lemaitre <[email protected]> Co-authored-by: Damjan 9000 <[email protected]> Co-authored-by: TJ DeVries <[email protected]> Co-authored-by: Tom Kuson <[email protected]> Co-authored-by: Artyom <[email protected]> Co-authored-by: Richard Macklin <[email protected]> Co-authored-by: Matt Mirus <[email protected]> Co-authored-by: mrr11k <[email protected]> Co-authored-by: Seb Tomasini <[email protected]> Co-authored-by: srdtrk <[email protected]> Co-authored-by: Arvin Verain <[email protected]> Co-authored-by: Brandon Clark <[email protected]> Co-authored-by: Ihsan Tonuzi <[email protected]> Co-authored-by: abeldekat <[email protected]> Co-authored-by: jstrot <[email protected]> Co-authored-by: theoboldalex <[email protected]> Co-authored-by: Matt Gallagher <[email protected]> Co-authored-by: Michael L. <[email protected]> Co-authored-by: Bayram Kazik <[email protected]> Co-authored-by: Harshit Pant <[email protected]> Co-authored-by: Nicolás Baquero <[email protected]> Co-authored-by: Bastien Traverse <[email protected]> Co-authored-by: Éric NICOLAS <[email protected]> Co-authored-by: Robin Gruyters <[email protected]> Co-authored-by: sam <[email protected]> Co-authored-by: sam <[email protected]> Co-authored-by: gloomy-lemon-debatable <[email protected]> Co-authored-by: Will Winder <[email protected]> Co-authored-by: Anjishnu Banerjee <[email protected]> Co-authored-by: Miha <[email protected]> Co-authored-by: mogz <[email protected]>
1 parent 6d402af commit f2449c9

File tree

15 files changed

+215
-96
lines changed

15 files changed

+215
-96
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ External Requirements:
3030
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
3131
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
3232
- Language Setup:
33-
- If want to write Typescript, you need `npm`
34-
- If want to write Golang, you will need `go`
33+
- If you want to write Typescript, you need `npm`
34+
- If you want to write Golang, you will need `go`
3535
- etc.
3636

3737
> **NOTE**
@@ -48,8 +48,8 @@ Neovim's configurations are located under the following paths, depending on your
4848
| OS | PATH |
4949
| :- | :--- |
5050
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
51-
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
52-
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
51+
| Windows (cmd)| `%localappdata%\nvim\` |
52+
| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
5353

5454
#### Recommended Step
5555

@@ -61,6 +61,10 @@ fork to your machine using one of the commands below, depending on your OS.
6161
> Your fork's url will be something like this:
6262
> `https://github.com/<your_github_username>/kickstart-modular.nvim.git`
6363
64+
You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
65+
too - it's ignored in the kickstart repo to make maintenance easier, but it's
66+
[recommmended to track it in version control](https://lazy.folke.io/usage/lockfile).
67+
6468
#### Clone kickstart.nvim
6569
> **NOTE**
6670
> If following the recommended step above (i.e., forking the repo), replace
@@ -79,13 +83,13 @@ git clone https://github.com/dam9000/kickstart-modular.nvim.git "${XDG_CONFIG_HO
7983
If you're using `cmd.exe`:
8084

8185
```
82-
git clone https://github.com/dam9000/kickstart-modular.nvim.git %userprofile%\AppData\Local\nvim\
86+
git clone https://github.com/dam9000/kickstart.nvim.git "%localappdata%\nvim"
8387
```
8488

8589
If you're using `powershell.exe`
8690

8791
```
88-
git clone https://github.com/dam9000/kickstart-modular.nvim.git $env:USERPROFILE\AppData\Local\nvim\
92+
git clone https://github.com/dam9000/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
8993
```
9094

9195
</details>
@@ -128,7 +132,7 @@ examples of adding popularly requested plugins.
128132
`~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
129133
distribution that you would like to try out.
130134
* What if I want to "uninstall" this configuration:
131-
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
135+
* See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information
132136
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
133137
* The main purpose of kickstart is to serve as a teaching tool and a reference
134138
configuration that someone can easily use to `git clone` as a basis for their own.

lua/keymaps.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
-- [[ Basic Keymaps ]]
22
-- See `:help vim.keymap.set()`
33

4-
-- Set highlight on search, but clear on pressing <Esc> in normal mode
5-
vim.opt.hlsearch = true
4+
-- Clear highlights on search when pressing <Esc> in normal mode
5+
-- See `:help hlsearch`
66
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
77

88
-- Diagnostic keymaps
9-
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
10-
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
11-
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
129
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
1310

1411
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier

lua/kickstart/health.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
--]]
77

88
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
9+
local verstr = tostring(vim.version())
10+
if not vim.version.ge then
1111
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
1212
return
1313
end
1414

15-
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
15+
if vim.version.ge(vim.version(), '0.10-dev') then
1616
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
1717
else
1818
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))

lua/kickstart/plugins/cmp.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ return {
103103
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
104104
},
105105
sources = {
106+
{
107+
name = 'lazydev',
108+
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
109+
group_index = 0,
110+
},
106111
{ name = 'nvim_lsp' },
107112
{ name = 'luasnip' },
108113
{ name = 'path' },

lua/kickstart/plugins/conform.lua

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
return {
22
{ -- Autoformat
33
'stevearc/conform.nvim',
4-
lazy = false,
4+
event = { 'BufWritePre' },
5+
cmd = { 'ConformInfo' },
56
keys = {
67
{
78
'<leader>f',
89
function()
9-
require('conform').format { async = true, lsp_fallback = true }
10+
require('conform').format { async = true, lsp_format = 'fallback' }
1011
end,
1112
mode = '',
1213
desc = '[F]ormat buffer',
@@ -19,19 +20,24 @@ return {
1920
-- have a well standardized coding style. You can add additional
2021
-- languages here or re-enable it for the disabled ones.
2122
local disable_filetypes = { c = true, cpp = true }
23+
local lsp_format_opt
24+
if disable_filetypes[vim.bo[bufnr].filetype] then
25+
lsp_format_opt = 'never'
26+
else
27+
lsp_format_opt = 'fallback'
28+
end
2229
return {
2330
timeout_ms = 500,
24-
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
31+
lsp_format = lsp_format_opt,
2532
}
2633
end,
2734
formatters_by_ft = {
2835
lua = { 'stylua' },
2936
-- Conform can also run multiple formatters sequentially
3037
-- python = { "isort", "black" },
3138
--
32-
-- You can use a sub-list to tell conform to run *until* a formatter
33-
-- is found.
34-
-- javascript = { { "prettierd", "prettier" } },
39+
-- You can use 'stop_after_first' to run the first available formatter from the list
40+
-- javascript = { "prettierd", "prettier", stop_after_first = true },
3541
},
3642
},
3743
},

lua/kickstart/plugins/debug.lua

Lines changed: 64 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,59 @@ return {
2424
-- Add your own debuggers here
2525
'leoluz/nvim-dap-go',
2626
},
27+
keys = {
28+
-- Basic debugging keymaps, feel free to change to your liking!
29+
{
30+
'<F5>',
31+
function()
32+
require('dap').continue()
33+
end,
34+
desc = 'Debug: Start/Continue',
35+
},
36+
{
37+
'<F1>',
38+
function()
39+
require('dap').step_into()
40+
end,
41+
desc = 'Debug: Step Into',
42+
},
43+
{
44+
'<F2>',
45+
function()
46+
require('dap').step_over()
47+
end,
48+
desc = 'Debug: Step Over',
49+
},
50+
{
51+
'<F3>',
52+
function()
53+
require('dap').step_out()
54+
end,
55+
desc = 'Debug: Step Out',
56+
},
57+
{
58+
'<leader>b',
59+
function()
60+
require('dap').toggle_breakpoint()
61+
end,
62+
desc = 'Debug: Toggle Breakpoint',
63+
},
64+
{
65+
'<leader>B',
66+
function()
67+
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
68+
end,
69+
desc = 'Debug: Set Breakpoint',
70+
},
71+
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
72+
{
73+
'<F7>',
74+
function()
75+
require('dapui').toggle()
76+
end,
77+
desc = 'Debug: See last session result.',
78+
},
79+
},
2780
config = function()
2881
local dap = require 'dap'
2982
local dapui = require 'dapui'
@@ -45,16 +98,6 @@ return {
4598
},
4699
}
47100

48-
-- Basic debugging keymaps, feel free to change to your liking!
49-
vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
50-
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
51-
vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
52-
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
53-
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
54-
vim.keymap.set('n', '<leader>B', function()
55-
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
56-
end, { desc = 'Debug: Set Breakpoint' })
57-
58101
-- Dap UI setup
59102
-- For more information, see |:help nvim-dap-ui|
60103
dapui.setup {
@@ -77,8 +120,17 @@ return {
77120
},
78121
}
79122

80-
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
81-
vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })
123+
-- Change breakpoint icons
124+
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
125+
-- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
126+
-- local breakpoint_icons = vim.g.have_nerd_font
127+
-- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
128+
-- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
129+
-- for type, icon in pairs(breakpoint_icons) do
130+
-- local tp = 'Dap' .. type
131+
-- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
132+
-- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
133+
-- end
82134

83135
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
84136
dap.listeners.before.event_terminated['dapui_config'] = dapui.close

lua/kickstart/plugins/lint.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ return {
4747
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
4848
group = lint_augroup,
4949
callback = function()
50-
require('lint').try_lint()
50+
-- Only run the linter in buffers that you can modify in order to
51+
-- avoid superfluous noise, notably within the handy LSP pop-ups that
52+
-- describe the hovered symbol using Markdown.
53+
if vim.opt_local.modifiable:get() then
54+
lint.try_lint()
55+
end
5156
end,
5257
})
5358
end,

lua/kickstart/plugins/lspconfig.lua

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1+
-- LSP Plugins
12
return {
2-
{ -- LSP Configuration & Plugins
3+
{
4+
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
5+
-- used for completion, annotations and signatures of Neovim apis
6+
'folke/lazydev.nvim',
7+
ft = 'lua',
8+
opts = {
9+
library = {
10+
-- Load luvit types when the `vim.uv` word is found
11+
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
12+
},
13+
},
14+
},
15+
{ 'Bilal2453/luvit-meta', lazy = true },
16+
{
17+
-- Main LSP Configuration
318
'neovim/nvim-lspconfig',
419
dependencies = {
520
-- Automatically install LSPs and related tools to stdpath for Neovim
@@ -11,9 +26,8 @@ return {
1126
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
1227
{ 'j-hui/fidget.nvim', opts = {} },
1328

14-
-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
15-
-- used for completion, annotations and signatures of Neovim apis
16-
{ 'folke/neodev.nvim', opts = {} },
29+
-- Allows extra capabilities provided by nvim-cmp
30+
'hrsh7th/cmp-nvim-lsp',
1731
},
1832
config = function()
1933
-- Brief aside: **What is LSP?**
@@ -53,8 +67,9 @@ return {
5367
--
5468
-- In this case, we create a function that lets us more easily define mappings specific
5569
-- for LSP related items. It sets the mode, buffer and description for us each time.
56-
local map = function(keys, func, desc)
57-
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
70+
local map = function(keys, func, desc, mode)
71+
mode = mode or 'n'
72+
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
5873
end
5974

6075
-- Jump to the definition of the word under your cursor.
@@ -88,11 +103,7 @@ return {
88103

89104
-- Execute a code action, usually your cursor needs to be on top of an error
90105
-- or a suggestion from your LSP for this to activate.
91-
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
92-
93-
-- Opens a popup that displays documentation about the word under your cursor
94-
-- See `:help K` for why this keymap.
95-
map('K', vim.lsp.buf.hover, 'Hover Documentation')
106+
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })
96107

97108
-- WARN: This is not Goto Definition, this is Goto Declaration.
98109
-- For example, in C this would take you to the header.
@@ -104,7 +115,7 @@ return {
104115
--
105116
-- When you move your cursor, the highlights will be cleared (the second autocommand).
106117
local client = vim.lsp.get_client_by_id(event.data.client_id)
107-
if client and client.server_capabilities.documentHighlightProvider then
118+
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
108119
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
109120
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
110121
buffer = event.buf,
@@ -127,18 +138,28 @@ return {
127138
})
128139
end
129140

130-
-- The following autocommand is used to enable inlay hints in your
141+
-- The following code creates a keymap to toggle inlay hints in your
131142
-- code, if the language server you are using supports them
132143
--
133144
-- This may be unwanted, since they displace some of your code
134-
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
145+
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
135146
map('<leader>th', function()
136-
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
147+
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
137148
end, '[T]oggle Inlay [H]ints')
138149
end
139150
end,
140151
})
141152

153+
-- Change diagnostic symbols in the sign column (gutter)
154+
-- if vim.g.have_nerd_font then
155+
-- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' }
156+
-- local diagnostic_signs = {}
157+
-- for type, icon in pairs(signs) do
158+
-- diagnostic_signs[vim.diagnostic.severity[type]] = icon
159+
-- end
160+
-- vim.diagnostic.config { signs = { text = diagnostic_signs } }
161+
-- end
162+
142163
-- LSP servers and clients are able to communicate to each other what features they support.
143164
-- By default, Neovim doesn't support everything that is in the LSP specification.
144165
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
@@ -165,8 +186,8 @@ return {
165186
-- Some languages (like typescript) have entire language plugins that can be useful:
166187
-- https://github.com/pmizio/typescript-tools.nvim
167188
--
168-
-- But for many setups, the LSP (`tsserver`) will work just fine
169-
-- tsserver = {},
189+
-- But for many setups, the LSP (`ts_ls`) will work just fine
190+
-- ts_ls = {},
170191
--
171192

172193
lua_ls = {
@@ -207,7 +228,7 @@ return {
207228
local server = servers[server_name] or {}
208229
-- This handles overriding only values explicitly passed
209230
-- by the server configuration above. Useful when disabling
210-
-- certain features of an LSP (for example, turning off formatting for tsserver)
231+
-- certain features of an LSP (for example, turning off formatting for ts_ls)
211232
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
212233
require('lspconfig')[server_name].setup(server)
213234
end,

lua/kickstart/plugins/mini.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ return {
66
--
77
-- Examples:
88
-- - va) - [V]isually select [A]round [)]paren
9-
-- - yinq - [Y]ank [I]nside [N]ext [']quote
9+
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
1010
-- - ci' - [C]hange [I]nside [']quote
1111
require('mini.ai').setup { n_lines = 500 }
1212

lua/kickstart/plugins/neo-tree.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ return {
1212
},
1313
cmd = 'Neotree',
1414
keys = {
15-
{ '\\', ':Neotree reveal<CR>', { desc = 'NeoTree reveal' } },
15+
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
1616
},
1717
opts = {
1818
filesystem = {

0 commit comments

Comments
 (0)