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

How To Configure nixd When Used as a Language Server? #86

Open
SweetCapitan opened this issue Oct 15, 2024 · 3 comments
Open

How To Configure nixd When Used as a Language Server? #86

SweetCapitan opened this issue Oct 15, 2024 · 3 comments

Comments

@SweetCapitan
Copy link

SweetCapitan commented Oct 15, 2024

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?

@JojOatXGME
Copy link
Contributor

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.

@JojOatXGME JojOatXGME changed the title Configuration of Specific Inputs in NixIdea Using nixd How To Configure nixd When Used as a Language Server? Oct 18, 2024
@SweetCapitan
Copy link
Author

SweetCapitan commented Oct 21, 2024

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.

@leo60228
Copy link
Member

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

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

No branches or pull requests

3 participants