fix(nvim): New lspconfig notation, 4 tab size

This commit is contained in:
2025-09-18 09:31:49 +02:00
parent 2216a8431a
commit 9f71c1c29c
2 changed files with 12 additions and 11 deletions

View File

@@ -32,10 +32,10 @@ vim.o.hlsearch = false
-- Make line numbers default
vim.wo.number = true
vim.o.tabstop = 2 -- A TAB character looks like 2 spaces
vim.o.tabstop = 4 -- A TAB character looks like 4 spaces
vim.o.expandtab = true -- Pressing the TAB key will insert spaces instead of a TAB character
vim.o.softtabstop = 2 -- Number of spaces inserted instead of a TAB character
vim.o.shiftwidth = 2 -- Number of spaces inserted when indenting
vim.o.softtabstop = 4 -- Number of spaces inserted instead of a TAB character
vim.o.shiftwidth = 4 -- Number of spaces inserted when indenting
-- Ruler at 100 characters
vim.o.colorcolumn = "100"

View File

@@ -1,6 +1,5 @@
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup({
vim.lsp.config.lua_ls = {
cmd = { "lua-language-server" },
settings = {
Lua = {
diagnostics = {
@@ -9,14 +8,16 @@ lspconfig.lua_ls.setup({
},
},
},
})
}
lspconfig.rust_analyzer.setup({
vim.lsp.config.rust_analyzer = {
cmd = { "rust-analyzer" },
cargo = {
features = { "all" },
},
})
}
lspconfig.gopls.setup({
vim.lsp.config.gopls = {
cmd = { "gopls" },
filetypes = { "go", "gomod", "gowork", "gotmpl" },
})
}