dev: automated commit - 2025-09-21 22:02:19
This commit is contained in:
parent
667fa0b7db
commit
a2a4066600
5 changed files with 32 additions and 99 deletions
|
|
@ -4,21 +4,8 @@ local M = {
|
|||
"nvim-lua/plenary.nvim",
|
||||
{ "L3MON4D3/LuaSnip", version = "v2.*" },
|
||||
"folke/lazydev.nvim",
|
||||
{
|
||||
"MattiasMTS/cmp-dbee",
|
||||
dependencies = {
|
||||
{ "kndndrj/nvim-dbee" },
|
||||
},
|
||||
ft = "sql", -- optional but good to have
|
||||
opts = {}, -- needed
|
||||
},
|
||||
{
|
||||
"saghen/blink.compat",
|
||||
version = "2.*",
|
||||
lazy = true,
|
||||
opts = {},
|
||||
},
|
||||
},
|
||||
build = "nix run .#build-plugin",
|
||||
version = "*",
|
||||
}
|
||||
|
||||
|
|
@ -50,13 +37,8 @@ M.config = function()
|
|||
sources = {
|
||||
default = { "lsp", "path", "snippets", "buffer", "lazydev" },
|
||||
providers = {
|
||||
dbee = { name = "cmp-dbee", module = "blink.compat.source" },
|
||||
lazydev = { module = "lazydev.integrations.blink", score_offset = 100 },
|
||||
},
|
||||
|
||||
per_filetype = {
|
||||
sql = { "dbee", "buffer" },
|
||||
},
|
||||
},
|
||||
|
||||
signature = {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ return {
|
|||
toml = { "taplo" },
|
||||
typst = { "prettypst" },
|
||||
java = { "google-java-format" },
|
||||
nix = { "nixpkgs-fmt" },
|
||||
},
|
||||
formatters = {
|
||||
csharpier = {
|
||||
|
|
|
|||
|
|
@ -3,16 +3,11 @@ return {
|
|||
dependencies = {
|
||||
require("plugins.lsp.extras.lazydev"),
|
||||
require("plugins.lsp.extras.gopher"),
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
"mason-org/mason.nvim",
|
||||
"j-hui/fidget.nvim",
|
||||
"ibhagwan/fzf-lua",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
},
|
||||
|
||||
config = function()
|
||||
-- Mason setup
|
||||
require("mason").setup({ max_concurrent_installers = 4 })
|
||||
require("fidget").setup({})
|
||||
|
||||
-- Enhance floating preview windows
|
||||
|
|
@ -125,7 +120,9 @@ return {
|
|||
nmap("<leader>li", ":LspInfo<CR>", vim.tbl_extend("force", opts, { desc = "LSP Info" }))
|
||||
end
|
||||
|
||||
-- LSP servers configuration
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- Lista de servidores LSP a habilitar
|
||||
local servers = {
|
||||
"gopls",
|
||||
"jsonls",
|
||||
|
|
@ -134,42 +131,21 @@ return {
|
|||
"yamlls",
|
||||
"graphql",
|
||||
"html",
|
||||
"cssls",
|
||||
"omnisharp",
|
||||
"svelte",
|
||||
-- "vtsls",
|
||||
"templ",
|
||||
"tinymist",
|
||||
"jdtls",
|
||||
"ts_ls",
|
||||
"ts_go_ls",
|
||||
"nixd",
|
||||
}
|
||||
|
||||
-- Tools for mason-tool-installer
|
||||
local tools = {
|
||||
"prettierd",
|
||||
"shfmt",
|
||||
"stylua",
|
||||
"latexindent",
|
||||
"clang-format",
|
||||
"csharpier",
|
||||
"quick-lint-js",
|
||||
}
|
||||
|
||||
-- Servers not supported by mason
|
||||
local mason_unsupported = {}
|
||||
|
||||
local mason_servers = vim.tbl_filter(function(server)
|
||||
return not vim.tbl_contains(mason_unsupported, server)
|
||||
end, servers)
|
||||
|
||||
-- Mason setup
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = mason_servers,
|
||||
automatic_installation = true,
|
||||
automatic_enable = false,
|
||||
})
|
||||
require("mason-tool-installer").setup({ ensure_installed = tools })
|
||||
|
||||
-- Enable LSP servers
|
||||
vim.lsp.enable(servers)
|
||||
-- Setup automático - Neovim 11 carga las configs automáticamente
|
||||
for _, server in ipairs(servers) do
|
||||
lspconfig[server].setup({})
|
||||
end
|
||||
|
||||
-- LSP Attach autocmd
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
|
|
@ -184,7 +160,7 @@ return {
|
|||
setup_keymaps(args.buf)
|
||||
|
||||
-- Inlay hints
|
||||
if client:supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint, args.buf) then
|
||||
if client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint, args.buf) then
|
||||
vim.keymap.set("n", "<leader>th", function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = args.buf }), { bufnr = args.buf })
|
||||
end, { buffer = args.buf, desc = "Toggle Inlay Hints" })
|
||||
|
|
@ -203,20 +179,5 @@ return {
|
|||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.lsp.config("ts_go_ls", {
|
||||
cmd = { vim.loop.os_homedir() .. "/Dev/random/typescript-go/built/local/tsgo", "--lsp", "-stdio" },
|
||||
filetypes = {
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"javascript.jsx",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"typescript.tsx",
|
||||
},
|
||||
root_markers = { "tsconfig.json", "jsconfig.json", "package.json", ".git" },
|
||||
})
|
||||
|
||||
vim.lsp.enable("ts_go_ls")
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue