Updated config

This commit is contained in:
2025-04-04 16:30:58 +02:00
parent 4c2971044a
commit ead7d8c480
10 changed files with 68 additions and 461 deletions

View File

@ -11,6 +11,17 @@ on({ "BufNewFile", "BufRead" }, {
end,
})
on({ "LspAttach" }, {
desc = "LSP completion",
group = group,
callback = function(ev)
local client = vim.lsp.get_client_by_id(ev.data.client_id)
if client:supports_method("textDocument/completion") then
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
end
end,
})
on({ "TermOpen", "TermEnter" }, {
desc = "Disable sign column in terminals",
group = group,

View File

@ -0,0 +1,10 @@
return {
"folke/snacks.nvim",
event = "BufReadPre",
opts = {
explorer = {
replace_netrw = true,
},
},
config = true,
}

9
.config/nvim/lua/lsp.lua Normal file
View File

@ -0,0 +1,9 @@
vim.diagnostic.config({
virtual_lines = true,
})
vim.lsp.enable({
"clangd",
"gopls",
"rust-analyzer",
})

View File

@ -51,4 +51,8 @@ opt.statusline = "%{repeat('─',winwidth('.'))}"
-- Undo
opt.undofile = true
opt.undolevels = 10000
opt.undolevels = 10000
-- Virtual text
vim.diagnostic.config({ virtual_lines = true })
vim.lsp.enable({"clangd", "gopls", "rust-analyzer"})