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

Only the First Line of Multiline Comments Is Highlighted #264

Open
lace-wing opened this issue Aug 24, 2023 · 2 comments · May be fixed by #410
Open

Only the First Line of Multiline Comments Is Highlighted #264

lace-wing opened this issue Aug 24, 2023 · 2 comments · May be fixed by #410
Labels
bug Something isn't working language server Related to the language server

Comments

@lace-wing
Copy link

  • editor: neovim
  • lsp plugins: nvim-cmp, lspconfig, mason, mason-lspconfig
  • LSP version: 0.9.4
  • OS version and name: macOS 13.5
  • I am on the latest stable version of the extension/LSP.
  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

Multi-line comments are only "highlighted", usually dimmed, on the first line.
Single-line comments are fine.

Screenshot 2023-08-24 at 11 04 53

Though not properly highlighted, the comments actually work.

@nvarner
Copy link
Owner

nvarner commented Aug 29, 2023

Thanks for the report. It might take me some time to get this fixed, but I don't think it will be too difficult.

I haven't done the work to confirm this, but Typst is probably giving us multiline spans for multiline comments, which we convert directly to multiline semantic tokens, which are prohibited in many LSP clients.

Assuming that is correct, these tokens just need to be broken up. Fixing it is nontrivial but shouldn't take too long.

@nvarner nvarner added bug Something isn't working language server Related to the language server labels Aug 29, 2023
@ghost
Copy link

ghost commented Nov 12, 2023

I think the same problem is with codeblocks:

```rust
let x: usize = 1;
```

does not highlight the last line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working language server Related to the language server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants