mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 02:30:33 -08:00
fix(tree-sitter): always install grammars to profile data dir
Fix: #8578 Co-authored-by: falloutphil <falloutphil@users.noreply.github.com>
This commit is contained in:
parent
c523ee9586
commit
281e3069a7
1 changed files with 5 additions and 4 deletions
|
|
@ -101,12 +101,13 @@
|
|||
:config
|
||||
;; HACK: Keep $EMACSDIR clean by installing grammars to the active profile.
|
||||
(add-to-list 'treesit-extra-load-path (file-name-concat doom-profile-data-dir "tree-sitter"))
|
||||
(defadvice! +tree-sitter--install-grammar-to-local-dir-a (fn &rest args)
|
||||
"Write grammars to `doom-profile-data-dir'."
|
||||
(defadvice! +tree-sitter--install-grammar-to-local-dir-a (fn lang &optional outdir &rest args)
|
||||
"Write grammars to `doom-profile-data-dir' instead."
|
||||
:around #'treesit-install-language-grammar
|
||||
:around #'treesit--build-grammar
|
||||
(let ((user-emacs-directory doom-profile-data-dir))
|
||||
(apply fn args)))
|
||||
(apply fn lang
|
||||
(or outdir (file-name-concat doom-profile-data-dir "tree-sitter"))
|
||||
args))
|
||||
|
||||
;; TODO: Move most of these out to modules
|
||||
(dolist (map '((awk "https://github.com/Beaglefoot/tree-sitter-awk" nil nil nil nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue