Comments (6)
That's cool. Let me know when you finish the rewrite. I can help with implementing this feature.
from nix-env-selector.
@jul1u5 Hi, thank you for the enhancement proposal.
In the current feature request, I found a couple of reasonable ideas for the further evolution of the extension.
- Finding and autocompletion packages from
nixpkgs
by separate command - Ability to generate an environment for particular workspace in fly with a couple of commands
Staff that should be considered implemented another way
I think it's no so good idea to save a list of configured packages in .vscode
workspace setting file. The reason is duplication places where the packages can be listed. Will better to generate <config>.nix
file as output for the command if not exist yet and modify existed when the package list should be updated.
PS: Appreciate your feedback and welcome to the discussion 🙂
from nix-env-selector.
Hi, @arrterian, sorry for the delay.
I have given some thought to your idea of generating some <config>.nix
file instead of putting the list of packages in .vscode/settings.json
file. Single-source of truth seems more desirable. However, I have thought of some edge-cases:
Suppose a project already contains a shell.nix
file.
- Should the command figure out where to put the dependency in the file all by itself? That seems quite complicated, because, for instance, there could be
buildInputs
,buildNativeInputs
lists specified in the file. - Perhaps VS Code could parse
shell.nix
file and add the package tobuildInputs
list by default. If there is nobuildInputs
specified, the command could show a warning. However, implementing the parser for the Nix language would complicate the project a lot, wouldn't it?
Just for reference when using, for example, nix-shell -p tree
the shell will ignore any .nix
files in the directory, and only load tree
together with the current user environment.
Maybe it wouldn't be that bad to put the package list in the .vscode
directory? The user could still see where the packages are loaded from when using Select Environment
command. If some file like shell.nix
is already selected (instead of an internal environment in .vscode
dir), the command for adding packages would refuse to add them and display a warning.
What are your thoughts?
from nix-env-selector.
@jul1u5 I think the way storing packages for nix-shell -p
in .vscode/settings.json
is most comfortable and fast to implement.
For now, I am rewriting the extension to Purescript. It reasonable to proceed with adding new features after the rewriting process will end.
from nix-env-selector.
This should be doable via devshell's toml file.
from nix-env-selector.
Added in #44
Released in v1.0.0
Please, read CHANGELOG.md for more info.
from nix-env-selector.
Related Issues (20)
- Stuck applying environment HOT 12
- Rustup packages as settings packages HOT 3
- Have the extension output logs in the Output window HOT 4
- Can't make my fhs env work HOT 1
- shell.nix exetubables don't seem to be made available after selecting shell.nix HOT 1
- [Feature]: Support shell.nix files outside of the project directory
- [BUG] Extension don't add package to PATH variable, when some active tabs need any package from shell.nix HOT 4
- "command 'nixEnvSelector.selectEnv' not found" HOT 1
- [Feature]: Support multiroot workspace HOT 2
- C/C++ Support: Can this be used to help generate the c_cpp_properties.json configuration file?
- [Documentation]: Document what `Hit environment` means
- [Feature]: Remember nix environment answer
- [Feature]: VSCode-Remote (SSH) support? HOT 6
- No longer applies shell.nix to integrated terminal? HOT 2
- Extension Development Host does not launch
- Can find packages from nix-shell, but not with nix-env-selector HOT 3
- TypeError when applying nix environment in Remote SSH HOT 3
- [Feature]: VSCodium support HOT 1
- Latest Pylance update brakes python environment HOT 1
- nix-env-selector does not work with flakes HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix-env-selector.