Skip to content

Comments

refactor: separate plugins and settings into modular structure#1902

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#1902
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
@Henrik-Wik Henrik-Wik closed this Feb 24, 2026
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.

1 participant