Revert "Revert "neovim: Restore gopls import sorting""
This reverts commit e5883296c2.
I lied about gopls not being special anymore. I'll figure this out
eventually though!
This commit is contained in:
parent
45c9d4baa7
commit
1e7274b508
1 changed files with 10 additions and 0 deletions
|
|
@ -367,6 +367,16 @@ return {
|
|||
-- This is the default handler for servers not named below.
|
||||
default_setup,
|
||||
|
||||
["gopls"] = function()
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
pattern = '*.go',
|
||||
callback = function()
|
||||
vim.lsp.buf.code_action({ context = { only = { 'source.organizeImports' } }, apply = true })
|
||||
end
|
||||
})
|
||||
default_setup("gopls")
|
||||
end,
|
||||
|
||||
["rust_analyzer"] = function()
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue