nixCats can't find lua files #75
Replies: 10 comments 1 reply
-
Edit: see the end for the most likely problem, but below is some useful info and troubleshooting info nonetheless The error looks to me like you deleted lua/nixCatsUtils from the directory, which the init.lua is then trying to call? That directory has the lazy.nvim wrapper in it. It's an optional addition to make lazy.nvim play nice. If you didn't delete it, you have something not pointing to the correct thing or something silly with git but what I'm not super sure yet. It's hard to tell without more info. It looks to be user error, but I would like to do my due diligence just in case. Which is fine don't worry about it. I'll move this to discussions later if it is just user error so others can learn from it.
but this is not related to your problem. For now, leave it as That option is so that you can set up a version of your config that forgoes being able to be ran from anywhere via Can you provide a bit more info for me to help troubleshoot? What is the output of Also to narrow down some variables, try this. cd into Then run Does it throw still when you do that? What is the output from the output of {
aliases = { "vim" },
collate_grammars = true,
configDirName = "nvim",
disablePythonPath = true,
disablePythonSafePath = false,
extraName = "",
moduleNamespace = { "nvim" },
nixCats_config_location = "/nix/store/4747w9s93kswkwkpgfc67gnydrs69mzb-gdn4rj952ira12mxpbwwdfind49yqmq8-source",
nixCats_packageName = "nvim",
["suffix-LD"] = false,
["suffix-path"] = false,
viAlias = false,
vimAlias = false,
withNodeJs = false,
withPerl = false,
withPython3 = true,
withRuby = true,
wrapRc = true,
<metatable> = {
__call = <function 1>
}
} Copy the path from nixCats_config_location, cd there and make sure it looks as expected The following would navigate you there from within nvim without copy pasting also
Is your config submoduled in some way? Maybe that could be causing an issue? Seems unlikely though because if the ./modules/cli/neovim directory was a submodule that wasnt being fetched, you would think it wouldnt fetch any of it also did you make sure you ran Regardless Id be very surprised if it was related to issue 59. Edit: actually, that last thing about unstaged files sounds most likely. Go to your config. Run |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply. I have checked that I still have both files in |
Beta Was this translation helpful? Give feedback.
-
I ran The same thing happens with |
Beta Was this translation helpful? Give feedback.
-
And you made sure everything is staged? As in, you made sure to run both git add . and nix flake update when you swapped to a different template? Did you go to the store directory indicated by What happens when you cd to Both templates should already have line numbers (relative line numbers, specifically) This is somewhat strange. Again, you made sure that everything was staged in git via |
Beta Was this translation helpful? Give feedback.
-
alright, trying it in my own config with the subflaking like that with the kickstart config. Will see if I can reproduce. I do mine like the nixExpressionFlakeOutputs template so that I dont have to deal with the sometimes needing nix flake update thing. I have seen people successfully do it this way though. |
Beta Was this translation helpful? Give feedback.
-
oof. Ok. So, if you subflake it in that way, its still a separate flake. So, when you update the nvim config, you then need to You only need the git add when adding entierly new files though, as long as the file is tracked it will still reflect updates within the files. It does work though. Im getting a configured nvim. So its definitely user error. But the above process is... somewhat error prone tbh... |
Beta Was this translation helpful? Give feedback.
-
the nixExpressionFlakeOutputs template is literally the following: take the inputs of the flake.nix in the template. Put them in your main flake's inputs. There are only 2, nixpkgs, and nixCats. take the function that was named outputs in the template's flake.nix, and make it the entire file. change the name of flake.nix to default.nix Then you can If the extra |
Beta Was this translation helpful? Give feedback.
-
Running nix flake update nvim-config
nix flake update
home-manager switch --flake .#archlinux now gives Building neovim on its own gives the exact same result. Any way I can think to access the nixExpressionFlakeOutputs home-manager module from my top-level flake (including putting the line you suggested in my modules list) gives I had thought that the main advantage of giving neovim its own flake was to enable it to be built / run without building the whole home-manager config. But your https://github.com/BirdeeHub/birdeeSystems/tree/main/common/birdeevim#readme seems to imply otherwise? I have a Makefile, so I'm not worried about extra typing once I get something that works. |
Beta Was this translation helpful? Give feedback.
-
Well, if
It only copies the config directory into the store with Also nixExpressionsFlakeOutputs template is not imported via flake input, nor is it a module, it's just the outputs function of a flake in its own file. So you call that function, and then the variable holds the same thing the flake input would have. So there's some misunderstanding there, as it shouldn't be looking in your flake registries at all for that. Wait, I just realized. The error about flake:inputs Your main flake.nix should have
Unless, did you use the actual template? My snippet was correct for the instructions I gave to convert, but not the template itself. If so, it actually takes it's argument inside a set like this
The reason for that being that its easier to pass extra stuff in that way if you want, but that's all for you to change to be how you want. It's literally just a function that needs to take the inputs somehow and then returns all the things the flake would have. |
Beta Was this translation helpful? Give feedback.
-
Ah... I had interpreted that precisely the wrong way round. Setting Thanks so much for helping me figure this out. It's a silly error on my part, but I would have taken a lot longer to figure it out on my own. The error about flake:inputs was because I'd added Now it's time for me to begin my proper messing around 😁. |
Beta Was this translation helpful? Give feedback.
-
I ran
nix flake init -t github:BirdeeHub/nixCats-nvim#kickstart-nvim
in./modules/cli/neovim
and addedto
./flake.nix
. This builds without any warnings, but when I runnvim
it gives the following error:I'm fairly new to nix, so I am sorry if this issue is just from me doing something wrong. I am on Arch Linux (not NixOS), in case that makes a difference. The same error occurs when I set
wrapRc = false
.This seems similar to #59, but may not be the same underlying issue.
Beta Was this translation helpful? Give feedback.
All reactions