dvdsk / prosesitter.nvim

A (work in progress) grammar, spelling and style plugin for Neovim
MIT License
25 stars 0 forks source link

Reparsing tree should not be needed #15

Closed dvdsk closed 3 years ago

dvdsk commented 3 years ago

In on_event.attach and soon in on_event.on_lines we need to assure we have an up to date treesitter tree to work on. To get it I force to parse the tree. Parsing sounds expensive however.

TODO

dvdsk commented 3 years ago

Can not seem to figure out how to wait on tree sitter correctly. Alternative: do not parse/query on line change only do so when building lintreq

dvdsk commented 3 years ago

Could rewrite it as a treesitter-module, those seem to get callbacks from treesitter when the tree changes. This might also solve #16

Requested advice on Treesitter zulip: https://nvim-treesitter.zulipchat.com/#narrow/stream/252274-plugin.2Fnvim-treesitter/topic/ts-module.20or.20not/near/252317386

dvdsk commented 3 years ago

closed in 2ec95d7fa0b269314f613f260871a16e7ba83d1f