haritkapadia / ts-movement

Emacs 29+ minor mode for syntax tree navigation using Tree Sitter
GNU General Public License v3.0
56 stars 6 forks source link

loading package raises an error #1

Open ckruse opened 1 year ago

ckruse commented 1 year ago

Hi there,

loading this package raises the error error: Could not find package treesit

This is because of a (require 'treesit) in the code. Is this a missing dependency?

Trying it out with GNU Emacs 29.0.60 (HEAD is 352e41016bcaab8566347091b6b61908a9b57b57)

Best regards, CK

sochotnicky commented 1 year ago

If I had to quess you didn't compile your emacs with tree-sitter support. You can easily check by running:

emacs --batch --eval '(message system-configuration-features)' 2>&1 | grep TREE_SITTER

If there's no output you don't have tree sitter support enabled in your build.

ckruse commented 1 year ago

No, of course Emacs has treesit support enabled :-)

emacs --batch --eval '(message system-configuration-features)' 2>&1 | grep TREE_SITTER

ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB
sochotnicky commented 1 year ago

No, of course Emacs has treesit support enabled :-)

emacs --batch --eval '(message system-configuration-features)' 2>&1 | grep TREE_SITTER

ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB

Well the treesit.el is part of emacs itself. In my case installed in /usr/share/emacs/29.0.60/lisp/treesit.el but YMMV. But it looks like your emacs can't find the treesitter part itself.

RomeoV commented 11 months ago

I'm on doom emacs, and running

(package! treesit :built-in 'prefer)
(package! ts-movement
  :recipe (:host github :repo "haritkapadia/ts-movement"))

instead of just the second line fixed this for me.