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

nixd: code actions #466

Open
3 tasks
inclyc opened this issue Apr 26, 2024 · 5 comments
Open
3 tasks

nixd: code actions #466

inclyc opened this issue Apr 26, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@inclyc
Copy link
Member

inclyc commented Apr 26, 2024

  • add undefined variable as top-level formal
  • split an subexpression, with import ./file
  • with ..; let / inherit
@inclyc inclyc added the enhancement New feature or request label Apr 26, 2024
@VTimofeenko
Copy link

VTimofeenko commented Apr 28, 2024

If I may request, a couple more:

  • flatten attrset:

    { foo = { bar = "foz"; } };

    to

    { foo.bar = "foz"; }
  • pack into nested attrset:

    foo.bar = "foz";
    foo.baz = "faz";

    to

    foo = { 
      bar = "foz";
      baz = "faz";
    };

@inclyc
Copy link
Member Author

inclyc commented Apr 28, 2024

Thanks, any more ideas are welcomed!

@LennyLizowzskiy
Copy link

LennyLizowzskiy commented Jun 21, 2024

  • "remove unused definition" for the warning definition X is not used (sema-def-not-used)

@inclyc inclyc pinned this issue Jun 22, 2024
@kpbaks
Copy link

kpbaks commented Oct 15, 2024

I use noogle.dev a lot. A "open in noogle.dev" code action would be neat for any function in the lib attribute set from nixpkgs

@zspher
Copy link

zspher commented Oct 25, 2024

from: https://github.com/oxalica/nil/blob/c8e8ce72442a164d89d3fdeaae0bcc405f8c015a/docs/code_actions.md

  • add_to_top_level_lambda_param
    Add an undefined name to the top-level lambda.
{ foo }: foo + bar

=>

{ foo, bar }: foo + bar
  • quote_attr and unquote_attr
    Rewrite between attribute names and double quoted strings
{ foo = bar; }

<=>

{ "foo" = bar; }

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

5 participants