From 189f23bef96db27c49a09b522739dfe0da2a27e7 Mon Sep 17 00:00:00 2001 From: Alejandro Cabeza Romero Date: Fri, 3 Apr 2026 12:56:14 +0200 Subject: [PATCH] Add nix + ide integration documentation. --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index edb9259..c758682 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,25 @@ This will reduce friction when working on the project. * Use `nix build` to build the package * Use `nix run` to launch the module-viewer and check your module loads properly * Use `nix develop` to setup your IDE + +### Troubleshooting + +#### Nix + IDE Integration +If your IDE reports that a file doesn't belong to the project or that files cannot be found, the CMake cache +is likely missing the Nix-provided paths. This happens when the IDE runs CMake on its own, outside the Nix +environment, leaving the required paths empty. + +To fix it: + +1. **Regenerate the cache from within the Nix shell** + + This provides the required Nix paths and writes them into `build/CMakeCache.txt`: + ```bash + nix develop -c just configure + ``` + +2. **Reload the CMake project without resetting the cache** + + If on RustRover: Open the CMake tool window (**View → Tool Windows → CMake**) and click the **Reload** button (↺) in the toolbar. + +> Resetting the cache would wipe the paths you just wrote, so make sure to reload only.