-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NixVim improvents! #114
Comments
#115 solves the
item. |
Oops, thanks for reminding me |
What about automated tests, just to make sure that nixvim can build the configuration for all plugins. This would require something like github actions (or circleci which i can see is used) to run the tests. And then a simple test configuration for each module. The test files could just be called something like The tests can also be run by contributors to verify that the module works as expected. I think this would greatly improve the review process and make it easier for contributors to catch their errors. |
Another improvement could be adding something like devenv and adding a pre commit hook to a formatter (rnix-lsp for example), so that it is okay if we forget to format before committing. |
I quite like the idea of automated tests. I had thought about it, but I haven't really figured out how to do it. I assume there are ways though, will have to look into it. Will add to the list! |
I also really like the idea of the pre-commit hook! Will look into devenv. |
Any thoughts on how lazy loading could be implemented? |
Hmm I am not really sure. Obviously, we could look at how lazy nvim does it and try to replicate the same. |
Aren't those two now solved ? |
Oh yes they are done! will mark them as done, kinda forgot about this issue |
With @GaetanLepage on this one - basically just look at how lazy nvim does it, and implement that. It's not necessarily simple but it shouldn't be too hard. |
I'm probably not the best person to work on this as I'm fairly new to nix and haven't messed much with lua plugins either. I also don't have much time to dedicate atm. But I've had a quick look through lazy.nvim... Lazy.nvim actually completely disables vim's plugin loading system and re-implements it itself to gain full control of the process. I don't think disabling NeoVim's plugin loading is neccessary to lazy load plugins if we can avoid adding them to the If we can manage that, then NixVim just needs to add handlers for each lazy-loaded plugin's keybinds/commands/trigger events. These handlers would add the plugin to the Does neovim-wrapper currently support not adding a plugin to the Overview of lazy.nvim's plugin loading system:lazy.nvim's entrypoint is the In
Finally,
First the configured plugins are loaded, looping over Next Finally, |
Wow ! Thank you very much @MattSturgeon for this detailed description of the working of lazy.nvim. I am opening a new issue to track this development: #421 |
Could we also look into better lua integration? I'm not sure if this is even possible in nix but directly writing lua would be ideal. |
@Bodleum I don't think this is something nixvim itself can handle, but if you are using nvim-treesitter to highlight your nix files, you can mark strings as lua by annotating them with a comment: someValue = /* lua */ ''
function() --[[ lua code ]] end
''; |
This would get you highlighting, but not all the LSP niceties. |
What if there were two ways of configuring a plugin with nixvim:
Each package could come with an option to configure with lua, which you can pass in a lua file path and nixvim will use the configuration there to configure the plugin. I'm envisaging something like how lazy.nvim does it, A table with the plugin name, opts, config, etc. Maybe even compatibility is possible? I think this would reduce the "double-configuring" feel as well. This is something I'd be willing and keen to work on, with a bit of assistance! |
You could always use |
There is kinda allready a way using |
Hey i am pretty interested on the documentation command in vim you just do vim,command so what if nixvim had a command that loads a man page like how neovim does it already. |
There's not many outstanding items on this issue, and its scope is rather broad. I think we can close this now? I'm not sure "support defining keybinds in every plugin" is an achievable goal. "Better, per-module documentation" is rather vague. Is this meaning the platform wrapper modules? How do we define better? "Allow lazy-loading of plugins" is already tracked in #421 "Have some form of in-editor documentation (e.g., a :NixVim command which shows a page showing currently enabled options and documentation)" has been opened as #1706 All other items are marked as complete. |
This serves as a tracking issue for all planned improvements to be made to NixVim.
Documentation
Features
package
option for every plugin (Addpackage
options for plugins #58)which-key
- can use themaps
option to automatically populate itextraConfigLua
andextraConfigVim
are fine, but I'd really like to be able to set per-plugin options for this eventually)vim.keybind.set
to define mappingsThe text was updated successfully, but these errors were encountered: