Skip to content

Conversation

@sebastiansturm
Copy link
Contributor

@sebastiansturm sebastiansturm commented Apr 18, 2021

this PR adds support for delta and refresh requests and fixes flickering seen in combination with some underlying highlighting mechanisms (tree-sitter-hl, clojure's syntax highlighter)

Fixes #2448

Note that even when this is set to t, delta requests will
be preferred whenever possible, unless
`lsp-semantic-tokens-allow-delta-requests' is false."
:group 'lsp-mode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change the groups to lsp-semantic-tokens to make those variables documentation show in correct sections of webpage?

Copy link
Member

@ericdallo ericdallo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I'll test manually during this week

@ericdallo
Copy link
Member

ericdallo commented Apr 19, 2021

@sebastiansturm I realized I didn't implement delta support for clojure-lsp yet, I'll use this branch as a base to implement the server

@ericdallo
Copy link
Member

@sebastiansturm Would you mind merge master in this branch? I intend to test latest changes and this branch this week

@sebastiansturm
Copy link
Contributor Author

@sebastiansturm Would you mind merge master in this branch? I intend to test latest changes and this branch this week

I just rebased and pushed. Got some error message during fontification with rust-analyzer that I'll have to look into in the following days, but I pushed the current state anyway since semantic tokens seemed to work as usual with clojure-lsp. Thanks for testing!

Sebastian Sturm added 12 commits June 27, 2021 18:52
adds support for delta and refresh requests. Also fixes flicker in
combination with underlying highlighting mechanisms if those mechanisms
were to dynamically adjust font-lock regions (clojure mode's syntax
highlighter and tree-sitter-hl are prominent examples)
* lsp-semantic-tokens-enable-log advises
lsp-semantic-tokens--fontify to store buffer snapshots before and after
fontification

* lsp-semantic-tokens-disable-log unadvises
lsp-semantic-tokens--fontify (completely, assuming that users typically
don't define custom advice for lsp-semantic-tokens--fontify)

* lsp-semantic-tokens-export-log converts logs generated by
lsp-semantic-tokens-enable-log to a list of HTML files stored under
/tmp/semantic-token-snapshots; requires 'htmlize
should be a request handler, not a notification handler
@ericdallo
Copy link
Member

@sebastiansturm I tested this PR with clojure-lsp and found no major issues with semantic tokens full and range, I couldn't test delta but this seems to have improvements on semantic-tokens on general, so LGTM to merge, WDYT?

@sebastiansturm
Copy link
Contributor Author

at least I'm not aware of any open issues since the CI failures have been resolved, and I didn't run into problems using it myself. So if you didn't either, then I think it's probably good enough to merge. Thanks for your help!

@ericdallo ericdallo merged commit 1f7ccca into emacs-lsp:master Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[3.16] Support semanticTokens missing methods

2 participants