Fork me on GitHub
#conjure
<
2021-03-03
>
dharrigan15:03:13

So, what's this on the horizon about tree-sitter on dev?

Olical15:03:42

https://github.com/Olical/conjure/issues/184 Basically beginning to add optional support for it so people living in the future can experiment with non-lisp clients. Right now the candidate is Julia, but this will be the jumping off point to JS/Python/Lua etc. Fun times!

Olical15:03:11

It's disabled by default and won't even try to use it unless a bunch of conditions are met, but it's there nonetheless.

dharrigan15:03:48

I wonder when neovim 5 is out

dharrigan15:03:52

seems to be dragging on.

dharrigan15:03:05

that's fine, btw, better working software than broken software

👍 3
uwo17:03:07

Would tree-sitter also allow for more efficient plumbing in a way that would effect the Clojure client? I know some things, like syntax highlighting could be implemented more efficiently, but obviously that's not Conjure's bailiwick.

Olical17:03:54

Possibly, yes. It can handle syntax highlighting, indenting and other such editor tools, possibly better than the regex based solutions currently there. Conjure's current approach for hunting for matching parens works, but isn't ideal. It's a large chunk of code that I've tried to make as fast as possible but it'll never be anywhere near how fast tree-sitter lookups are. The current code is pretty inflexible and hard to extend (which is why things like "eval everything inside a comment block" are hard to implement right now) but there's not much I can do about that. I wrote it as flexible and efficient as I could, but selecting the right parts of lisps without and parsing (only by walking out from the cursor) is haaaard.

Olical17:03:10

So relying on tree-sitter in the future allows me to walked a pre-parsed AST efficiently. Meaning I can do more passive hunting for forms as you move your cursor as well as do smarter hunting for parts of forms we care about.

metal 3