feat(dap.lua): add virtual text setup for better debugging experience

feat(dap.lua): add support for process.env.PORT environment variable to be able to run app on a configurable port
feat(lsp-config.lua): add support for detecting python environment using DPE module
feat(lualine.lua): add support for noice statusline component
feat(mason.lua): update installed language servers list
feat(noice.lua): add configuration for noice plugin
feat(none-ls.lua): remove black and mypy formatters from null-ls setup

fix(nvim-cmp.lua): change completeopt value to "menu,menuone,preview,noinsert" and add autocomplete trigger event on text change
feat(nvim-cmp.lua): add border and winhighlight settings for documentation window to improve visual appearance
feat(nvim-cmp.lua): add 'nvim_lsp_signature_help' as a source for autocompletion
refactor(colorscheme.lua): refactor SetupWindowPreferences function to dynamically set blend values for highlight groups
feat(init.lua): add setting for 'completeopt' to "menuone"
feat(plugins/noice.lua): add configuration for 'noice.nvim' plugin with dependencies and event trigger
feat(plugins/nvim-treesitter.lua): update configuration to run TSUpdate command silently

feat(utils): add Lua utility functions to detect and manage Lua versions and paths
feat(utils): add Python utility functions to check and resolve Python environments
style(theme): update current theme to 'catppuccin' in Lua script
This commit is contained in:
David Ibia
2024-09-19 14:35:11 +01:00
parent 5f86592ed4
commit fa59b7988c
24 changed files with 343 additions and 193 deletions

View File

@@ -2,6 +2,8 @@
local lspconfig = require("lspconfig")
local cmp_nvim_lsp = require("cmp_nvim_lsp")
local DPE = require("absolute.utils.detect-python-env")
local opts = { noremap = true, silent = true }
local on_attach = function(client, bufnr)
opts.buffer = bufnr
@@ -73,7 +75,7 @@ lspconfig["html"].setup({
})
-- configure typescript server with plugin
lspconfig["tsserver"].setup({
lspconfig["ts_ls"].setup({
capabilities = capabilities,
on_attach = on_attach,
})
@@ -111,8 +113,20 @@ lspconfig["svelte"].setup({
lspconfig["emmet_ls"].setup({
capabilities = capabilities,
on_attach = on_attach,
filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte", "vue" },
filetypes = {
"html",
"typescriptreact",
"javascriptreact",
"css",
"sass",
"scss",
"less",
"svelte",
"vue",
},
})
-- configure python lsp
lspconfig["pylsp"].setup({
filetypes = { "python" },
@@ -124,22 +138,29 @@ lspconfig["pylsp"].setup({
rope_autoimport = {
enabled = true,
completions = { enabled = true },
rename = { enabled = false },
},
black = { enabled = true },
autopep8 = { enabled = false },
yapf = { enabled = false },
flake8 = { enabled = true },
jedi_completion = {
enabled = true,
include_params = true,
fuzzy = true,
},
pylsp_mypy = {
enabled = true,
overrides = DPE.ResolvePythonEnvironment(),
report_progress = true,
live_mode = true,
},
-- import sorting
pyls_isort = { enabled = true },
},
},
},
})
--
-- -- configure jedi language server
-- lspconfig["jedi_language_server"].setup({
-- capabilities = capabilities,
-- on_attach = on_attach,
-- })
-- configure docker server
lspconfig["dockerls"].setup({
capabilities = capabilities,
@@ -226,13 +247,27 @@ lspconfig["astro"].setup({
on_attach = on_attach,
})
-- configure kotlin server
lspconfig["kotlin_language_server"].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure clang server
lspconfig["clangd"].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure arduino language server
lspconfig["arduino_language_server"].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure biome server
lspconfig["biome"].setup({
capabilities = capabilities,