-
Notifications
You must be signed in to change notification settings - Fork 628
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
Support for the Nix expression language (Nix / NixOS) #261
Comments
Nix itself parses the language - it uses standard parsing and lexing tools https://github.com/NixOS/nix/tree/master/src/libexpr (probably most useful in context of this issue). Then I know about some stuff in haskell https://github.com/peti/language-nix, and there are syntax highlighters for various editors (or highlighting libraries). |
As an initial version, a regular expression based implementation is o.k; it is always better than nothing. However, if nix implementation has real parser, why don't you utilize it? My xmcd is for you. |
Hi, what's the status of this issue? |
A pull request is welcome. |
If anyone wants a Nix ctags implementation, I wrote one in my tool here: https://github.com/lf-/nix-doc It's Rust so not possible to integrate here though. |
fwiw this has been working for me, just drop this into
|
Why don't you make a pull request to integrate it into ctags? |
Well I'm not very good at C, but I could give it the old college try |
NO. You don't have to use C. See 599cc35 as an example. Though it includes .c file but it is translated from .ctags from optlib2c. Let me know if you want to integrate your .ctags into Universal Ctags. |
Okay, I will try and follow the PkgConfig example tonight |
I got it started here #4020 Will continue work on it tomorrow. But I think I'm moving in the right direction. |
Description: https://nixos.org/nix/manual/#ch-expression-language
There is some very basic config in https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/misc/ctags/wrapped.nix:
I have (hopefully) improved this a bit locally:
But it's still too basic and would need a separate parser probably.
I am new to Nix/NixOS myself, and have therefore not much knowledge
about this language myself.
The text was updated successfully, but these errors were encountered: