nvim: del v0.11 migrations.lua, lazydev support

This commit is contained in:
js0ny 2025-10-29 03:26:29 +00:00
parent 7540d37422
commit 6fb3efd1dc
11 changed files with 80 additions and 92 deletions

View file

@ -1,8 +1,16 @@
local signs = require("config.icons").diagnostics
local dsigns = require("config.icons").diagnostics
-- This provides the diagnostics signs near the line numbers
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
vim.diagnostic.config(hl, { text = icon, texthl = hl, numhl = "" })
end
vim.diagnostic.config({
virtual_text = true,
virtual_lines = false,
severity_sort = true,
update_in_insert = true,
float = true,
signs = {
text = {
[vim.diagnostic.severity.HINT] = dsigns.Hint,
[vim.diagnostic.severity.WARN] = dsigns.Warning,
[vim.diagnostic.severity.ERROR] = dsigns.Error,
},
},
})

View file

@ -0,0 +1,6 @@
local lsp_configs = {}
for _, v in ipairs(vim.api.nvim_get_runtime_file("lsp/*", true)) do
local name = vim.fn.fnamemodify(v, ":t:r")
lsp_configs[name] = true
end
vim.lsp.enable(vim.tbl_keys(lsp_configs))

View file

@ -1,31 +0,0 @@
local nvim_version = vim.version()
if nvim_version.minor ~= 11 then
return
end
vim.diagnostic.config({
virtual_lines = true,
})
-- vim.lsp.enable({
-- "clangd",
-- "luals",
-- })
local lsp_configs = {}
for _, v in ipairs(vim.api.nvim_get_runtime_file('lsp/*', true)) do
local name = vim.fn.fnamemodify(v, ':t:r')
lsp_configs[name] = true
end
vim.lsp.enable(vim.tbl_keys(lsp_configs))
-- Delete 0.11 new gr- keymaps
vim.keymap.del({ "n" }, "grn")
vim.keymap.del({ "n", "x" }, "gra")
vim.keymap.del({ "n" }, "gri")