Fork me on GitHub
#dev-tooling
<
2023-01-02
>
mauricio.szabo02:01:12

Folks, a quick brainstorm - supposing you have an API to highlight anything in an editor - how should you like that API to be? Like, both push-based (I want to highlight this) to callback based (this source changed in these/this position, return the new highlight), etc

mauricio.szabo02:01:28

Things like is the data structure that the callback should receive as parameters, does it sends you additional data to help highlight, how is this highlight format returned, etc

ericdallo12:01:28

LSP has similar features that respond via server callback to client (Editor), including semantic-tokens and lens and it seems to work nicely, there is some custom server callbacks from other LSPs like Dart that does that as well, example https://emacs-lsp.github.io/lsp-dart/#flutter-widget-guides

mauricio.szabo16:01:49

@ericdallo yes, I'm aware of this, and it's part of what I want to do. What I actually want to make is something that can be even more customizable, so anyone (regardless of LSP support) can add this feature at will - maybe even responding on things like keypresses and cursor positioning