feat: add golang support

This commit is contained in:
Adrien Waksberg 2024-10-03 14:26:44 +02:00
parent ae73753c5b
commit a5592824d1
3 changed files with 5 additions and 2 deletions

View file

@ -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" },

View file

@ -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 {

View file

@ -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",