lsp funcionando para golang
This commit is contained in:
parent
64354c940e
commit
3498d29f9d
@ -1 +1,2 @@
|
|||||||
vim.cmd(":TSInstall all");
|
vim.cmd(":TSInstall all");
|
||||||
|
-- vim.cmd(":MasonInstallAll")
|
||||||
|
@ -6,11 +6,6 @@ M.plugins = {
|
|||||||
override = {
|
override = {
|
||||||
["nvim-treesitter/nvim-treesitter"] = override.treesitter,
|
["nvim-treesitter/nvim-treesitter"] = override.treesitter,
|
||||||
},
|
},
|
||||||
options = {
|
|
||||||
lspconfig = {
|
|
||||||
setup_lspconf = "custom.plugins.lspconfig"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
user = require "custom.plugins",
|
user = require "custom.plugins",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
return {
|
return {
|
||||||
["neovim/nvim-lspconfig"] = {
|
["neovim/nvim-lspconfig"] = {
|
||||||
config = function()
|
config = function()
|
||||||
require "plugins.configs.lspconfig"
|
require "plugins.configs.lspconfig"
|
||||||
require "custom.plugins.lspconfig"
|
require "custom.plugins.lspconfig"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
['ThePrimeagen/harpoon'] = {
|
['ThePrimeagen/harpoon'] = {
|
||||||
module = "harpoon",
|
module = "harpoon",
|
||||||
ft = "harpoon",
|
ft = "harpoon",
|
||||||
config = function()
|
config = function()
|
||||||
require "custom.plugins.harpoon"
|
require "custom.plugins.harpoon"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
['ray-x/go.nvim'] = {},
|
['ray-x/go.nvim'] = {},
|
||||||
['ray-x/guihua.lua'] = {},
|
['ray-x/guihua.lua'] = {},
|
||||||
}
|
}
|
||||||
|
@ -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
|
for _, lsp in ipairs(servers) do
|
||||||
local servers = { "html", "cssls", "gopls", "jedi_language_server"}
|
lspconfig[lsp].setup {
|
||||||
|
on_attach = on_attach,
|
||||||
for _, lsp in ipairs(servers) do
|
capabilities = capabilities,
|
||||||
lspconfig[lsp].setup {
|
}
|
||||||
on_attach = attach,
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
|
||||||
|
Loading…
Reference in New Issue
Block a user