Add treesitter grammars
This commit is contained in:
parent
bb718f36e2
commit
8e6f9fb0b2
|
@ -190,6 +190,32 @@
|
|||
(define-key company-active-map (kbd "C-<tab>") 'my-tab)
|
||||
(define-key company-active-map (kbd "C-TAB") 'my-tab))
|
||||
|
||||
(setq treesit-language-source-alist
|
||||
'((bash "https://github.com/tree-sitter/tree-sitter-bash")
|
||||
(cmake "https://github.com/uyha/tree-sitter-cmake")
|
||||
(css "https://github.com/tree-sitter/tree-sitter-css")
|
||||
(elisp "https://github.com/Wilfred/tree-sitter-elisp")
|
||||
(go "https://github.com/tree-sitter/tree-sitter-go")
|
||||
(html "https://github.com/tree-sitter/tree-sitter-html")
|
||||
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
|
||||
(json "https://github.com/tree-sitter/tree-sitter-json")
|
||||
(make "https://github.com/alemuller/tree-sitter-make")
|
||||
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
|
||||
(python "https://github.com/tree-sitter/tree-sitter-python")
|
||||
(toml "https://github.com/tree-sitter/tree-sitter-toml")
|
||||
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
|
||||
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
|
||||
(yaml "https://github.com/ikatyang/tree-sitter-yaml")))
|
||||
|
||||
(setq major-mode-remap-alist
|
||||
'((yaml-mode . yaml-ts-mode)
|
||||
(bash-mode . bash-ts-mode)
|
||||
(js2-mode . js-ts-mode)
|
||||
(typescript-mode . typescript-ts-mode)
|
||||
(json-mode . json-ts-mode)
|
||||
(css-mode . css-ts-mode)
|
||||
(python-mode . python-ts-mode)))
|
||||
|
||||
;; Adapted from https://github.com/Slackwise/dotfiles/blob/master/emacs/slackwise.el
|
||||
(setq-default
|
||||
functions-file (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "functions.el"))
|
||||
|
|
Loading…
Reference in a new issue