From dbbcf92be8e33d4b84cd15f3271cfddbd517b072 Mon Sep 17 00:00:00 2001 From: HuNtErJ1324 Date: Sun, 21 Jun 2026 15:16:40 -0700 Subject: [PATCH] Apply audited fixes: formatters, dormant tools, which-key label Audit-identified corrections, applied on top of the replayed config: - conform: use the lowercase filetype key `sql` (not `SQL`) so sql-formatter actually fires. - conform: switch Python formatting to `ruff_organize_imports` + `ruff_format` (black/isort are not installed; ruff is and does both jobs). - Wire in installed-but-previously-dormant Mason tools: add `texlab` to the LSP servers (LaTeX LSP, which VimTeX does not provide), and add conform entries `java = { 'google-java-format' }` and tex/plaintex = { 'latexindent' }. - which-key: add a `l` = [L]aTeX group label for the VimTeX maps. Note: the deprecated `vim.highlight.on_yank` -> `vim.hl.on_yank` change from the audit is already present in this newer base, so no change was needed there. Co-Authored-By: Claude Opus 4.8 --- init.lua | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index c0ac69c6..9c996d2c 100644 --- a/init.lua +++ b/init.lua @@ -371,6 +371,7 @@ do spec = { { 's', group = '[S]earch', mode = { 'n', 'v' } }, { 't', group = '[T]oggle' }, + { 'l', group = '[L]aTeX' }, -- VimTeX maps (see lua/custom/plugins/vimtex.lua) { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, -- Enable gitsigns recommended keymaps first { 'gr', group = 'LSP Actions', mode = { 'n' } }, }, @@ -729,6 +730,10 @@ do }, }, + -- texlab: LaTeX language server (completion/refs/diagnostics). VimTeX does not + -- provide this. Installed via Mason. + texlab = {}, + -- Special Lua Config, as recommended by neovim help docs lua_ls = { on_init = function(client) @@ -824,11 +829,18 @@ do -- You can also specify external formatters in here. formatters_by_ft = { lua = { 'stylua' }, - -- Conform can also run multiple formatters sequentially - python = { 'isort', 'black' }, + -- ruff handles BOTH import-sorting and formatting (black/isort are not + -- installed; ruff is). Organize imports first, then format. + python = { 'ruff_organize_imports', 'ruff_format' }, -- You can use 'stop_after_first' to run the first available formatter from the list javascript = { 'prettierd', 'prettier', stop_after_first = true }, - SQL = { 'sql-formatter' }, + -- conform matches the lowercase `vim.bo.filetype`, so the key must be `sql` + -- (an uppercase `SQL` key would never fire). + sql = { 'sql-formatter' }, + -- Wire in installed-but-previously-unused Mason tools: + java = { 'google-java-format' }, + tex = { 'latexindent' }, + plaintex = { 'latexindent' }, }, }