Skip to content

neovim(lua): Modularize our configuration #2

@d4ilyrun

Description

@d4ilyrun

Current state

In the spirit of #1, our neovim config could use a bit of modularization.

The way my neovim config is currently setup is kind of a workaround working with Nix.
I'm basically just storing the path in a global variable and loading each file using luafile.

This causes problem with my neovim's runtimepath not being set correctly (a hassle when configuring as it causes the LSP to not be able to fetch the packages' parameters).
To be honest I'm not really sure it would fix things but this has been on my todolist for a while now, and modularizing this config would make switching between setups easier.

Solutions

  1. Keeping as is, finding how to fix my lua config
    • Already broke a tooth or two trying, didn't work
    • Not really documented elsewhere (Am I messing up elsewhere ?)
  2. Using the better way to include nvim packages when working with home-manager
    • Cold work, but may not resolve my issues with runtime path not being set correctly
    • The default.nix will get exponentially bigger
    • Not really fitting with "typical" nvim configurations, hence hard to extract later if needed
  3. Use a symlink between .config/nvim and programs/neovim
    • More in the style of the usual neovim configurations

TODO

  • Modularize
    • Use standard lua dirnames (lua, colors, ...)
    • Regroup configs per category instead of package
      • lsp_installer + lsp + ... -> lsp.lua
      • lualine + bufferline + ... -> visual.lua (not sure about this one but you get the idea)
      • ...
    • Add a config module with all our 'common' variables (colors, settings, ...)
    • Make possible to switch easily between configs
  • Improve
    • Fix the runtime !
    • Remove useless packages (starting to get a bit bloated around here)

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions