zls
zls copied to clipboard
use document highlighting to show matching control flow statements
The textDocument/documentHighlight request can be used to highlight control flow statements like continue and break with their for or while loop and vice versa. The end result should look similar to the following demo:
https://github.com/user-attachments/assets/7130f4bb-574e-494b-945c-ff70916eaed8
This could also be applied to symbol references i.e "Find All References" / "Go to References". Perhaps other keywords like defer, try, return could get similar features.