chore(nvim): import goo

main
sudo pacman -Syu 2023-06-29 18:26:53 +07:00
parent b6621c430c
commit 476f28e1a9
1 changed files with 11 additions and 1 deletions

View File

@ -259,6 +259,7 @@ require("lazy").setup({
lspconfig = require("lspconfig") lspconfig = require("lspconfig")
util = require("lspconfig/util") util = require("lspconfig/util")
-- Go
-- https://github.com/golang/tools/blob/master/gopls/doc/vim.md -- https://github.com/golang/tools/blob/master/gopls/doc/vim.md
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#gopls -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#gopls
-- https://github.com/golang/tools/blob/master/gopls/doc/settings.md -- https://github.com/golang/tools/blob/master/gopls/doc/settings.md
@ -271,8 +272,17 @@ require("lazy").setup({
}, },
}) })
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.go",
callback = function()
vim.lsp.buf.code_action({ context = { only = { "source.organizeImports" } }, apply = true })
end,
})
-- Proto
lspconfig.bufls.setup({}) lspconfig.bufls.setup({})
-- General keymap
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev) vim.keymap.set("n", "[d", vim.diagnostic.goto_prev)
vim.keymap.set("n", "]d", vim.diagnostic.goto_next) vim.keymap.set("n", "]d", vim.diagnostic.goto_next)
@ -302,4 +312,4 @@ require("lazy").setup({
"github/copilot.vim", "github/copilot.vim",
}) })
vim.api.nvim_command("colorscheme minicyan") vim.api.nvim_command("colorscheme minischeme")