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 `<leader>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 <noreply@anthropic.com>
This commit is contained in:
HuNtErJ1324 2026-06-21 15:16:40 -07:00
parent 348560c779
commit dbbcf92be8
1 changed files with 15 additions and 3 deletions

View File

@ -371,6 +371,7 @@ do
spec = { spec = {
{ '<leader>s', group = '[S]earch', mode = { 'n', 'v' } }, { '<leader>s', group = '[S]earch', mode = { 'n', 'v' } },
{ '<leader>t', group = '[T]oggle' }, { '<leader>t', group = '[T]oggle' },
{ '<leader>l', group = '[L]aTeX' }, -- VimTeX maps (see lua/custom/plugins/vimtex.lua)
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } }, -- Enable gitsigns recommended keymaps first { '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } }, -- Enable gitsigns recommended keymaps first
{ 'gr', group = 'LSP Actions', mode = { 'n' } }, { '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 -- Special Lua Config, as recommended by neovim help docs
lua_ls = { lua_ls = {
on_init = function(client) on_init = function(client)
@ -824,11 +829,18 @@ do
-- You can also specify external formatters in here. -- You can also specify external formatters in here.
formatters_by_ft = { formatters_by_ft = {
lua = { 'stylua' }, lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially -- ruff handles BOTH import-sorting and formatting (black/isort are not
python = { 'isort', 'black' }, -- 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 -- You can use 'stop_after_first' to run the first available formatter from the list
javascript = { 'prettierd', 'prettier', stop_after_first = true }, 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' },
}, },
} }