refactor!(tree-sitter): add +tree-sitter flag
BREAKING CHANGE: break the global nature of the tree sitter module by adding a +tree-sitter flag to every applicable module In the background this hooks turn-on-tree-sitter-mode to the major-mode-hook of the language. This may also solve the eager loading of tree sitter
This commit is contained in:
parent
400d8d4116
commit
06ed5ade3f
18 changed files with 93 additions and 12 deletions
|
@ -24,18 +24,18 @@
|
|||
(set-repl-handler! 'sh-mode #'+sh/open-repl)
|
||||
(set-lookup-handlers! 'sh-mode :documentation #'+sh-lookup-documentation-handler)
|
||||
(set-ligatures! 'sh-mode
|
||||
;; Functional
|
||||
:def "function"
|
||||
;; Types
|
||||
:true "true" :false "false"
|
||||
;; Flow
|
||||
:not "!"
|
||||
:and "&&" :or "||"
|
||||
:in "in"
|
||||
:for "for"
|
||||
:return "return"
|
||||
;; Other
|
||||
:dot "." :dot "source")
|
||||
;; Functional
|
||||
:def "function"
|
||||
;; Types
|
||||
:true "true" :false "false"
|
||||
;; Flow
|
||||
:not "!"
|
||||
:and "&&" :or "||"
|
||||
:in "in"
|
||||
:for "for"
|
||||
:return "return"
|
||||
;; Other
|
||||
:dot "." :dot "source")
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'sh-mode-local-vars-hook #'lsp! 'append))
|
||||
|
@ -93,3 +93,7 @@
|
|||
:config
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'powershell-mode-local-vars-hook #'lsp! 'append)))
|
||||
|
||||
;; Tree sitter
|
||||
(eval-when! (featurep! +tree-sitter)
|
||||
(add-hook! 'sh-mode-hook #'turn-on-tree-sitter-mode))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue