emacs-tree-sitter / elisp-tree-sitter

Emacs Lisp bindings for tree-sitter
https://emacs-tree-sitter.github.io
MIT License
827 stars 74 forks source link

Swift support, revisited. #240

Closed konrad1977 closed 2 years ago

konrad1977 commented 2 years ago

The version in repo/swift is obsolete and doesn't work. So I tried to upgrade to another one, but it doesn't work.

https://github.com/alex-pinkus/tree-sitter-swift I tried to add this one to the repos. The tests fails for emojis, but otherwise it reports that it works. But it doenst load. But the tree-sitter-debug-mode seems to be correct.

I tried to make this work with Emacs but I got errors everytime:

tree-sitter-after-on-hook: (tsc-query-invalid-structure "(for_statement item: (simple_identifier) @variable)
               ^" (76 . 15) 1922)

I also got a different error that 'actor' isnt known.

The one that works (but its still a bit buggy) is: https://gitlab.com/woolsweater/tree-sitter-swifter.git But for some reason I cant make it work again for M1 Silicon macs. Only x86.

konrad1977 commented 2 years ago

It works now. I think we should update repo/swift to this one. No problems using Silicon nor x86 versions.