remember to enable lsp

This commit is contained in:
2025-11-19 13:13:50 +01:00
parent c80db2417e
commit 883c4cabb0

View File

@@ -16,7 +16,7 @@ require("fidget").setup({
require('mason').setup({}) require('mason').setup({})
require('mason-lspconfig').setup({ require('mason-lspconfig').setup({
ensure_installed = {'bashls', 'clangd', 'marksman', 'pylsp', 'ruff', 'texlab'}, ensure_installed = { 'bashls', 'clangd', 'lua_ls', 'marksman', 'pylsp', 'ruff', 'texlab' },
automatic_enable = false, automatic_enable = false,
}) })
require('mason-nvim-dap').setup({ require('mason-nvim-dap').setup({
@@ -27,6 +27,7 @@ require('dap-python').setup("python")
local servers = { local servers = {
bashls = {}, bashls = {},
clangd = {}, clangd = {},
lua_ls = {},
marksman = {}, marksman = {},
pylsp = { pylsp = {
settings = { settings = {
@@ -124,6 +125,8 @@ local on_attach = function(_client, buffer_number)
-- Use Prettier to format TS/JS if it's available -- Use Prettier to format TS/JS if it's available
return format_client.name ~= "tsserver" or not null_ls.is_registered("prettier") return format_client.name ~= "tsserver" or not null_ls.is_registered("prettier")
end, end,
async = false,
timeout_ms = 10000,
}) })
end, { desc = "LSP: Format current buffer with LSP" }) end, { desc = "LSP: Format current buffer with LSP" })
end end
@@ -138,6 +141,7 @@ for name, config in pairs(servers) do
settings = config.settings, settings = config.settings,
init_options = config.init_options, init_options = config.init_options,
}) })
vim.lsp.enable(name)
end end
vim.diagnostic.config({ vim.diagnostic.config({