Skip to content

Not working on NixOS #168

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

Closed
ghost opened this issue Jun 9, 2022 · 11 comments
Closed

Not working on NixOS #168

ghost opened this issue Jun 9, 2022 · 11 comments
Labels
question Question related to integration and other stuff

Comments

@ghost
Copy link

ghost commented Jun 9, 2022

I have no idea why, as I have everything set up correctly. I can post any extra info as needed, but I have no idea where to even begin.

@numToStr
Copy link
Owner

numToStr commented Jun 9, 2022

#115

@ghost
Copy link
Author

ghost commented Jun 9, 2022

My timeoutlen is set to 1000 and it still doesn't work. Should I set it higher?
Edit: :normal gcc doesn't work either.
Edit 2: My config worked perfectly on Arch, but only stopped working once I switched to NixOS.

@ghost
Copy link
Author

ghost commented Jun 9, 2022

On NixOS, you install Neovim plugins via their builtin package manager, Nix. It installs the plugin in the Start or Opt folder depending on if the plugin is lazyloaded or not. However, it installs the plugin as comment.nvim instead of Comment.nvim. Could this change something?

@numToStr
Copy link
Owner

numToStr commented Jun 9, 2022

That, I have no idea. You should ask other people that have similar config as yours.

@ghost
Copy link
Author

ghost commented Jun 9, 2022

Will do. If I find a fix, I'll report back here and share in case anyone else has a similar issue.

@numToStr numToStr added the question Question related to integration and other stuff label Jun 10, 2022
@ghost
Copy link
Author

ghost commented Jun 10, 2022

A fix has been found! I have to run :runtime after/plugin/Comment.lua because :packadd doesn't automatically source the after directory in the opt directory. Someone in the thread called the use of the after directory an abuse, so I'm wondering why that is. What is the after directory used for?
PS: Since I found a working solution, I'll mark this as closed.

@ghost ghost closed this as completed Jun 10, 2022
@numToStr
Copy link
Owner

numToStr commented Jun 10, 2022

A fix has been found! I have to run :runtime after/plugin/Comment.lua because :packadd doesn't automatically source the after directory in the opt directory. Someone in the thread called the use of the after directory an abuse

Hmmm very interesting. I never thought that this might well be an anti-pattern or something. You said you lazyload the plugin, could you try to sync load the plugin? And tell me whether this issue still there or not. As I use packer.nvim and do lazyload. I never faced this issue myself.

so I'm wondering why that is. What is the after directory used for?

I am using it for setting up <Plug> mappings.

@ghost
Copy link
Author

ghost commented Jun 10, 2022

I'm lazyloading the plugin using the native package manager, not Packer.nvim. Packer automatically sources any files in the after directory, but using the :packadd command does not. Due to how NixOS works, using Packer.nvim is not an option. I'm not entirely sure what syncloading is, but automatically loading the plugin works perfectly. The issue only exists when lazyloading with the native package manager.

@numToStr
Copy link
Owner

I got your point and I know there are people using NixOs. So I am willing to change it from after/plugin/Comment.lua to plugin/Comment.lua and I hope that should remove the workaround.

@ghost
Copy link
Author

ghost commented Jun 10, 2022

Once it updates on my end, I'll let you know if it works.

@numToStr
Copy link
Owner

Hi @ObsidianChickenz, you might not need that workaround after 4818a4c :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question related to integration and other stuff
Projects
None yet
Development

No branches or pull requests

1 participant