techee / geany-lsp

LSP plugin for the Geany editor
GNU General Public License v2.0
11 stars 1 forks source link

Try using INDIC_TEXTFORE for semantic token colorization #18

Closed techee closed 9 months ago

techee commented 9 months ago

Suggested by @elextr here:

https://github.com/techee/geany-lsp/issues/9#issuecomment-1792245283

techee commented 9 months ago

It works - I've just added semantic_tokens_type_style to the config file, disabled by default, check the global config file for details.

The only problem is that it cannot make the types bold unfortunately. So I prefer highlighting using keywords for C/C++ but using indicators may be the only option for lexers not supporting keyword type highlighting (unfortunately neither python nor go support semantic tokens so I couldn't test with these).

elextr commented 9 months ago

Ok, colours types anyway, will see over time how accurate it is.

elextr commented 9 months ago

Seems to work :-)

The only problem is that it cannot make the types bold unfortunately.

Maybe Neil will accept a well written patch later.

techee commented 8 months ago

Maybe Neil will accept a well written patch later.

Not possible it seems:

https://sourceforge.net/p/scintilla/feature-requests/1505/

elextr commented 8 months ago

BOLD does not change the width of proper monospace fonts, look at any type in Geany's default style. Its possible broken fonts using fake bold will change, and non-monospaced I guess. Anyway, ok, fonts can't be bold, time to change the default style in Geany :grin: Vscode default theme doesn't bold anything either so I guess its possible to do a usable theme non-bolding, but not so good for the colour challenged.

techee commented 8 months ago

BOLD does not change the width of proper monospace fonts, look at any type in Geany's default style.

Try installing SciTE. By default it doesn't use monospaced fonts and I suspect that this is how Neil uses it and Scintilla has to support that. This was always the first thing I had to change when I was using SciTE :-)

elextr commented 8 months ago

Silly ideas young folks have today, programming in non-monospace, whatever is the world coming to [end grumpy olde guy rant]

I can understand Neil's point, the indicators don't re-run layout, so bold (or any other thing that changes layout) can't be used, and I expect its not even possible to know if layout needs to be re-run until after layout has been re-run. :-S

Anyhow so far colours seem to work, so we will just have to live without bold.