zls icon indicating copy to clipboard operation
zls copied to clipboard

use document highlighting to show matching control flow statements

Open Techatrix opened this issue 1 year ago • 0 comments

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.

Techatrix avatar Aug 20 '24 12:08 Techatrix