File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
plugins/by-name/haskell-tools Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,15 @@ lib.nixvim.plugins.mkNeovimPlugin {
1818 hlsPackage = lib . mkPackageOption pkgs "haskell-language-server" {
1919 nullable = true ;
2020 } ;
21+ hlsPackageFallback = lib . mkOption {
22+ type = lib . types . bool ;
23+ default = true ;
24+ description = ''
25+ When enabled, hls will be added to the end of the `PATH` _(suffix)_ instead of the beginning _(prefix)_.
26+
27+ This can be useful if you want local versions of hls (e.g. from a devshell) to override the Nixvim version.
28+ '' ;
29+ } ;
2130 } ;
2231
2332 settingsExample = {
@@ -43,7 +52,8 @@ lib.nixvim.plugins.mkNeovimPlugin {
4352
4453 extraConfig = cfg : {
4554 globals . haskell_tools = cfg . settings ;
46- extraPackages = [ cfg . hlsPackage ] ;
55+ extraPackages = lib . optionals ( ! cfg . hlsPackageFallback ) [ cfg . hlsPackage ] ;
56+ extraPackagesAfter = lib . optionals cfg . hlsPackageFallback [ cfg . hlsPackage ] ;
4757
4858 plugins . telescope . enabledExtensions = lib . mkIf cfg . enableTelescope [ "ht" ] ;
4959 assertions = lib . nixvim . mkAssertions "plugins.haskell-tools" {
You can’t perform that action at this time.
0 commit comments