Allow nushell parameter --include-path/-I
to be used as expected
#12912
Labels
enhancement
New feature or request
--include-path/-I
to be used as expected
#12912
Related problem
Currently, the
-I
/--include-path
parameter is used for the vscode lsp integration. I may be helpful to allow others to use this functionality outside of the lsp. This is a known issue and I'm sure there is at least one issue opened up on it. My response to those issues was it was never designed to be used that way, but having thought more about it, I'm not sure why it couldn't be used that way.Describe the solution you'd like
From my research, I've deduced that NU_LIB_DIRS is initially set around line 82 of main.rs. Then, around like 244, if it's specified as a parameter that originally setting is overwritten (this is where the lsp functionality is). Finally, if it's read out of the env.nu, or a specified env.nu, both those values are overwritten.
Seems like it would be appropriate to append these entries to the NU_LIB_DIRS env var and de-dupe them so the running environment of NU_LIB_DIRS could be specified on the command line and used for that session.
Describe alternatives you've considered
Seems like we need one function somewhere that can be reused in the several places that NU_LIB_DIRS is built. I started working on it but lost passion for this feature. I'm not sure this is right but this is the direction I was going.
Additional context and details
No response
The text was updated successfully, but these errors were encountered: