aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2025-10-30 17:47:15 -0300
committerElvis Claros Castro <elvis@claros.ar>2025-10-30 17:47:15 -0300
commit42a77146a31d6d0180d80b1ada98cd828c2b4b22 (patch)
tree2050394a2f8a6a45dee6b569a62493d7308f4d5a
parent3bcc0dfc274eaa46d9df4c5952d6b30a7e1a0131 (diff)
downloadnvim-conf-42a77146a31d6d0180d80b1ada98cd828c2b4b22.tar.gz
nvim-conf-42a77146a31d6d0180d80b1ada98cd828c2b4b22.zip
elimino conf de rust
-rw-r--r--lazy-lock.json2
-rw-r--r--lua/pi/lsp/null-ls.lua63
-rw-r--r--lua/pi/lsp/servers/rust_analyzer.old24
-rw-r--r--lua/plugins/lsp.lua3
4 files changed, 67 insertions, 25 deletions
diff --git a/lazy-lock.json b/lazy-lock.json
index 47150a0..308bda2 100644
--- a/lazy-lock.json
+++ b/lazy-lock.json
@@ -53,7 +53,6 @@
"mini.icons": { "branch": "main", "commit": "284798619aed9f4c1ac1b9417b9a5e3b4b85ef3a" },
"mini.nvim": { "branch": "main", "commit": "ee4a4a4abed25e3d108d985b0553c5271f2f71aa" },
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
- "my-note.nvim": { "branch": "main", "commit": "bce15c38514df229eb446a6b6bef2fcbb1993e80" },
"navigator.lua": { "branch": "master", "commit": "deaf00338fe288d24f5632b1842130f8d9c15b0a" },
"neogen": { "branch": "main", "commit": "d7f9461727751fb07f82011051338a9aba07581d" },
"neorg": { "branch": "main", "commit": "59775af2fadb85cec6bff08a584c2c98a1694ea6" },
@@ -79,6 +78,7 @@
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
"nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" },
"nvim-early-retirement": { "branch": "main", "commit": "9109589b542773c9ad2a34067a085874f255577b" },
+ "nvim-lspconfig": { "branch": "master", "commit": "87d30189b24caa496b54affd65594a309ac6d929" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-python-repl": { "branch": "main", "commit": "09e77dcb9b44e28062a754f8019003bb88fe9734" },
diff --git a/lua/pi/lsp/null-ls.lua b/lua/pi/lsp/null-ls.lua
index 7e7888d..3026bd4 100644
--- a/lua/pi/lsp/null-ls.lua
+++ b/lua/pi/lsp/null-ls.lua
@@ -39,6 +39,69 @@ null_ls.setup {
},
null_ls.builtins.formatting.pint,
null_ls.builtins.formatting.clang_format,
+ null_ls.builtins.formatting.prettier.with {
+ extra_args = {
+ "--print-width",
+ "100",
+ "--tab-width",
+ "2",
+ "--single-quote",
+ "true",
+ "--trailing-comma",
+ "all",
+ "--arrow-parens",
+ "always",
+ "--semi",
+ "false",
+ "--bracket-spacing",
+ "false",
+ "--jsx-single-quote",
+ "true",
+ "--end-of-line",
+ "lf",
+ },
+ },
+ -- Opciones avanzadas de Black:
+ -- --line-length 100: ancho máximo de línea
+ -- --fast: omite comprobaciones de seguridad
+ -- --skip-string-normalization: no cambia comillas
+ -- --skip-magic-trailing-comma: ignora trailing comma mágica
+ -- --target-version py310: versión objetivo de Python 3.10
+ -- --preview: activa funciones experimentales
+ -- --diff: muestra el diff en vez de modificar archivos
+ -- --quiet: suprime la salida normal
+ -- --color: colorea el diff
+ -- --exclude ".*test.*": excluye archivos que coincidan con el patrón
+ null_ls.builtins.formatting.black.with {
+ extra_args = {
+ "--line-length",
+ "100",
+ -- "--fast",
+ "--skip-string-normalization",
+ "--skip-magic-trailing-comma",
+ "--target-version",
+ "py312",
+ -- "--preview",
+ -- "--diff",
+ -- "--quiet",
+ -- "--color",
+ "--exclude",
+ ".*test.*",
+ },
+ },
+ -- Assembly formatter
+ {
+ name = "asmfmt",
+ method = null_ls.methods.FORMATTING,
+ filetypes = { "asm", "s", "S" },
+ generator = null_ls.formatter {
+ command = "asmfmt",
+ to_stdin = true,
+ condition = function()
+ return vim.fn.executable "asmfmt" == 1
+ end,
+ },
+ },
-- null_ls.builtins.formatting.clang_format.with {
-- extra_args = { "--style={IndentWidth: 4}" },
-- },
diff --git a/lua/pi/lsp/servers/rust_analyzer.old b/lua/pi/lsp/servers/rust_analyzer.old
deleted file mode 100644
index 8999ef8..0000000
--- a/lua/pi/lsp/servers/rust_analyzer.old
+++ /dev/null
@@ -1,24 +0,0 @@
-local lsp_attach = require "pi.lsp.attach"
-local lsp_flags = require "pi.lsp.flags"
-
-return function(ops)
- return vim.tbl_extend("force", {
- on_attach = lsp_attach,
- flags = lsp_flags,
- settings = {
- ["rust-analyzer"] = {
- checkOnSave = {
- allFeatures = true,
- overrideCommand = {
- "cargo",
- "clippy",
- "--workspace",
- "--message-format=json",
- "--all-targets",
- "--all-features",
- },
- },
- },
- },
- }, ops)
-end
diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua
index 1ba462f..57e1b09 100644
--- a/lua/plugins/lsp.lua
+++ b/lua/plugins/lsp.lua
@@ -16,6 +16,9 @@ return {
{
"williamboman/mason-lspconfig.nvim",
event = "VeryLazy",
+ dependencies = {
+ "neovim/nvim-lspconfig",
+ },
},
{
"WhoIsSethDaniel/mason-tool-installer.nvim",