Skip to content
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

[Discussion] modular Nix configuration for neovim #2

Closed
srid opened this issue Apr 15, 2022 · 6 comments
Closed

[Discussion] modular Nix configuration for neovim #2

srid opened this issue Apr 15, 2022 · 6 comments
Milestone

Comments

@srid
Copy link

srid commented Apr 15, 2022

[meta: Perhaps enable Discussions?]

I found a couple of Nix setup for configuring neovim in a modular fashion, and might be of interest to this project:

The idea is that adding plugins and configuring them happen modularly, so you enable a plugin using oneline change.

@edrex
Copy link
Owner

edrex commented Apr 15, 2022

I was aware of https://github.com/pta2002/nixvim via @imMaturana's config but I hadn't seen syberant/nix-neovim, will TAL. I really like the idea of Spacemacs-style "Layers" for editor configuration. If you think about it, the module system used by NixOS, home-manager etc is a generalization of this approach. It allows maximum composability by passing config layers around as data.

@edrex
Copy link
Owner

edrex commented Apr 15, 2022

#3

@edrex edrex added this to the neovim milestone Apr 15, 2022
@srid
Copy link
Author

srid commented Apr 15, 2022

home-manager too does this but only for coc.nvim:

srid/nixos-config@9a64103

It could be improved to do it for other extensions as well, as neovim extensions are in principle no different to programs in home-manager (to be enabled and configured with settings).

[btw, you can convert this issue to a discussion; there should be a button to the right]

@edrex
Copy link
Owner

edrex commented Apr 15, 2022

I want to get away from home-manager, which operates on your whole homedir, in preference to a native flake-based approach to configuration. I think just extracting out the module system stuff into a lib should be fairly easy. It's annoying that there is now the potential for 3 incompatible implementations of a neovim config manager: in NixOS, in HM, and in a flake. Flakes are the future (although I don't expect they will reduce the proliferation of incompatible config frameworks.)

@srid
Copy link
Author

srid commented Apr 16, 2022

FWIW, home-manager kind of has this nix-community/home-manager#2637

srid/nixos-config@88a2024

Would be nice if this got upstreamed to nixpkgs's neovim config.

@edrex
Copy link
Owner

edrex commented Apr 10, 2023

I want to explore editor-integrated workflows in this project, so allowing editor implementation to be swapped out is a non-goal, at least until some nice abstaction can be found (LSP / code actions helps a lot, but doesn't cover everything).

I'm planning to go with helix for main editor in this env, at least at first. I like that it comes with everything to be productive in a single binary, good for bundling. It's missing some features for shell workflow integration though (at a minimum helix-editor/helix#3393 is needed, and I'll be building on that branch until it gets merged).

Emacs might also be bundled behind and orgmode feature flag.

@edrex edrex closed this as completed Apr 10, 2023
@edrex edrex closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2023
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

No branches or pull requests

2 participants