Skip to content

Refactor/modularize plugin config - #2134

Closed
shounibcspri wants to merge 10 commits into
nvim-lua:masterfrom
shounibcspri:refactor/modularize-plugin-config
Closed

Refactor/modularize plugin config#2134
shounibcspri wants to merge 10 commits into
nvim-lua:masterfrom
shounibcspri:refactor/modularize-plugin-config

Conversation

@shounibcspri

Copy link
Copy Markdown

NOTE
Please verify that the base repository above has the intended destination!
Github by default opens Pull Requests against the parent of a forked repository.
If this is your personal fork and you didn't intend to open a PR for contribution
to the original project then adjust the base repository accordingly.


shounibcspri and others added 10 commits April 7, 2026 11:22
The `{ import = 'custom.plugins' }` line was commented out, so everything
in `lua/custom/plugins/` was dead code. The treesitter-context spec added
there was never installed and its `[c` keymap never existed.

Uncomment the import and add the treesitter-context spec it enables.

Note: `[c` collides with gitsigns' "previous hunk" mapping, which wins in
git-tracked buffers since it is buffer-local. Left as-is intentionally.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Opt in to three of the optional kickstart plugin modules that ship
commented out: indentation guides, the file browser, and the gitsigns
recommended keymaps.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Plugin configuration was split between two inconsistent locations: most
specs inline in init.lua, a few in separate kickstart modules, with no
rule for which went where. init.lua had grown to ~900 lines.

Move each inline spec to its own file under lua/custom/plugins/, picked up
automatically by the custom.plugins import. init.lua now holds only
options, keymaps, autocommands and the lazy bootstrap (~300 lines).

Specs moved verbatim (telescope, lsp, blink-cmp, conform, treesitter,
mini, colorscheme, todo-comments, which-key, guess-indent); no behaviour
changes for those.

gitsigns is the exception: its inline `signs` block is dropped here, so
only the kickstart module's keymaps remain until the next commit restores
the signs config in a single consolidated spec.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
gitsigns was configured in two places: the `signs` gutter symbols inline
in init.lua, and the recommended keymaps in kickstart/plugins/gitsigns.lua.
Understanding or changing one plugin meant reading two files.

Merge both into lua/custom/plugins/gitsigns.lua and drop the kickstart
module, restoring the `signs` config dropped in the previous commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The window width and filtered_items tweaks were made directly in
kickstart/plugins/neo-tree.lua. That file belongs to upstream kickstart,
so local edits there conflict on every `git pull` from upstream.

Move the spec (with those tweaks) to lua/custom/plugins/neo-tree.lua and
drop the kickstart require, leaving the kickstart tree untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Folds come from treesitter queries with an indent fallback, and closed
folds show a line count. `zK` peeks inside a fold, falling back to LSP
hover when the cursor is not on one.

ufo needs foldlevel/foldenable/fillchars set before it loads, so those go
in the spec's `init` rather than init.lua, keeping fold config in one
place. The README's recommended fillchars glyphs need a Nerd Font, so
they are gated on vim.g.have_nerd_font with plain ASCII fallbacks.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds lockfile entries for nvim-ufo and promise-async, plus four plugins
that were installed but previously unpinned: neo-tree, nui,
indent-blankline and nvim-treesitter-context.

Existing pins are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Side effect of running `Lazy! sync` while installing nvim-ufo; `Lazy!
install` would have left these pins alone. Bumps conform, fidget,
gitsigns, mason, mason-lspconfig, mini, nvim-lspconfig, nvim-treesitter,
plenary, telescope and telescope-fzf-native.

Kept as a separate commit so it can be reverted independently of the
config refactor. nvim-treesitter tracks the fast-moving `main` branch and
is the most likely source of surprises here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@shounibcspri
shounibcspri deleted the refactor/modularize-plugin-config branch July 28, 2026 15:26
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