3 ms·
I mean, to be fair, this only took me a few hours to write, and most of it was spent on the README/docs/demo, so it's not a huge deal. I do wish I had done it s
by ashkankiani 7y ago
I mean, to be fair, this only took me a few hours to write, and most of it was spent on the README/docs/demo, so it's not a huge deal. I do wish I had done it sooner, considering how long the Lua integration has been in Neovim. Even the trie implementation was rather easy since I used a naive algorithm (but it was fun to flex my ffi).
I think treesitter would be overkill for this, however, considering the size and ffi overhead involved and any speed improvement would be very minimal while increasing the complexity. Considering that we are only told what "lines" changed by neovim right now, it would be very difficult to improve on what I have right now.
I had seen mention of treesitter in the code, and I had no idea what it was, so thank you very much for enlightening me. I have a decent amount of experience writing pratt parsers and DFAs by hand, which will probably still be faster, but the incremental algorithm and other advanced features wouldn't come for free.
I had been looking for more advanced reading material on parsers (I was even thinking of emailing Donald Knuth to see if I could preview chapter 7's section on parsing), and also for parsers in some of those languages, so this is very nicely timed. I'm definitely going to be reading their papers and watching the talk.