Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Language Client: Implement syntax highlighting #379

Closed
bryphe opened this issue Apr 19, 2017 · 4 comments
Closed

Language Client: Implement syntax highlighting #379

bryphe opened this issue Apr 19, 2017 · 4 comments

Comments

@bryphe
Copy link
Member

bryphe commented Apr 19, 2017

Language protocol-supported syntax highlighting can be built using the documentSymbol request:
https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#textDocument_documentSymbol

@jordwalke
Copy link

Is there a really good example of an editor using this without a Flash of Unstlyed Content or other lags? Does VSCode currently use this? Does going out of process make performance more difficult? I'm not skeptical, just curious.

@bryphe
Copy link
Member Author

bryphe commented Jul 3, 2017

VSCode actually does this - but for large files there is a large flash of unstyled content. My plan right now is to leverage the Vim syntax highlighting for fixed items - like keywords, block styling, strings, comments, etc - and use the documentSymbol request for more dynamic items, like variable names.

But ya, as soon as you go out of process, you always incur some latency - so you get that flash of unstyled content. The variable name highlighting is pretty useful IMO - but there could be a setting to disable it if it is too distracting. There are also ways we can look at optimizing the performance, too, across the pipeline in various ways (for using IPC vs stdio, to only requesting symbols for the active 'window', pre-emptively loading symbols for a doc, etc). It seems doable to minimize this, since it's not really noticeable in VSCode after the initial "flash".

@bryphe
Copy link
Member Author

bryphe commented Dec 21, 2017

This is partially implemented via TextMate grammars, behind the experimental.editor.textMateHighlighting.enabled flag here: https://github.com/onivim/oni/wiki/Configuration#textmate-highlighting

@bryphe
Copy link
Member Author

bryphe commented Feb 27, 2018

Textmate highlighting is now enabled by default with #1639

@bryphe bryphe closed this as completed Feb 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants