feat: add golang support
This commit is contained in:
parent
ae73753c5b
commit
a5592824d1
3 changed files with 5 additions and 2 deletions
|
@ -3,6 +3,7 @@ local options = {
|
||||||
bash = { "shfmt" },
|
bash = { "shfmt" },
|
||||||
css = { "prettier" },
|
css = { "prettier" },
|
||||||
json = { "prettier" },
|
json = { "prettier" },
|
||||||
|
go = { "goimports", "gofmt" },
|
||||||
html = { "prettier" },
|
html = { "prettier" },
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
markdown = { "prettier" },
|
markdown = { "prettier" },
|
||||||
|
|
|
@ -7,7 +7,7 @@ local capabilities = configs.capabilities
|
||||||
local lspconfig = require "lspconfig"
|
local lspconfig = require "lspconfig"
|
||||||
|
|
||||||
-- if you just want default config for the servers then put them in a table
|
-- if you just want default config for the servers then put them in a table
|
||||||
local servers = { "html", "cssls", "tsserver", "yamlls", "ansiblels", "bashls", "rls" }
|
local servers = { "html", "cssls", "tsserver", "yamlls", "ansiblels", "bashls", "rls", "gopls" }
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup {
|
||||||
|
|
|
@ -24,13 +24,14 @@ return {
|
||||||
"bash-language-server",
|
"bash-language-server",
|
||||||
"shfmt",
|
"shfmt",
|
||||||
"shellcheck",
|
"shellcheck",
|
||||||
"ansible-language-server@1.2.1",
|
"ansible-language-server",
|
||||||
"ansible-lint",
|
"ansible-lint",
|
||||||
"yaml-language-server",
|
"yaml-language-server",
|
||||||
"yamllint",
|
"yamllint",
|
||||||
"yamlfmt",
|
"yamlfmt",
|
||||||
"dockerfile-language-server",
|
"dockerfile-language-server",
|
||||||
"prettier",
|
"prettier",
|
||||||
|
"gopls",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -40,6 +41,7 @@ return {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"vim",
|
"vim",
|
||||||
"lua",
|
"lua",
|
||||||
|
"go",
|
||||||
"html",
|
"html",
|
||||||
"css",
|
"css",
|
||||||
"javascript",
|
"javascript",
|
||||||
|
|
Loading…
Reference in a new issue