mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
nvim: del v0.11 migrations.lua, lazydev support
This commit is contained in:
parent
7540d37422
commit
6fb3efd1dc
11 changed files with 80 additions and 92 deletions
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
6
home/dot_config/nvim/lua/config/lsp.lua
Normal file
6
home/dot_config/nvim/lua/config/lsp.lua
Normal 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))
|
||||
|
|
@ -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")
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue