aya-dev
aya-dev copied to clipboard
Highlighting lexer
trafficstars
For every time user edit a file, the LSP unload it. We can do better:
- We lex the file on save.
- We provide precise token-based highlight for the file, on save, based on the lex result.
- We provide navigation on
Ctrl+L Ctrl+L(already done).
This is inspired from @agda.
@imkiva wdty
I remember agda-vscode maintains an edit-list to correct highlight positions when the user edits the file. But VSCode seems not to fire certain events as user types (instead, it fires a file change event on save).
Oh I have a solution! Your suggestion is pretty awesome!!!!
What solution?
On save, the server sends the highlight result from SyntaxHighlight to client. The old approach (sending highlight result after C-l C-l) is deprecated.