Added new filetype in gopls

This commit is contained in:
Marcin Woźniak 2024-12-29 00:48:30 +01:00
parent 7738432134
commit 9919ecd678
Signed by: y0rune
GPG Key ID: F204C385F57EB348

View File

@ -244,7 +244,7 @@ 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,
@ -263,7 +263,11 @@ require'lspconfig'.gopls.setup {
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 <Leader>f :silent! undojoin \| Neoformat ruff <CR> :w<CR>
" Newsboat
autocmd BufRead,BufNewFile urls set textwidth=0