all repos

init.lua @ 828ca35

my nvim config
3 files changed, 6 insertions(+), 4 deletions(-)
refactor(lsp): use servers' formatter, and null-ls for everything else
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2024-03-29 22:33:13 +0200
Parent: fd2cc56
M lua/plugins/lsp/attach.lua

@@ -17,7 +17,6 @@ u.map("n", "[D", vim.diagnostic.goto_prev, true)

end function attach.common(client, bufnr) - client.server_capabilities.documentFormattingProvider = false if client.name == "gopls" then vim.lsp.codelens.refresh() end
M lua/plugins/lsp/null-ls.lua

@@ -8,7 +8,6 @@ on_attach = require("plugins.lsp.attach").basic,

sources = { formatting.stylua, diagnostic.selene, - formatting.gofumpt, formatting.goimports, formatting.golines, formatting.prettierd,
M lua/plugins/lsp/servers.lua

@@ -23,13 +23,17 @@ gopls = {

linksInHover = false, staticcheck = true, gofumpt = true, - analyses = { unusedparams = true, unreachable = true }, + analyses = { + unusedparams = true, + unreachable = true, + shadow = true, + }, hints = { assignVariableTypes = true, compositeLiteralFields = true, constantValues = true, functionTypeParameters = false, - parameterNames = false, + parameterNames = true, rangeVariableTypes = true, }, codelenses = {