Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3571520
refactor: trim redundant config and fix HashNewSyntax duplicate
alexesbafh Jun 24, 2026
ae5551a
refactor: lazy-load oil/reprobado and drop duplicate commands
alexesbafh Jun 24, 2026
1f95893
feat: restore :ColorScheme command for Snacks picker
alexesbafh Jun 24, 2026
16bb0ea
feat: restore sql-formatter-cli as FormatSQLFormatter
alexesbafh Jun 24, 2026
2a1a926
feat: route SQL/JSON/XML format commands through conform
alexesbafh Jun 24, 2026
c0e7d2a
feat: format CSS/SCSS via conform Prettier in FormatCss
alexesbafh Jun 24, 2026
2ff581a
refactor: add FormatJSON helper and drop unused bang flag
alexesbafh Jun 24, 2026
1e839f0
refactor: use cmdPreserveCursorPosition in FormatXML preprocess
alexesbafh Jun 24, 2026
21aa2da
refactor: wrap FormatXML in with_tool for python3 check
alexesbafh Jun 24, 2026
9544a50
refactor: clarify RemoveExtraEmptyLines as blank-line collapse
alexesbafh Jun 24, 2026
0bb8686
fix: RemoveExtraEmptyLines collapse across buffer lines
alexesbafh Jun 24, 2026
3d3c5ac
fix: RemoveEmptyLines without g/^$/ pattern-not-found error
alexesbafh Jun 24, 2026
ed0a5ef
docs: document FormatHashes and add FormatHashes command alias
alexesbafh Jun 24, 2026
7f394d8
refactor: preserve_cursor accepts Vim cmds and Lua callbacks
alexesbafh Jun 24, 2026
c62959a
fix: read conform format errors from callback, not return value
alexesbafh Jun 25, 2026
21da64f
feat: map Ctrl-j/Ctrl-k for blink.cmp suggestion navigation
alexesba Jul 14, 2026
9e8e597
chore: track LazyVim sidekick extra in lazyvim.json
alexesba Jul 14, 2026
e6af176
fix: allow conform format when buffer is nomodifiable
alexesba Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ These are added under `lua/plugins/` and are **not** shipped with LazyVim by def
| [vim-bundler](https://github.com/tpope/vim-bundler) | `tpope.lua` | Jump to gems from `Gemfile` (`gf` in Ruby buffers) |
| [asyncrun.vim](https://github.com/skywind3000/asyncrun.vim) | `reprobado.lua` | Background jobs for `:Reprobado` / `:Reprobada` audio |
| [vim-fetch](https://github.com/kopischke/vim-fetch) | `vim-fetch.lua` | Preserve file cursor position across reloads |
| [sonokai](https://github.com/sainnhe/sonokai) | `sonokai.lua` | Extra colorscheme (lazy-loaded; pick via Snacks or `:colorscheme`) |
| [clipring.nvim](https://github.com/alexesba/clipring.nvim) | `clipring.lua` | Persistent yank/clipboard history ring |

#### oil.nvim
Expand Down Expand Up @@ -141,29 +140,24 @@ These are added under `lua/plugins/` and are **not** shipped with LazyVim by def
#### reprobado (local audio commands)

- `:Reprobado` / `:Reprobada` play Ogg files from `sounds/` via `ogg123` and [asyncrun.vim](https://github.com/skywind3000/asyncrun.vim).
- Logic lives in `lua/reprobado/init.lua`; lazy spec in `lua/plugins/reprobado.lua`.
- Depends on [asyncrun.vim](https://github.com/skywind3000/asyncrun.vim) and a local `vorbis-tools` meta-spec (same file) that installs `ogg123` when missing (Homebrew / apt / pacman / dnf / zypper).
- Keymaps (`<leader>no` / `<leader>na`) stay in `lua/config/keymaps.lua`.
- Logic lives in `lua/reprobado/init.lua`; lazy spec in `lua/plugins/reprobado.lua` (loads on command or `<leader>no` / `<leader>na`).
- Depends on [asyncrun.vim](https://github.com/skywind3000/asyncrun.vim); installs `ogg123` when missing (Homebrew / apt / pacman / dnf / zypper).

#### clipring.nvim

- `<leader>yh` opens the yank history picker.
- Ring is persisted across sessions (`persist = true`, up to 100 entries).

#### sonokai

- Not loaded until selected; install list includes it in `lua/config/lazy.lua` for `:colorscheme sonokai` or the Snacks colorscheme picker.

### LazyVim overrides (tweaks, not new plugins)

| File | What it changes |
| --- | --- |
| `snaks.lua` | Disables Snacks file explorer (Oil is used instead); custom Snacks picker keys (`<leader>fg`, `<leader>fk`) |
| `noice.lua` | Rounded LSP hover borders only; cmdline/messages/popupmenu stay on Vim defaults |
| `conform.lua` | Custom SQL/JSON/XML formatters; Prettier for CSS/SCSS; `<leader>cf` uses defaults per filetype |
| `lsp.lua` | Disables diagnostic virtual text (float on `CursorHold` in `autocmds.lua`) |
| `autosave-colorscheme.lua` | Saves/restores last colorscheme via [autosave-colorscheme.nvim](https://github.com/alexesba/autosave-colorscheme.nvim) |
| `disabled.lua` | Turns off `bufferline.nvim`, `neo-tree.nvim`, `mini.files` |
| `nvin-web-devicons.lua` | Ensures devicons are lazy-loaded (dependency for Oil, luatab) |

### Disabled LazyVim plugins

Expand Down Expand Up @@ -207,7 +201,7 @@ Press `<leader>` and wait for which-key for the full list.
### Colorschemes

1. `<leader>uC` or `:ColorScheme` — pick a theme in Snacks (live preview, works on empty buffers).
2. Or `:colorscheme <name>` (e.g. `sonokai`, `tokyonight`).
2. Or `:colorscheme <name>` (e.g. `tokyonight`).
3. Restart Neovim — your last theme is restored automatically.

To reset persistence:
Expand Down Expand Up @@ -264,7 +258,7 @@ Restart Neovim after structural config changes (lazy.nvim does not fully reload

### Custom commands (`:command`)

Formatting and cleanup: `FormatJSON`, `FormatJSONV2`, `FormatCss`, `FormatSQL`, `FormatSQLV2`, `FormatXML`, `RemoveEmptyLines`, `RemoveExtraEmptyLines`, `CleanWhiteSpaces`, `ConvertTabToSpaces`, `AddLineNumbers`, `RemoveLineBreak`
Formatting and cleanup: `FormatJSON`, `FormatCss`, `FormatSQL`, `FormatSQLFormatter` (`FormatSQLV2` alias), `FormatXML`, `RemoveEmptyLines`, `RemoveExtraEmptyLines`, `CleanWhiteSpaces`, `ConvertTabToSpaces`, `AddLineNumbers`, `RemoveLineBreak` — SQL/JSON/XML/CSS use [conform.nvim](https://github.com/stevearc/conform.nvim) (same engines as `<leader>cf` for those filetypes)

Quotes / Ruby: `DoubleQuotes`, `SingleQuotes`, `DoubleQuotesC`, `SingleQuotesC`, `HashNewSyntax`, `HashOldSyntax`, `UpdateRubyHashesByLines`, `UnscapeDoubleQuotes`

Expand Down
1 change: 1 addition & 0 deletions lazyvim.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extras": [
"lazyvim.plugins.extras.ai.copilot",
"lazyvim.plugins.extras.ai.copilot-chat",
"lazyvim.plugins.extras.ai.sidekick",
"lazyvim.plugins.extras.coding.mini-surround"
],
"install_version": 8,
Expand Down
40 changes: 21 additions & 19 deletions lua/config/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,30 @@
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")

require("utils.functions")
vim.api.nvim_create_user_command("FormatJSON", function()
if require("utils.require_tool").ensure("python3") then
vim.cmd("%!python3 -m json.tool")
end
end, { bang = true, desc = "Format json files with python" })

vim.api.nvim_create_user_command("FormatJSONV2", function()
if require("utils.require_tool").ensure("underscore") then
vim.cmd("%!underscore print --outfmt json")
end
end, { bang = true, desc = "Format json files using underline-cli" })
vim.api.nvim_create_user_command("FormatJSON", FormatJSON, { desc = "Format json files with python" })

vim.api.nvim_create_user_command("FormatCss", FormatCss, { desc = "Format css using regex" })
vim.api.nvim_create_user_command("FormatCss", FormatCss, { desc = "Format CSS/SCSS with Prettier" })

vim.api.nvim_create_user_command("RemoveExtraEmptyLines", RemoveExtraEmptyLines, { desc = "Remove extra empty lines" })
vim.api.nvim_create_user_command("RemoveExtraEmptyLines", RemoveExtraEmptyLines, {
desc = "Collapse multiple blank lines to one between functions/blocks",
})

vim.api.nvim_create_user_command("AddLineNumbers", AddLineNumbers, { desc = "Add number for the entire file" })

vim.api.nvim_create_user_command("ConvertTabToSpaces", ConvertTabToSpaces, { desc = "Convert Tab to spaces" })

vim.api.nvim_create_user_command("RemoveEmptyLines", RemoveEmptyLines, { desc = "Remove Empty Lines" })
vim.api.nvim_create_user_command("RemoveEmptyLines", RemoveEmptyLines, {
desc = "Remove all blank lines (including whitespace-only)",
})

vim.api.nvim_create_user_command("FormatSQL", FormatSQL, { desc = "Format SQL files using sqlformat" })
vim.api.nvim_create_user_command("FormatSQL", FormatSQL, { desc = "Format SQL with sqlformat (sqlparse)" })

vim.api.nvim_create_user_command("FormatSQLV2", FormatSQLV2, { desc = "Format SQL using sql-formatter-cli" })
vim.api.nvim_create_user_command("FormatSQLFormatter", FormatSQLFormatter, {
desc = "Format SQL with sql-formatter-cli (npm)",
})
vim.api.nvim_create_user_command("FormatSQLV2", FormatSQLFormatter, {
desc = "Alias for FormatSQLFormatter (sql-formatter-cli)",
})

local function copy_to_clipboard(path, title)
if path == "" then
Expand Down Expand Up @@ -81,13 +80,16 @@ vim.api.nvim_create_user_command(
{ desc = "Replace double quotes with single quotes with confirmation" }
)

vim.api.nvim_create_user_command("UpdateRubyHashesByLines", FormatHashes, { desc = "Update ruby hashes by lines" })
vim.api.nvim_create_user_command("UpdateRubyHashesByLines", FormatHashes, {
desc = "Normalize Ruby hashes: rocket→new syntax, split }, {, single quotes, re-indent",
})
vim.api.nvim_create_user_command("FormatHashes", FormatHashes, {
desc = "Alias for UpdateRubyHashesByLines",
})

vim.api.nvim_create_user_command("HashNewSyntax", HashNewSyntax, { desc = "update hash old to new syntax" })
vim.api.nvim_create_user_command("HashOldSyntax", HashOldSyntax, { desc = "update hash new to old syntax" })

vim.api.nvim_create_user_command("HashNewSyntax", HashOldSyntax, { desc = "update hash syntax" })

vim.api.nvim_create_user_command("CleanWhiteSpaces", CleanWhiteSpaces, { desc = "Clean White spaces" })

vim.api.nvim_create_user_command("UnscapeDoubleQuotes", UnscapeDoubleQuotes, { desc = "unscape double quotes" })
Expand Down
9 changes: 0 additions & 9 deletions lua/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ map("n", "<leader>8", ":tabn 8<cr>", { noremap = true, silent = true })
map("n", "<leader>9", ":tabn 9<cr>", { noremap = true, silent = true })
map("n", "<leader>0", ":tabn 0<cr>", { noremap = true, silent = true })

map("n", "<leader>no", [[<cmd>lua require("reprobado").play("Reprobado.ogg")<cr>]], {
silent = true,
desc = "Play Reprobado",
})
map("n", "<leader>na", [[<cmd>lua require("reprobado").play("Reprobada.ogg")<cr>]], {
silent = true,
desc = "Play Reprobada",
})

-- Remove newbie crutches in Normal Mode
map("n", "<Down>", "<Nop>")
map("n", "<Left>", "<Nop>")
Expand Down
2 changes: 1 addition & 1 deletion lua/config/lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require("lazy").setup({
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax", "sonokai" } },
install = { colorscheme = { "tokyonight" } },
checker = {
enabled = true, -- check for plugin updates periodically
notify = false, -- notify on update
Expand Down
51 changes: 5 additions & 46 deletions lua/config/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,21 @@
-- Personal overrides: lua/config/options.local.lua (gitignored; see options.local.lua.example)
local load_local = require("utils.local").load
local set = vim.opt

vim.o.winborder = "rounded"
set.number = true
set.relativenumber = true
set.cp = false
set.hidden = true
set.expandtab = true
set.backup = false
set.wrap = false
set.writebackup = false
set.autoindent = true
set.hlsearch = true
set.incsearch = true
set.showmatch = true
set.backspace = { "indent", "eol", "start" }
set.laststatus = 2
set.ruler = true
set.colorcolumn = "81"
set.listchars = {
eol = "$",
extends = ">",
precedes = "<",
tab = ">-",
trail = "~",
}
set.swapfile = false
set.synmaxcol = 150
set.cursorline = true
set.signcolumn = "yes"
set.termguicolors = true
set.colorcolumn = "81"
set.updatetime = 100
set.diffopt:append({ "vertical" })
set.list = false
set.updatetime = 500 -- ms before CursorHold fires (affects diagnostic float speed)

vim.g.mapleader = ","
vim.g.maplocalleader = "\\"

Expand All @@ -43,29 +27,4 @@ vim.g.table_mode_corner = "+"
vim.g.enable_italic_font = 1
vim.inccommand = "nosplit"

set.wildignore:append({
"blue.vim",
"darkblue.vim",
"default.vim",
"delek.vim",
"desert.vim",
"elflord.vim",
"evening.vim",
"industry.vim",
"koehler.vim",
"morning.vim",
"murphy.vim",
"pablo.vim",
"peachpuff.vim",
"ron.vim",
"shine.vim",
"slate.vim",
"torte.vim",
"zellner.vim",
})

set.list = false
set.updatetime = 500 -- ms before CursorHold fires (affects diagnostic float speed)
-- set.cmdheight=0

load_local("options")
12 changes: 12 additions & 0 deletions lua/plugins/blink.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
return {
{
"saghen/blink.cmp",
opts = {
keymap = {
-- Keep LazyVim preset ("enter"): <Up>/<Down>, <C-n>/<C-p>, <CR>, etc.
["<C-j>"] = { "select_next", "fallback" },
["<C-k>"] = { "select_prev", "fallback" },
},
},
},
}
36 changes: 36 additions & 0 deletions lua/plugins/conform.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
return {
{
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
sql = { "sqlformat", stop_after_first = true },
json = { "json_tool" },
xml = { "xml_minidom" },
css = { "prettier", stop_after_first = true },
scss = { "prettier", stop_after_first = true },
less = { "prettier" },
sass = { "prettier" },
},
formatters = {
sqlformat = {
command = "sqlformat",
args = { "--reindent", "--keywords", "upper", "--identifiers", "lower", "-" },
},
sql_formatter_cli = {
command = "sql-formatter-cli",
},
json_tool = {
command = "python3",
args = { "-m", "json.tool" },
},
xml_minidom = {
command = "python3",
args = {
"-c",
"import xml.dom.minidom, sys; print(xml.dom.minidom.parse(sys.stdin).toprettyxml())",
},
},
},
},
},
}
4 changes: 0 additions & 4 deletions lua/plugins/nvin-web-devicons.lua

This file was deleted.

5 changes: 2 additions & 3 deletions lua/plugins/oil.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
return {
"stevearc/oil.nvim",
lazy = false,
lazy = true,
opts = {
default_file_explorer = true,
},
-- Optional dependencies
dependencies = { "nvim-web-devicons" },
cmd = { "Exp", "Explore", "Explorer" },
cmd = { "Exp", "Explore", "Explorer", "Oil" },
keys = {
{
"-",
Expand Down
31 changes: 20 additions & 11 deletions lua/plugins/reprobado.lua
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
-- Local reprobado commands (:Reprobado / :Reprobada). Keymaps live in lua/config/keymaps.lua.
-- Local reprobado commands (:Reprobado / :Reprobada).
return {
{
dir = vim.fn.stdpath("config"),
name = "vorbis-tools",
lazy = false,
config = function()
require("reprobado").ensure_player()
end,
},
{
dir = vim.fn.stdpath("config"),
name = "reprobado",
lazy = false,
lazy = true,
cmd = { "Reprobado", "Reprobada" },
keys = {
{
"<leader>no",
function()
require("reprobado").play("Reprobado.ogg")
end,
desc = "Play Reprobado",
},
{
"<leader>na",
function()
require("reprobado").play("Reprobada.ogg")
end,
desc = "Play Reprobada",
},
},
dependencies = {
"skywind3000/asyncrun.vim",
"vorbis-tools",
},
config = function()
require("reprobado").ensure_player()
require("reprobado").setup()
require("reprobado").setup_commands()
end,
Expand Down
6 changes: 0 additions & 6 deletions lua/plugins/sonokai.lua

This file was deleted.

27 changes: 22 additions & 5 deletions lua/utils/cmdPreservePosition.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
local function cmdPreserveCursorPosition(cmd)
local save_cursor = vim.fn.getpos(".")
vim.cmd(cmd)
vim.fn.setpos(".", save_cursor)
local M = {}

--- Run a Vim command or Lua function, then restore the cursor position.
---@param action string|function
---@param ... any Arguments passed when action is a function
---@return ... Return values from action when it is a function
function M.with_cursor(action, ...)
local pos = vim.fn.getpos(".")
if type(action) == "function" then
local ret = { action(...) }
vim.fn.setpos(".", pos)
return unpack(ret, 1, ret.n)
end
vim.cmd(action)
vim.fn.setpos(".", pos)
end

return cmdPreserveCursorPosition
setmetatable(M, {
__call = function(_, action, ...)
return M.with_cursor(action, ...)
end,
})

return M
Loading
Loading