GithubHelp home page GithubHelp logo

Comments (4)

ubolonton avatar ubolonton commented on April 26, 2024

In contrast, this package installs its non-elisp data relative to the compiled library (via load-library). This breaks when using gccemacs, because gccemacs compiles files into their own directory.

Can you provide details on how it breaks?

If you used the convention and installed into ~/.emacs.d/ , or at least allowed the user to control where the data was installed, it would fix this problem.

This is a reasonable solution for grammar binaries installed by tree-sitter-langs.el, as they are handled by the library itself. I'll make it customizable.

The dynamic module's binary installed by tree-sitter.el should be on load-path, as it is handled by the library loading mechanism. The directory that contains tree-sitter.el[cn] is currently the most sensible location. Depending on how it currently breaks on gccemacs, it may be an issue with gccemacs itself.

from elisp-tree-sitter.

jsalzbergedu avatar jsalzbergedu commented on April 26, 2024

Can you provide details on how it breaks?

Sure!

When I native compile tree sitter, then run "tree-sitter-hl-mode" in, for instance, java, I get the error: tree-sitter-load: cannot find shared library for language: java.

Going into tree sitter I can see that it is /home/jacob/.emacs.d/straight/build/tree-sitter-langs/eln-x86_64-pc-linux-gnu-3fa98b4db038dd53/bin/

which obviously doesn't contain anything because the "eln" folder is a subfolder of the treesitter build directory, because native-compile-async creates a subfolder.

Thank you :)

from elisp-tree-sitter.

ubolonton avatar ubolonton commented on April 26, 2024

Going into tree sitter I can see that it is /home/jacob/.emacs.d/straight/build/tree-sitter-langs/eln-x86_64-pc-linux-gnu-3fa98b4db038dd53/bin/

Is this directory listed in tree-sitter-load-path? Does it contain the .so language files?

If you execute M-x tree-sitter-langs-install-grammars, where does it download the file to?

Does it work if you change the definition of tree-sitter-langs--dir to this?

(defconst tree-sitter-langs--dir
  (file-name-directory (locate-library "tree-sitter-langs.el")))

from elisp-tree-sitter.

ubolonton avatar ubolonton commented on April 26, 2024

#63 introduced the custom option tree-sitter-langs-grammar-dir.

Please reopen if you still encounter this issue.

from elisp-tree-sitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.