nix-community / nixd

Nix language server, based on nix libraries [maintainer=@inclyc,@Aleksanaa]
https://github.com/nix-community/nixd
GNU Lesser General Public License v3.0
923 stars 31 forks source link

nixd/Controller: Conditionally include devenv option support by default #584

Closed k3yss closed 1 month ago

k3yss commented 3 months ago

This PR adds default support for devenv.sh with the nixd LSP, eliminating the need for manual configuration. This enhancement makes devenv more intuitive and is likely to promote wider adoption of nixd, devenv, and Nix in general. Specifically this PR does the following things: 1: Fetch devenv's option using the devenv-module-options from the flake at https://github.com/cachix/devenv 2: Checks whether the devenv executable is present, if it is not it won't include the worker for options. 3: Loads the LSP in case of devenv executable being present.

Requires: https://github.com/cachix/devenv/pull/1390 to be merged