♻️ refactor(nvim): check if using nvim 0.10
This commit is contained in:
parent
03803101ab
commit
7f068311d5
1 changed files with 4 additions and 8 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
local nvim_0_10 = vim.fn.has("nvim-0.10")
|
||||||
|
|
||||||
local function toggle_diag_virtext()
|
local function toggle_diag_virtext()
|
||||||
local virtual_text = { -- Default virtual_text opts from Lazy.Nvim
|
local virtual_text = { -- Default virtual_text opts from Lazy.Nvim
|
||||||
spacing = 4,
|
spacing = 4,
|
||||||
|
@ -65,7 +67,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
enabled = true,
|
enabled = nvim_0_10,
|
||||||
},
|
},
|
||||||
servers = {
|
servers = {
|
||||||
-- typos_lsp = {
|
-- typos_lsp = {
|
||||||
|
@ -138,13 +140,7 @@ return {
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.tools = {
|
opts.tools = {
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
auto = function()
|
auto = not nvim_0_10,
|
||||||
if vim.fn.has("nvim-0.10") == 1 then
|
|
||||||
return false
|
|
||||||
else
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Add table
Reference in a new issue