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

Provide semantic tokens for document range #345

Open
radeksimko opened this issue Jan 4, 2021 · 2 comments
Open

Provide semantic tokens for document range #345

radeksimko opened this issue Jan 4, 2021 · 2 comments
Labels
enhancement New feature or request textDocument/semanticTokens Semantic syntax highlighting

Comments

@radeksimko
Copy link
Member

Current Version

0.11.0

Use-cases

Currently the server only provides semantic tokens for the full document, which may result in a higher latency when highlighting larger documents as tokens for the whole document need to be recomputed.

Proposal

In general the textDocument/semanticTokens/range method was designed to allow clients to request tokens just for the visible part of the document and "pre-load" more as the user is scrolling.

It is therefore proposed to provide range-based highlighting, i.e. support this method.

It may be necessary to change SemanticTokensInFile function interface or add a new one (which accepts range) to hcl-lang.

@ndubey-adobe
Copy link

Is this being taken up?

@radeksimko
Copy link
Member Author

@ndubey-adobe this is not on our near-term roadmap if that is what you're asking. We would however happily review PRs for that functionality.

Just curious - Is there anything in particular that motivates you to address this problem in particular? Is the highlighting slow in any particular client or any particular circumstance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request textDocument/semanticTokens Semantic syntax highlighting
Projects
None yet
Development

No branches or pull requests

2 participants