Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feature request: semantic highlighting (textDocument_semanticTokens) #33

Open
smemsh opened this issue May 20, 2021 · 15 comments
Open

feature request: semantic highlighting (textDocument_semanticTokens) #33

smemsh opened this issue May 20, 2021 · 15 comments

Comments

@smemsh
Copy link

smemsh commented May 20, 2021

Feature request to support textDocument_semanticTokens, now part of official LSP standard:

https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens

Personally I would use this with vim-lsp which has implemented support for it.

@reach-satori
Copy link

Neovim recently merged support for this as well: neovim/neovim#21100

@stalkerg
Copy link

stalkerg commented Feb 6, 2023

Kate also supports it.

@ccordoba12
Copy link
Member

Unfortunately we don't have the bandwidth to work on this at the moment. But pull requests are always welcomed.

@stalkerg
Copy link

stalkerg commented Feb 7, 2023

Okey, a simple way seems like not work python-rope/rope#659

@ccordoba12
Copy link
Member

ccordoba12 commented Feb 7, 2023

I think your best bet would be using Treesiter, which has the right infrastructure for that.

@stalkerg
Copy link

stalkerg commented Feb 7, 2023

Yeah, I am looking into it, but it's little bit overkill. It will be perfect for finding a native python solution.

@lkhphuc
Copy link

lkhphuc commented Mar 8, 2023

Yeah, I am looking into it, but it's little bit overkill. It will be perfect for finding a native python solution.

There is a plugin for neovim that is based on python and is very reliable and fast imo: https://github.com/numirias/semshi . This could be a starting point to port over the functionality to python-lsp

@Akselmo
Copy link

Akselmo commented Apr 12, 2023

Hi, has anyone investigated this further? Semantic highlighting makes programming much easier for me so I'm interested in this. I wouldn't mind helping out implementing it either!

Just wondering if there's any up-to-date info regarding this, if anyone else has tried but got stuck or something like that?

@stalkerg
Copy link

I just estimated the time and technology. It will be good to work on but I am not sure about the time next few months.

@stalkerg
Copy link

As I know @asahilina also uses Kate for Python, maybe she can help us with motivation?

@krassowski
Copy link
Member

It looks like there is a draft PR for the jedi-lsp for it: pappasam/jedi-language-server#231 so I guess it would be possible to do so with jedi alone.

But one would need to look into how it behaves when there is syntax error etc.

@oakmegaeddie
Copy link

We need this feature, too.

@Doekeb
Copy link

Doekeb commented Mar 7, 2024

Hi! I'm interested in implementing this. I've made a fork here and added the boilerplate setup by copying from some the other capabilities like hover. However I can't seem to get the plugin system to call the main entrypoint. Hoping one of the core maintainers can help me finish hooking this up so I can get to the actual implementation! Can you offer any guidance @ccordoba12? Happy to provide any more details. Here's the commit with the hookups I could figure out so far.

@Doekeb
Copy link

Doekeb commented Mar 7, 2024

Hi! I'm interested in implementing this. I've made a fork here and added the boilerplate setup by copying from some the other capabilities like hover. However I can't seem to get the plugin system to call the main entrypoint. Hoping one of the core maintainers can help me finish hooking this up so I can get to the actual implementation! Can you offer any guidance @ccordoba12? Happy to provide any more details. Here's the commit with the hookups I could figure out so far.

Nevermind I figured it out—just had to reinstall the project into the virtual environment to register the new plugin.

@Doekeb
Copy link

Doekeb commented Mar 10, 2024

I have a fairly basic starting point here: #533.
Surely some improvements can be made, but this already improves my syntax highlighting experience significantly!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants