TravonteD / tree-sitter-fennel

Treesitter grammar for the Fennel programming language
MIT License
42 stars 9 forks source link

Parser show errors where there are none #1

Closed p00f closed 4 years ago

p00f commented 4 years ago

In this fennel file, nvim-treesitter's playground shows errors in the following places 1) }} on line 2 2) {:* on line 18 3) the first : on line 18 4) }) on line 20 5) :✖) on line 22 6) :✖ on line 22 see this screenshot https://imgur.com/3o1Te23

p00f commented 4 years ago

(the highlighting is also weird in the same screenshot, do I create another issue?)

TravonteD commented 4 years ago

(the highlighting is also weird in the same screenshot, do I create another issue?)

No need, after I fix the parsing errors the highlighting should be fixed as well. If there is still some wonky highlighting after the fix, then we'll split it off to a new issue

TravonteD commented 4 years ago

So far I've fixed the issue with the identifiers in the table, but for the unicode character being used with the symbol on line 22 I'm going to have to write an external scanner since that can't be covered with regex. I'm actually kinda surprised that that's valid in the first place lol.

TravonteD commented 4 years ago

@p00f Reinstall the parser and things should be fixed

p00f commented 4 years ago

updating completely broke it lol Screenshot from 2020-09-02 07-58-25

:TSPlaygroundToggle opens an empty buffer

p00f commented 4 years ago

Opening a terminal using :Tnew (https://github.com/kassio/neoterm) gives

Error detected while processing CursorHold Autocommands for "<buffer=9>":                                                                                                     
E5108: Error executing lua Failed to load parser: uv_dlopen: /home/p00f/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/fennel.so: undefined symbol: tree_sitter_fennel_external_scanner_create
TravonteD commented 4 years ago

Ah okay I have a pr in nvim-treesitter for that https://github.com/nvim-treesitter/nvim-treesitter/pull/375. Until it gets merged in order to have the latest version you need to compile it yourself by cloning this repo and running make, then copying the fennel.so to your installation of nvim-treesitter manually.

p00f commented 4 years ago

Fixed, thanks