mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-27 19:28:59 +02:00
feat(lsp): enable inlay hints by default on Neovim 0.10
This commit is contained in:
parent
2de7f24530
commit
960e958548
1 changed files with 23 additions and 21 deletions
|
@ -38,7 +38,7 @@ return {
|
||||||
-- Be aware that you also will need to properly configure your LSP server to
|
-- Be aware that you also will need to properly configure your LSP server to
|
||||||
-- provide the inlay hints.
|
-- provide the inlay hints.
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
enabled = false,
|
enabled = true,
|
||||||
},
|
},
|
||||||
-- Enable this to enable the builtin LSP code lenses on Neovim >= 0.10.0
|
-- Enable this to enable the builtin LSP code lenses on Neovim >= 0.10.0
|
||||||
-- Be aware that you also will need to properly configure your LSP server to
|
-- Be aware that you also will need to properly configure your LSP server to
|
||||||
|
@ -140,6 +140,7 @@ return {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if vim.fn.has("nvim-0.10") == 1 then
|
||||||
-- inlay hints
|
-- inlay hints
|
||||||
if opts.inlay_hints.enabled then
|
if opts.inlay_hints.enabled then
|
||||||
LazyVim.lsp.on_attach(function(client, buffer)
|
LazyVim.lsp.on_attach(function(client, buffer)
|
||||||
|
@ -162,6 +163,7 @@ return {
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then
|
if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then
|
||||||
opts.diagnostics.virtual_text.prefix = vim.fn.has("nvim-0.10.0") == 0 and "●"
|
opts.diagnostics.virtual_text.prefix = vim.fn.has("nvim-0.10.0") == 0 and "●"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue