Add go support in nvim
This commit is contained in:
parent
c943f2ef4b
commit
ec12c7fe1c
5 changed files with 27 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -84,4 +84,12 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"olexsmir/gopher.nvim",
|
||||
ft = "go",
|
||||
build = function()
|
||||
vim.cmd([[silent! GoInstallDeps]])
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue