Closed kbjr closed 5 years ago
This looks great - I will try to find some time to try the change out locally.
So, I've also started looking at what it would take to implement this in the other (quick info) popups. It's looking like that will unfortunately be more complicated. Looking at the data that is available when it tries to render, there is nothing broken down into separate tokens like was already done in the signature popups.
{'info_str': '(parameter) foo: Bar', 'doc_str': '', 'error': ''}
Is there some function or such somewhere that can break down the plain text from these info popups into a similar structure as the one used for the signature popups? If that can be done, then these can be highlighted in the exact same way, which would be really nice.
Okay, I've got syntax highlighting working on quickinfo popups now, too.
I need to backport some extra changes I made back into the signature popups now, too (better highlighting pulling in bold/italics as well as color).
I have noticed some of the typing data that tsserver provides is... unusual.
Like calling this a keyword:
Or calling the 0 | 1
here a string literal
But, for the most part, it works
Any chance of this moving forward? Been sitting idle for a few weeks
@kbjr 2f18af1 looks empty. Isn't it supposed to contain a method named quick_info_full
in service_proxy.py
? I guess you already have those changes locally. BTW, cool work.
Hmm... guess that's what I get for being lazy and copy pasting local changes into github. I'll go track that down.
Okay, pulled a fresh copy, added the missing method, and confirmed its actually working. Should be good to go.
This would be a really nice improvement. Hope this can get merged soon.
@DanielRosenwasser
You're the best @kbjr! Thanks for the patience!
Adds syntax highlighting to signature popups, based on the currently active theme.
Also adds styling to the quickinfo popup