Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

RFI: how to specify the destination directory for new installs #79

Open
rileyrg opened this issue Jan 10, 2024 · 2 comments
Open

RFI: how to specify the destination directory for new installs #79

rileyrg opened this issue Jan 10, 2024 · 2 comments

Comments

@rileyrg
Copy link

rileyrg commented Jan 10, 2024

I use the no-litter package and I while I successfully pick up grammars in my var/tree-sitter directory care of the additional paths value, the auto install seems to insist on installing new ones into .emacs.d/tree-sitter. Am I missing a config to allow me to point to my var/tree-sitter directory? If not, would it please be possible? I just hate having third party data in my .emacs.d top level ;)

  (use-package treesit-auto
    :custom
    (treesit-auto-install 'prompt)
    (treesit-extra-load-path `(,(no-littering-expand-var-file-name "tree-sitter")))
    :config
    (treesit-auto-add-to-auto-mode-alist 'all)
    (global-treesit-auto-mode))
@renzmann
Copy link
Owner

It looks like newer versions of Emacs will allow you to do this. In Emacs 29 the output directory was hard-coded.

Since I need to maintain compatibility with Emacs 29, I don't have a ton of motivation to add a configuration at the treesit-auto level. Maybe just advising the treesit-install-language-grammar with that output directory would work for you?

@jvillasante
Copy link

Can you please point me in the right direction on how to write that advice? I have 0 elisp skills :)

Also, is adding an optional argument a breaking change in elisp?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants