Remove nvim-lsp-config and manually add each lsp.

This commit is contained in:
calcu1on
2025-05-20 08:55:12 -04:00
parent 571341310a
commit bb66b8fa82
10 changed files with 162 additions and 106 deletions

View File

@@ -21,6 +21,17 @@ vim.o.termguicolors = true
-- vim.cmd "let g:everforest_background = 'hard'"
vim.cmd.colorscheme('nordfox')
-- LSP --
vim.o.winborder = 'rounded'
vim.lsp.enable({'intelephense'})
vim.lsp.enable({'drupal-lsp'})
vim.lsp.enable({'rust_analyzer'})
vim.lsp.enable({'elixirls'})
vim.lsp.enable({'lexical'})
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
vim.keymap.set({ "n" }, "<leader>ca", vim.lsp.buf.code_action, {})
-- XDEBUG --
local dap = require('dap')
require('telescope').load_extension('dap')
@@ -50,13 +61,6 @@ dap.configurations.php = {
}
}
-- vim.cmd [[
-- highlight Normal guibg=none
-- highlight NonText guibg=none
-- highlight Normal ctermbg=none
-- highlight NonText ctermbg=none
-- ]]
vim.fn.sign_define('DapBreakpoint',{ text ='🟥', texthl ='', linehl ='', numhl =''})
vim.fn.sign_define('DapStopped',{ text ='▶️', texthl ='', linehl ='', numhl =''})
vim.keymap.set('n', '<leader>?', function() dap.continue() end)
@@ -72,17 +76,17 @@ vim.keymap.set('n', '<leader>db', function()
widgets.centered_float(widgets.scopes)
end)
local lspconfig = require 'lspconfig'
local configs = require 'lspconfig.configs'
if not configs.drupal then
configs.drupal = {
default_config = {
cmd = {'drupal-lsp'},
filetypes = {'php', 'module', 'inc', 'theme'},
root_dir = function(fname)
return lspconfig.util.root_pattern('composer.json', '.git')(fname)
end
};
}
end
lspconfig.drupal.setup{ autostart = true }
-- local lspconfig = require 'lspconfig'
-- local configs = require 'lspconfig.configs'
-- if not configs.drupal then
-- configs.drupal = {
-- default_config = {
-- cmd = {'drupal-lsp'},
-- filetypes = {'php', 'module', 'inc', 'theme'},
-- root_dir = function(fname)
-- return lspconfig.util.root_pattern('composer.json', '.git')(fname)
-- end
-- };
-- }
-- end
-- lspconfig.drupal.setup{ autostart = true }