fix gopls

Signed-off-by: Lee Tang <i@d0zingcat.dev>
This commit is contained in:
Lee Tang
2023-02-27 15:23:52 +08:00
parent 681496a57e
commit 43a5d9fbc6
3 changed files with 11 additions and 3 deletions

View File

@@ -179,6 +179,14 @@ map('n', '=', ':BufferPick<CR>', opts)
-- choosewin
map('n', '-', '<Plug>(choosewin)', { noremap = false })
-- sort go imports
-- vim.api.nvim_create_autocmd('BufWritePre', {
-- pattern = '*.go',
-- callback = function()
-- vim.lsp.buf.code_action({ context = { only = { 'source.organizeImports' } }, apply = true })
-- end
-- })
-- Some configurations not able to migrate
api.nvim_exec(
[[

View File

@@ -36,15 +36,14 @@ local servers = {
},
},
eslint = {},
tsserver = {},
jsonls = {},
clangd = {},
gopls = {
settings = {
golsp = {
gopls = {
gofumpt = true,
usePlaceholders = true,
staticcheck = true,
useplaceholders = true,
codelenses = {
gc_details = true,
},