elm-tooling / tree-sitter-elm

Tree sitter implementation for elm
https://elm-tooling.github.io/tree-sitter-elm/
MIT License
75 stars 14 forks source link

Hangs if file ends in empty comment #20

Closed nonpop closed 5 years ago

nonpop commented 5 years ago

arch linux, vscode 1.36.1, ElmLS 0.3.0

Create a new project with elm init and create src/Foo.elm with the following contents:

module Foo exposing (foo)
foo = 42
--

Make sure there is no newline after the dashes, use save without formattig if necessary. Restart vscode. Now the client/ls hangs with 100% cpu usage. Closing vscode does not kill the halted process. If this file exists then opening vscode will start consuming 100% cpu even if the file itself is not opened. Adding a newline after the comment fixes the problem.