Added new filetype in gopls
This commit is contained in:
parent
7738432134
commit
9919ecd678
@ -244,27 +244,31 @@ require'lspconfig'.yamlls.setup{
|
|||||||
-- Setup GoLang
|
-- Setup GoLang
|
||||||
require'lspconfig'.gopls.setup {
|
require'lspconfig'.gopls.setup {
|
||||||
cmd = {"gopls", "serve"},
|
cmd = {"gopls", "serve"},
|
||||||
filetypes = {"go", "gomod"},
|
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
handlers=handlers,
|
handlers=handlers,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
settings = {
|
settings = {
|
||||||
gopls = {
|
gopls = {
|
||||||
analyses = {
|
analyses = {
|
||||||
unusedparams = true,
|
unusedparams = true,
|
||||||
},
|
},
|
||||||
staticcheck = true,
|
staticcheck = true,
|
||||||
linksInHover = false,
|
linksInHover = false,
|
||||||
codelenses = {
|
codelenses = {
|
||||||
generate = true,
|
generate = true,
|
||||||
gc_details = true,
|
gc_details = true,
|
||||||
regenerate_cgo = true,
|
regenerate_cgo = true,
|
||||||
tidy = true,
|
tidy = true,
|
||||||
upgrade_depdendency = true,
|
upgrade_depdendency = true,
|
||||||
vendor = true,
|
vendor = true,
|
||||||
},
|
},
|
||||||
usePlaceholders = 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 textwidth=0
|
||||||
autocmd BufRead,BufNewFile *.py set fo-=t
|
autocmd BufRead,BufNewFile *.py set fo-=t
|
||||||
autocmd BufWritePre *.py silent! undojoin | Neoformat ruff
|
autocmd BufWritePre *.py silent! undojoin | Neoformat ruff
|
||||||
|
noremap <Leader>f :silent! undojoin \| Neoformat ruff <CR> :w<CR>
|
||||||
|
|
||||||
" Newsboat
|
" Newsboat
|
||||||
autocmd BufRead,BufNewFile urls set textwidth=0
|
autocmd BufRead,BufNewFile urls set textwidth=0
|
||||||
|
Loading…
Reference in New Issue
Block a user