Skip to content

refactor: separate plugins and settings into modular structure#1904

Closed
Henrik-Wik wants to merge 1 commit intonvim-lua:masterfrom
Henrik-Wik:refactor/separate-plugins
Closed

refactor: separate plugins and settings into modular structure#1904
Henrik-Wik wants to merge 1 commit intonvim-lua:masterfrom
Henrik-Wik:refactor/separate-plugins

Conversation

@Henrik-Wik
Copy link

Summary

  • Extract vim settings to plugin/options.lua
  • Extract keymaps and autocmds to plugin/keymaps.lua
  • Extract plugin specs into lua/plugins/ (one file per plugin)
  • Simplify init.lua to just bootstrap lazy.nvim with import
  • Follow tjdevries/config.nvim structure

Changes

  • Added plugin/options.lua - vim settings (leader, clipboard, ui options)
  • Added plugin/keymaps.lua - global keymaps and diagnostic config
  • Added lua/plugins/ - 13 plugin spec files extracted from init.lua
  • Simplified init.lua (~30 lines) - only bootstraps lazy.nvim

Structure

init.lua                    (root - bootstraps lazy.nvim)
plugin/                     (auto-loaded by Neovim)
├── options.lua
├── keymaps.lua
lua/plugins/                (lazy.nvim plugin specs)
├── init.lua
├── lsp.lua
├── telescope.lua
├── completion.lua
├── formatting.lua
├── treesitter.lua
├── colorscheme.lua
├── mini.lua
├── gitsigns.lua
├── oil.lua
├── which-key.lua
├── todo-comments.lua
└── guess-indent.lua
- Extract vim settings to plugin/options.lua
- Extract keymaps and autocmds to plugin/keymaps.lua
- Extract plugin specs into lua/plugins/ (one file per plugin)
- Simplify init.lua to just bootstrap lazy.nvim with import
- Follow tjdevries/config.nvim structure
@szechp
Copy link
Contributor

szechp commented Feb 26, 2026

you do know of the existence of https://github.com/dam9000/kickstart-modular.nvim, right?

@Henrik-Wik
Copy link
Author

Oh no I didn't haha, thanks! I meant to create this PR on my personal fork ofc, but I had forgotten to change the remote 😅

@Henrik-Wik Henrik-Wik closed this Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants