How to troubleshoot a maybe-language-server issue? #9684
-
Here's an example of a bug which I suspect could be a language server problem. The deletion of the highlighted text makes the problem go away. Before (note that After (note that Some character in that box drawing thingy that I generated from https://asciiflow.com/#/ appears to be breaking syntax highlighting:
Edit: After a bit more scrutiny, I see that the same weird behavior appears when github parses the code: from time import sleep
def main() -> None:
foo(
json={"code": 200, "response": data.dict(), # <-- missing '}'
headers={"Content-Type": "application/json"}
)
sleep(1) #<-- purple
sleep(1)
sleep(1) #<-- white
sleep(1) So it probably is a language server issue and not a helix issue. But generally speaking, how to know the difference? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This looks like #1151 |
Beta Was this translation helpful? Give feedback.
-
Syntax highlighting in Helix (and GitHub for some languages including Python) is done by tree-sitter rather than LSP. I expect that you should be able to reproduce that behavior with the same code running in a scratch buffer ( |
Beta Was this translation helpful? Give feedback.
Syntax highlighting in Helix (and GitHub for some languages including Python) is done by tree-sitter rather than LSP. I expect that you should be able to reproduce that behavior with the same code running in a scratch buffer (
:new
,:lang python
, then paste in the contents) since scratch buffers don't use LSP. To debug it would be useful to minimize the behavior down to the smallest file that can reproduce the behavior