diff options
| author | Elvis Claros Castro <elvis@claros.ar> | 2025-10-30 17:47:15 -0300 |
|---|---|---|
| committer | Elvis Claros Castro <elvis@claros.ar> | 2025-10-30 17:47:15 -0300 |
| commit | 42a77146a31d6d0180d80b1ada98cd828c2b4b22 (patch) | |
| tree | 2050394a2f8a6a45dee6b569a62493d7308f4d5a /lua | |
| parent | 3bcc0dfc274eaa46d9df4c5952d6b30a7e1a0131 (diff) | |
| download | nvim-conf-42a77146a31d6d0180d80b1ada98cd828c2b4b22.tar.gz nvim-conf-42a77146a31d6d0180d80b1ada98cd828c2b4b22.zip | |
elimino conf de rust
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/pi/lsp/null-ls.lua | 63 | ||||
| -rw-r--r-- | lua/pi/lsp/servers/rust_analyzer.old | 24 | ||||
| -rw-r--r-- | lua/plugins/lsp.lua | 3 |
3 files changed, 66 insertions, 24 deletions
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", |