Skip to content

Conversation

@rchl
Copy link
Member

@rchl rchl commented Dec 8, 2025

Revert semantic-highlighting specific part of #2688 since it breaks highlighting in Vue files.

@jwortmann
Copy link
Member

If multiple sessions for semantic highlighting should really be allowed, then the show scope name command should probably check all self.sessions(self.capability) until it finds one that provides a semantic token for the given point, instead of using only one session in

if session := self.best_session('semanticTokensProvider'):

@rchl
Copy link
Member Author

rchl commented Dec 9, 2025

I've changed it to show tokens from all servers:

Screenshot 2025-12-09 at 14 58 21


semantic_tokens_html = ''
for info in semantic_info:
semantic_tokens_html += f'<div>Type: {info[0]}, Modifiers: {info[1]} <a>{info[2]}</a></div>'
Copy link
Member

Choose a reason for hiding this comment

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

I wonder why is there a link (a tag) for the session name, and without any link destination? I think it would be better to change this maybe using a dimmed color instead, like the syntax name which is displayed in the ST references popup.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated:

Screenshot 2025-12-10 at 20 24 10

While at it consolidated duplicated code.

Copy link
Member

@jwortmann jwortmann left a comment

Choose a reason for hiding this comment

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

Still not super happy with this approach to render tokens from all sessions at the same time. But I guess if desired we can opt-out with disabled_capabilities, while it would not be possible to opt-in with multiple sessions and the current code. So let's revert then.

@rchl rchl merged commit 1ae02ea into main Dec 11, 2025
8 checks passed
@rchl rchl deleted the fix/semantic-highlight branch December 11, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants