Skip to content

Support semantic token MultilineTokenSupport #401

Closed

Description

@CppCXY

If multiline tokens are not supported and a tokens length takes it past the end of the line, it should be treated as if the token ends at the end of the line and will not wrap onto the next line.

If the length of a token exceeds the end of this line, it should not continue to the next line.

Activity

  1. angelozerr commented on Jul 2, 2024

    @angelozerr
    Contributor

    Have you a usecase?

  2. added
    bug
    on Jul 2, 2024
  3. CppCXY commented on Jul 2, 2024

    @CppCXY
    ContributorAuthor

    test script here:
    test2.zip

    If the language server detects that the client does not support multiline tokens, it will return multiple single-line tokens, each with a length of 9999. According to LSP, overly long tokens should not continue to the next line. However, LSP4IJ continues them to the following lines, causing the string color to change.

    the response:
    image

  4. angelozerr commented on Jul 2, 2024

    @angelozerr
    Contributor

    Could you share please your LSP traces, because I would like to start writting tests for sem1ntic tokens by using real LSP traces. I need your full trace with initialize which return legend and semanticTokens/full

  5. CppCXY commented on Jul 2, 2024

    @CppCXY
    ContributorAuthor
  6. angelozerr commented on Jul 4, 2024

    @angelozerr
    Contributor

    @CppCXY do you have some coloration, or does semantic fail with a stack trace error?

  7. CppCXY commented on Jul 4, 2024

    @CppCXY
    ContributorAuthor

    @CppCXY do you have some coloration, or does semantic fail with a stack trace error?

    no stack trace,

  8. angelozerr commented on Jul 4, 2024

    @angelozerr
    Contributor

    Are you sure that your semanticFull trace is for the content of your file that you have attached?

    Could you add a screenshot with the result of the problem please.

  9. CppCXY commented on Jul 4, 2024

    @CppCXY
    ContributorAuthor

    "hello" was rendered in gray:
    image

  10. CppCXY commented on Jul 4, 2024

    @CppCXY
    ContributorAuthor

    This is because Luals splits tokens that span multiple lines into several single-line tokens and sets the token length to 9999, which is in accordance with the language server specifications.

  11. changed the title [-]semantic token implement issue[/-] [+]Support semantic token MultilineTokenSupport[/+] on Jul 4, 2024
  12. added a commit that references this issue on Jul 4, 2024
    d4f49c8
  13. added this to the 0.3.0 milestone on Jul 4, 2024
  14. self-assigned this
    on Jul 4, 2024
  15. added a commit that references this issue on Jul 4, 2024
    1d75661
  16. added a commit that references this issue on Jul 4, 2024
    58147b4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugsemantic tokens

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions