emacs-tree-sitter / elisp-tree-sitter

Emacs Lisp bindings for tree-sitter

Home Page:https://emacs-tree-sitter.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to configure this to make it work with Swift?

konrad1977 opened this issue · comments

I cannot get it to work with swift. It hooks in but nothing changes.

If I check my message I can see message like this.

[tree-sitter-langs] Running (git rev-parse --show-toplevel) in /Users/mikaelkonradsson/.emacs.d/elpa/tree-sitter-langs-20211228.1446/
The directory /Users/mikaelkonradsson/.emacs.d/elpa/tree-sitter-langs-20211228.1446/ doesn’t seem to be a git working dir. Grammar-building functions will not work.
tree-sitter-langs: Grammar bundle v0.10.13 was already installed; skipped

And if I check the tree-sitter-tree:
Skärmavbild 2022-01-29 kl  09 46 42

My config block for tree-sitter:

(use-package tree-sitter
  :config
  (add-to-list 'tree-sitter-major-mode-language-alist '(swift-mode . swift))
  (add-hook 'swift-mode-hook #'tree-sitter-mode)
  (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))

(use-package tree-sitter-langs
  :after (tree-sitter))