Add go support in nvim

This commit is contained in:
Alexander Navarro 2024-05-29 19:47:03 -04:00
parent c943f2ef4b
commit ec12c7fe1c
5 changed files with 27 additions and 6 deletions

View file

@ -27,6 +27,7 @@ return {
typescript = { { "prettierd", "prettier" } },
typescriptreact = { { "prettierd", "prettier" } },
zsh = { "shfmt" },
go = { { "gofumpt", "goimports_reviser", "golines" } },
},
format_on_save = function(bufnr)
-- Disable with a global or buffer-local variable

View file

@ -84,4 +84,12 @@ return {
},
},
},
{
"olexsmir/gopher.nvim",
ft = "go",
build = function()
vim.cmd([[silent! GoInstallDeps]])
end,
},
}

View file

@ -7,7 +7,7 @@ return {
{ "williamboman/mason.nvim" },
"williamboman/mason-lspconfig.nvim",
-- Additional lua configuration, makes nvim stuff amazing!
{ "folke/neodev.nvim", opts = {} },
{ "folke/neodev.nvim", opts = {} },
},
config = function()
@ -60,6 +60,17 @@ return {
html = {},
pyright = {},
phpactor = {},
gopls = {
settings = {
gopls = {
completeUnimported = true,
usePlaceholders = true,
analyses = {
unusedparams = true,
},
},
},
},
rust_analyzer = {
settings = {
["rust-analyzer"] = {