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

[Feature]: Support multiple folders in workspace #15

Open
tbenst opened this issue Dec 6, 2019 · 4 comments
Open

[Feature]: Support multiple folders in workspace #15

tbenst opened this issue Dec 6, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@tbenst
Copy link

tbenst commented Dec 6, 2019

Is your feature request related to a problem? Please describe.
Currently, *.nix files are only found in workspace root. If there are two folders in workspace, no *.nix files are found.

Describe the solution you'd like
I'd like to find any *.nix file in top-level folders

Describe alternatives you've considered
Recursively searching all folders may be useful in some cases, but just searching the root for each folder in workspace is sufficient for my needs.

Additional context
Awesome extension, thanks so much 😄

@tbenst tbenst added the enhancement New feature or request label Dec 6, 2019
@tbenst tbenst changed the title [Feature]: <Short title> [Feature]: Support multiple folders in workspace Dec 6, 2019
@arrterian
Copy link
Owner

arrterian commented Dec 6, 2019

@tbenst Thank you for the issue.
Now, priority for the project is rewriting the codebase to PureScript and bug fixing. I'll keep the issue in our backlog.

Also, I have good news. You can already use the extension for your propose.
All you need is add the following config to your project

{
    "nixEnvSelector.nixShellConfig": "/full/path/to/default.nix"
}

@tbenst
Copy link
Author

tbenst commented Dec 12, 2019

^ this solution works great, thanks! After heavily using nix-env-selector for a few days, I find that I'm copying the same *.nix envs to multiple folders. Perhaps the better feature request is to specify a list of directories for nix-env-selector to search for *.nix files? e.g.

{
    "nixEnvSelector.nixShellDirectories": [ "/folder1" "/folder2" ]
}

That way could customize on both user and workspace level.

@knedlsepp
Copy link

I think this could be fixed by making use of: ${workspaceFolder} instead of the deprecated ${workspaceRoot}:
See: https://code.visualstudio.com/docs/editor/variables-reference#_why-isnt-workspaceroot-documented

@samuela
Copy link
Contributor

samuela commented Aug 24, 2021

I'd also like to suggest the ability to use shell.nix files that are not in the workspace root, but somewhere deeper in the directory structure. I often work in "monorepo" scenarios where the shell.nix file I need to enable is not directly in the workspace root directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants