Comments (5)
Should be fixed in 6f33bad and 7b0af65, although indentation is still hackish
from nix-editor.
This still seems to be an issue. Querying for values inside the lambda works as expected, but the traversal for writing doesn't seem to use the same logic.
$ cat test.nix
{
outputs = inputs: inputs.d {
a.b = {};
};
}
$ nix-editor test.nix outputs.a
{ b = { }; }
$ nix-editor test.nix outputs.a.b -v 1
{
outputs = inputs: inputs.d {
a.b = {};
};
outputs.a.b = 1;
}
$ nix-editor test.nix outputs.a.c -v 1
{
outputs = inputs: inputs.d {
a.b = {};
};
outputs.a.c = 1;
}
from nix-editor.
Latest changes (ab2a7e9):
nix-editor test.nix outputs.a.b -v '{v=1;}'
{
outputs = inputs: inputs.d {
a.b = {};
};
outputs.a.b = {v=1;};
}
and
nix-editor test.nix outputs.a.b -v 'true'
{
outputs = inputs: inputs.d {
a.b = {};
a.b = true;
};
}
from nix-editor.
Hm yeah, that seems to have to do with the way attribute sets are handled differently than values
from nix-editor.
work-around with an empty flake
nix-editor test.nix outputs.a.b -v 'rec {c=1;}'
{
outputs = inputs: inputs.d {
a.b = rec {c=1;};
};
}
This seems to bypass the "{" detection logic.
from nix-editor.
Related Issues (14)
- Switch argument parsing to clap
- Add support for nix flakes
- multiple updates HOT 1
- Handle imports recursively
- dont add newline on print HOT 1
- edit file in-place
- read input from stdin or fd special file HOT 1
- interface could be better - similar to jq HOT 3
- Add documentation to public functions HOT 6
- Update to latest rnix version
- error: attribute 'defaultApp.x86_64-linux' should have type 'derivation' HOT 2
- [Suggestion] Make documentation about its usage
- formatting using alejandra
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-editor.