diff --git a/nvim/after/plugin/init.lua b/nvim/after/plugin/init.lua index 2b710a4..3e73b8e 100644 --- a/nvim/after/plugin/init.lua +++ b/nvim/after/plugin/init.lua @@ -1 +1,2 @@ vim.cmd(":TSInstall all"); +-- vim.cmd(":MasonInstallAll") diff --git a/nvim/custom/chadrc.lua b/nvim/custom/chadrc.lua index 3a17725..01978b9 100644 --- a/nvim/custom/chadrc.lua +++ b/nvim/custom/chadrc.lua @@ -6,11 +6,6 @@ M.plugins = { override = { ["nvim-treesitter/nvim-treesitter"] = override.treesitter, }, - options = { - lspconfig = { - setup_lspconf = "custom.plugins.lspconfig" - }, - }, user = require "custom.plugins", } diff --git a/nvim/custom/plugins/init.lua b/nvim/custom/plugins/init.lua index 3ca13d9..4888e87 100644 --- a/nvim/custom/plugins/init.lua +++ b/nvim/custom/plugins/init.lua @@ -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'] = {}, } diff --git a/nvim/custom/plugins/lspconfig.lua b/nvim/custom/plugins/lspconfig.lua index ba1d9a6..4b81db4 100644 --- a/nvim/custom/plugins/lspconfig.lua +++ b/nvim/custom/plugins/lspconfig.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 - 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