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

Fish has wrong config files inside of Neovim #1

Closed
marcuswhybrow opened this issue Apr 21, 2023 · 1 comment
Closed

Fish has wrong config files inside of Neovim #1

marcuswhybrow opened this issue Apr 21, 2023 · 1 comment
Labels

Comments

@marcuswhybrow
Copy link
Owner

:!mkdir templates
error: can not save universal variables or functions
warning-path: Unable to locate config directory derived from $XDG_CONFIG_HOME: '/nix/store/xabd1qazk33n780qanahmxyqmgb1n83r-neovim-config/fish'.
warning-path: The error was 'Read-only file system'.
warning-path: Please set $XDG_CONFIG_HOME to a directory where you have write access.

When I ask Neovim to run a command in the shell with the :! Neovim command, fish complains it has no write access to it's XDG_CONFIG_HOME. That's correct, because I'm hoisting it to a nix store derivation when Neovim starts up:

https://github.com/marcuswhybrow/.nixos/blob/4d44fa8001dc2dbcfd86a7dc8a70e12f89be1fa1/pkgs/neovim/default.nix#L104-L105

Proposed solution: Add to XDG_CONFIG_DIRS, instead of overriding XDG_CONFIG_HOME.

@marcuswhybrow
Copy link
Owner Author

  • I belive this no longer an issue.
  • These day's I wrap Neovim with -u /path/to/init.lua rather than XDG_CONFIG_... stuf.
  • Before I used to have multiple lua files, and I couldn't figure out how to include them all without using XDG.
  • Now I have a single init.lua with my entire config in one place.

This is how I'm doing it now:
https://github.com/marcuswhybrow/neovim/blob/750f299cf5b63c4e176076e7bf19b7d7d42e2d4e/flake.nix#L137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant