Skip to content

Support Language injections #81

@cottand

Description

@cottand

I would love support for language injections. I think there is value for this in Nix specificially, because in NixOS and Nix derivations we deal with other languages inside Nix strings quite often (bash in derivations, TOML and YAML in configs...).

I think there are two steps to this:

  1. Support the 'inject language here' action
    • I think all that's needed is something like this in NixIndString
    • I also think this is not a lot of effort for good value, because other IDEs (ahem VSCode) cannot do language injections as well as IDEA.
  2. Support 'comments as injection markers' (a lot like the @Language(...) annotation in Java or Kotlin), for more permanent injections
    • This is trickier and would involve following this guide

I tried to follow the example to implement the former myself, but I find I cannot edit PSI elements because they are all code-generated. Would moving them out be an opation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions