How To Configure `nixd` When Used as a Language Server?
The nixd tool, as outlined in its configuration doc supports specifying inputs from sources like flakes, nixpkgs, and others. However, it's not clear how to configure these specific inputs within the NixIdea environment.
Could you provide guidance on setting up specific inputs in NixIdea? Additionally, are there any plans to enhance nixd integration within NixIdea to simplify this configuration?
Hi, thanks for creating the issue. I am always happy to get feedback.
Could you provide guidance on setting up specific inputs in NixIdea?
I am not actually that familiar with nixd or language servers. I would first need to research how this configuration is working myself.
nixd accept language server protocol specified workspace/configuration to fetch config file. So the location of configuration file basically determined by your editor setup. — configuration.md
This sounds like we have to somehow send the path of the configuration file to the Language Server from within the plugin. If there is no other solution to specify the configuration file, we might have to implement this as a new features within this plugin.
Additionally, are there any plans to enhance nixd integration within NixIdea to simplify this configuration?
There have not been any specific plans about this topic, but I think it might be worth to take a closer look. If you have specific ideas or some experience about how this works on a technical level, feel free to share your thoughts here.
If you have specific ideas or some experience about how this works on a technical level, feel free to share your thoughts here.
I think nixd recieve settins from initialize request. Its take it from one of given workspaceFolder or take directy in initializationOptions. Both approach consume this json schema i guess.
nixd appears to have an undocumented -config CLI option used for tests: https://github.com/nix-community/nixd/blob/main/nixd/tools/nixd/test/format/format.md