lsp funcionando para golang

This commit is contained in:
serxoz 2022-08-02 18:03:24 +02:00
parent 64354c940e
commit 3498d29f9d
4 changed files with 26 additions and 34 deletions

View File

@ -1 +1,2 @@
vim.cmd(":TSInstall all");
-- vim.cmd(":MasonInstallAll")

View File

@ -6,11 +6,6 @@ M.plugins = {
override = {
["nvim-treesitter/nvim-treesitter"] = override.treesitter,
},
options = {
lspconfig = {
setup_lspconf = "custom.plugins.lspconfig"
},
},
user = require "custom.plugins",
}

View File

@ -1,17 +1,17 @@
return {
["neovim/nvim-lspconfig"] = {
config = function()
require "plugins.configs.lspconfig"
require "custom.plugins.lspconfig"
end,
},
['ThePrimeagen/harpoon'] = {
module = "harpoon",
ft = "harpoon",
config = function()
require "custom.plugins.harpoon"
end,
},
['ray-x/go.nvim'] = {},
['ray-x/guihua.lua'] = {},
["neovim/nvim-lspconfig"] = {
config = function()
require "plugins.configs.lspconfig"
require "custom.plugins.lspconfig"
end,
},
['ThePrimeagen/harpoon'] = {
module = "harpoon",
ft = "harpoon",
config = function()
require "custom.plugins.harpoon"
end,
},
['ray-x/go.nvim'] = {},
['ray-x/guihua.lua'] = {},
}

View File

@ -1,17 +1,13 @@
local M = {}
-- custom.plugins.lspconfig
local on_attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
M.setup_lsp = function(attach, capabilities)
local lspconfig = require "lspconfig"
local lspconfig = require "lspconfig"
local servers = { "html", "cssls", "clangd", "gopls"}
-- lspserver with default config
local servers = { "html", "cssls", "gopls", "jedi_language_server"}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = attach,
capabilities = capabilities,
}
end
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = on_attach,
capabilities = capabilities,
}
end
return M