Skip to content

Cleanup/config trim#47

Merged
alexesba merged 18 commits into
masterfrom
cleanup/config-trim
Jul 17, 2026
Merged

Cleanup/config trim#47
alexesba merged 18 commits into
masterfrom
cleanup/config-trim

Conversation

@alexesba

@alexesba alexesba commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Trim redundant LazyVim defaults (options, themes, icons, duplicate commands) and lazy-load oil/reprobado.
  • Route format commands (FormatJSON, FormatSQL, FormatSQLFormatter, FormatCss, FormatXML) through conform, with install hints via require_tool / utils.format.
  • Harden buffer helpers: blank-line cleanup (including whitespace-only), preserve_cursor for cmds + Lua callbacks, documented FormatHashes, and fix false “Format JSON: true” errors from misreading conform’s return value.
  • UX: restore :ColorScheme Snacks picker; map blink.cmp <C-j>/<C-k> for suggestion navigation (keep arrows / <C-n>/<C-p>); track LazyVim sidekick extra in lazyvim.json.

Test plan

  • :FormatJSON on a JSON file (e.g. lazyvim.json) — formats without error notification
  • :FormatSQL / :FormatSQLFormatter / :FormatCss / :FormatXML — formats (or clear missing-tool install hint)
  • :RemoveExtraEmptyLines collapses multi-blank runs to one; :RemoveEmptyLines removes all blanks (including whitespace-only) without Pattern not found: ^$
  • :UpdateRubyHashesByLines / :FormatHashes — rocket → new syntax, split }, {, single quotes, re-indent
  • Completion menu: <C-j> / <C-k> move suggestions; arrows and <C-n> / <C-p> still work
  • :ColorScheme opens Snacks colorscheme picker
  • make test passes

alexesbafh and others added 18 commits June 23, 2026 19:31
- Remove duplicate HashNewSyntax user command registration
- Trim options.lua to personal overrides (drop LazyVim defaults)
- Drop redundant nvin-web-devicons plugin spec
- Remove unused sonokai plugin; keep tokyonight in lazy install list
- Update README to match current plugin set

Co-authored-by: Cursor <cursoragent@cursor.com>
- Lazy-load oil.nvim (keys, cmd, nvim . still opens via Oil)
- Lazy-load reprobado on commands and leader keymaps; merge vorbis-tools spec
- Remove FormatJSONV2, FormatSQLV2, and :ColorScheme (LazyVim covers these)
- Drop unused require_tool entries for underscore and sql-formatter-cli

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Two SQL formatters use different tools: FormatSQL (sqlformat/sqlparse)
and FormatSQLFormatter (sql-formatter-cli). Keep FormatSQLV2 as an alias.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add conform formatter definitions and utils.format helper so :FormatSQL,
:FormatSQLFormatter, :FormatJSON, and :FormatXML share the same engines
as <leader>cf while keeping install hints from require_tool.

Co-authored-by: Cursor <cursoragent@cursor.com>
Route :FormatCss through utils.format with prettier, and register
css/scss/less/sass filetypes for <leader>cf.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wire: FormatJSON through utils.functions like other conform formatters.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace manual getpos/setpos around escape unwrapping; conform handles
cursor for the format step like other format commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace cat -s with a Vim substitute that keeps one blank line between
functions/blocks; update command description and behavior test.

Co-authored-by: Cursor <cursoragent@cursor.com>
Vim %s cannot match newlines between lines; rewrite in Lua and treat
whitespace-only lines as blank so demo.xml-style spacing collapses.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rewrite in Lua like RemoveExtraEmptyLines; treat whitespace-only lines
as blank so demo.xml and similar files do not error.

Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify what UpdateRubyHashesByLines does (syntax normalize, split }, {,
single quotes, re-indent) without changing the original behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend cmdPreservePosition to wrap functions as well as :commands and
use it throughout functions.lua. Add specs for AddLineNumbers,
FormatHashes, FormatJSON, and FormatSQLFormatter.

Co-authored-by: Cursor <cursoragent@cursor.com>
conform.format returns true when formatters run; errors come via the
callback. Fixes false "Format JSON: true" notifications for all
commands using utils.format.run.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep LazyVim's enter preset (arrows, C-n/C-p) and add Vim-friendlier
completion movement keys.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Temporarily enable modifiable for normal file buffers, refuse readonly
and special buftypes with clear errors, and pcall format to avoid stack dumps.

Co-authored-by: Cursor <cursoragent@cursor.com>
@alexesba
alexesba merged commit 7f3aa3f into master Jul 17, 2026
2 checks passed
@alexesba
alexesba deleted the cleanup/config-trim branch July 17, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants