Skip to content

Variable is not supported in a snippet placeholder #1313

Closed

Description

@sergeysavchuk

Steps to reproduce:

  • Define the following snippet on LS:
"Type ${1:$TM_FILENAME_BASE} {

    ${0}
}"
  • Selected the snippet in IDEA.

Actual result:

Type $TM_FILENAME_BASE {

    
}

In VsCode the following snippet work correctly.

Activity

  1. angelozerr commented on Oct 3, 2025

    @angelozerr
    Contributor

    That's strange, it should be supported with

    String fileName = LSPIJUtils.getFile(document).getNameWithoutExtension();

    Perhaps there are something which is broken?

  2. added theissue type on Oct 3, 2025
  3. added
    bug
    on Oct 3, 2025
  4. added a commit that references this issue on Oct 3, 2025
    04a14a1
  5. angelozerr commented on Oct 3, 2025

    @angelozerr
    Contributor

    @sergeysavchuk it should be fixed with #1314

    I need to write tests.

  6. sergeysavchuk commented on Oct 3, 2025

    @sergeysavchuk
    ContributorAuthor

    @angelozerr I've tested the plugin with your changes and now everything is fine, thanks

  7. angelozerr commented on Oct 3, 2025

    @angelozerr
    Contributor

    Thats great.

    Let me write some basic tests because after reading the spec variable can be more complex and we can use regexp.

    I will not support that but having tests will ensure to not break the current variable support

  8. added 2 commits that reference this issue on Oct 4, 2025
    af8c8ae
    6a5f1ad
  9. added this to the 0.17.0 milestone on Oct 4, 2025
  10. moved this to In Progress in Java Toolingon Oct 4, 2025
  11. self-assigned this
    on Oct 4, 2025
  12. added 2 commits that reference this issue on Oct 4, 2025
    2a750ab
    f2710e6
  13. moved this from In Progress to Done in Java Toolingon Oct 4, 2025
  14. added a commit that references this issue on Oct 4, 2025
    cc0f4e2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcompletion

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions