vigoux / tree-sitter-viml

Tree-sitter parser for VimL
MIT License
74 stars 22 forks source link

Incorrect short form for endfunction keyword #82

Closed 0xAdk closed 2 years ago

0xAdk commented 2 years ago

according to :help endfunction :endfunction would range from :endf to :endfunction but the way it currently is setup it accepts :end as it's shortest form. I pretty sure this is a mistake.

https://github.com/vigoux/tree-sitter-viml/blob/79a4a637c1667f2ad60b2c40e93bbd2b4a63c45c/src/scanner.c#L102 https://github.com/vigoux/tree-sitter-viml/blob/79a4a637c1667f2ad60b2c40e93bbd2b4a63c45c/src/scanner.c#L36

Fymyte commented 2 years ago

Totally true I'll fix this thanks for the report 👍

Fymyte commented 2 years ago

Should be good 👍. Just there is another PR #77 which aims to fix lexing of mandatory part of tokens, so this will still be buggy as long as the other PR is not merged