From 9919ecd678126c41b72167cbb9dabf2be7ac64ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Sun, 29 Dec 2024 00:48:30 +0100 Subject: [PATCH] Added new filetype in gopls --- .config/nvim/init.vim | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 8b1ff5b..4fb01f1 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -244,27 +244,31 @@ require'lspconfig'.yamlls.setup{ -- Setup GoLang require'lspconfig'.gopls.setup { cmd = {"gopls", "serve"}, - filetypes = {"go", "gomod"}, + filetypes = { "go", "gomod", "gowork", "gotmpl" }, on_attach = on_attach, handlers=handlers, capabilities = capabilities, settings = { - gopls = { - analyses = { - unusedparams = true, - }, - staticcheck = true, - linksInHover = false, - codelenses = { - generate = true, - gc_details = true, - regenerate_cgo = true, - tidy = true, - upgrade_depdendency = true, - vendor = true, - }, - usePlaceholders = true, - }, + gopls = { + analyses = { + unusedparams = true, + }, + staticcheck = true, + linksInHover = false, + codelenses = { + generate = true, + gc_details = true, + regenerate_cgo = true, + tidy = true, + upgrade_depdendency = true, + vendor = true, + }, + completeUnimported = true, + usePlaceholders = true, + analyses = { + unusedparams = true, + }, + }, }, } @@ -615,6 +619,7 @@ let g:shfmt_opt="-ci" autocmd BufRead,BufNewFile *.py set textwidth=0 autocmd BufRead,BufNewFile *.py set fo-=t autocmd BufWritePre *.py silent! undojoin | Neoformat ruff +noremap f :silent! undojoin \| Neoformat ruff :w " Newsboat autocmd BufRead,BufNewFile urls set textwidth=0