mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
Revert "Set treesit-primary-parser for tree-sitter modes"
This reverts commit ed57faafc7
.
This commit is contained in:
parent
52746ceb62
commit
1ea0d9b891
@ -208,7 +208,7 @@ Return nil if there is no name or if NODE is not a defun node."
|
||||
:syntax-table cmake-ts-mode--syntax-table
|
||||
|
||||
(when (treesit-ready-p 'cmake)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'cmake))
|
||||
(treesit-parser-create 'cmake)
|
||||
|
||||
;; Comments.
|
||||
(setq-local comment-start "# ")
|
||||
|
@ -1049,7 +1049,7 @@ Key bindings:
|
||||
(error "Tree-sitter for C# isn't available"))
|
||||
|
||||
;; Tree-sitter.
|
||||
(setq treesit-primary-parser (treesit-parser-create 'c-sharp))
|
||||
(treesit-parser-create 'c-sharp)
|
||||
|
||||
;; Comments.
|
||||
(c-ts-common-comment-setup)
|
||||
|
@ -133,7 +133,7 @@ Return nil if there is no name or if NODE is not a stage node."
|
||||
:syntax-table dockerfile-ts-mode--syntax-table
|
||||
|
||||
(when (treesit-ready-p 'dockerfile)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'dockerfile))
|
||||
(treesit-parser-create 'dockerfile)
|
||||
|
||||
;; Comments.
|
||||
(setq-local comment-start "# ")
|
||||
|
@ -253,7 +253,7 @@
|
||||
:syntax-table go-ts-mode--syntax-table
|
||||
|
||||
(when (treesit-ready-p 'go)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'go))
|
||||
(treesit-parser-create 'go)
|
||||
|
||||
;; Comments.
|
||||
(setq-local comment-start "// ")
|
||||
@ -453,7 +453,7 @@ what the parent of the node would be if it were a node."
|
||||
:syntax-table go-mod-ts-mode--syntax-table
|
||||
|
||||
(when (treesit-ready-p 'gomod)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'gomod))
|
||||
(treesit-parser-create 'gomod)
|
||||
|
||||
;; Comments.
|
||||
(setq-local comment-start "// ")
|
||||
|
@ -148,7 +148,7 @@ With ARG, do it many times. Negative ARG means move backward."
|
||||
:group 'heex-ts
|
||||
|
||||
(when (treesit-ready-p 'heex)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'heex))
|
||||
(treesit-parser-create 'heex)
|
||||
|
||||
;; Comments
|
||||
(setq-local treesit-thing-settings
|
||||
|
@ -326,7 +326,7 @@ Return nil if there is no name or if NODE is not a defun node."
|
||||
(unless (treesit-ready-p 'java)
|
||||
(error "Tree-sitter for Java isn't available"))
|
||||
|
||||
(setq treesit-primary-parser (treesit-parser-create 'java))
|
||||
(treesit-parser-create 'java)
|
||||
|
||||
;; Comments.
|
||||
(c-ts-common-comment-setup)
|
||||
|
@ -128,7 +128,7 @@ Return nil if there is no name or if NODE is not a defun node."
|
||||
(unless (treesit-ready-p 'json)
|
||||
(error "Tree-sitter for JSON isn't available"))
|
||||
|
||||
(setq treesit-primary-parser (treesit-parser-create 'json))
|
||||
(treesit-parser-create 'json)
|
||||
|
||||
;; Comments.
|
||||
(setq-local comment-start "// ")
|
||||
|
@ -752,7 +752,7 @@ Calls REPORT-FN directly."
|
||||
(use-local-map lua-ts-mode-map)
|
||||
|
||||
(when (treesit-ready-p 'lua)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'lua))
|
||||
(treesit-parser-create 'lua)
|
||||
|
||||
;; Comments.
|
||||
(setq-local comment-start "--")
|
||||
|
@ -7147,7 +7147,7 @@ implementations: `python-mode' and `python-ts-mode'."
|
||||
\\{python-ts-mode-map}"
|
||||
:syntax-table python-mode-syntax-table
|
||||
(when (treesit-ready-p 'python)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'python))
|
||||
(treesit-parser-create 'python)
|
||||
(setq-local treesit-font-lock-feature-list
|
||||
'(( comment definition)
|
||||
( keyword string type)
|
||||
|
@ -1127,7 +1127,7 @@ leading double colon is not added."
|
||||
(unless (treesit-ready-p 'ruby)
|
||||
(error "Tree-sitter for Ruby isn't available"))
|
||||
|
||||
(setq treesit-primary-parser (treesit-parser-create 'ruby))
|
||||
(treesit-parser-create 'ruby)
|
||||
|
||||
(setq-local add-log-current-defun-function #'ruby-ts-add-log-current-function)
|
||||
|
||||
|
@ -507,7 +507,7 @@ See `prettify-symbols-compose-predicate'."
|
||||
:syntax-table rust-ts-mode--syntax-table
|
||||
|
||||
(when (treesit-ready-p 'rust)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'rust))
|
||||
(treesit-parser-create 'rust)
|
||||
|
||||
;; Syntax.
|
||||
(setq-local syntax-propertize-function
|
||||
|
@ -1623,7 +1623,7 @@ not written in Bash or sh."
|
||||
(add-hook 'flymake-diagnostic-functions #'sh-shellcheck-flymake nil t)
|
||||
(add-hook 'hack-local-variables-hook
|
||||
#'sh-after-hack-local-variables nil t)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'bash))
|
||||
(treesit-parser-create 'bash)
|
||||
(setq-local treesit-font-lock-feature-list
|
||||
'(( comment function)
|
||||
( command declaration-command keyword string)
|
||||
|
@ -502,7 +502,7 @@ This mode is intended to be inherited by concrete major modes."
|
||||
:syntax-table typescript-ts-mode--syntax-table
|
||||
|
||||
(when (treesit-ready-p 'typescript)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'typescript))
|
||||
(treesit-parser-create 'typescript)
|
||||
|
||||
;; Indent.
|
||||
(setq-local treesit-simple-indent-rules
|
||||
@ -540,7 +540,7 @@ at least 3 (which is the default value)."
|
||||
:syntax-table typescript-ts-mode--syntax-table
|
||||
|
||||
(when (treesit-ready-p 'tsx)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'tsx))
|
||||
(treesit-parser-create 'tsx)
|
||||
|
||||
;; Comments.
|
||||
(setq-local comment-start "// ")
|
||||
|
@ -1814,7 +1814,7 @@ can also be used to fill comments.
|
||||
(setq-local font-lock-fontify-region-function #'css--fontify-region)
|
||||
|
||||
;; Tree-sitter specific setup.
|
||||
(setq treesit-primary-parser (treesit-parser-create 'css))
|
||||
(treesit-parser-create 'css)
|
||||
(setq-local treesit-simple-indent-rules css--treesit-indent-rules)
|
||||
(setq-local treesit-defun-type-regexp "rule_set")
|
||||
(setq-local treesit-defun-name-function #'css--treesit-defun-name)
|
||||
|
@ -92,7 +92,7 @@ Return nil if there is no name or if NODE is not a defun node."
|
||||
(unless (treesit-ready-p 'html)
|
||||
(error "Tree-sitter for HTML isn't available"))
|
||||
|
||||
(setq treesit-primary-parser (treesit-parser-create 'html))
|
||||
(treesit-parser-create 'html)
|
||||
|
||||
;; Indent.
|
||||
(setq-local treesit-simple-indent-rules html-ts-mode--indent-rules)
|
||||
|
@ -124,7 +124,7 @@ Return nil if there is no name or if NODE is not a defun node."
|
||||
:syntax-table toml-ts-mode--syntax-table
|
||||
|
||||
(when (treesit-ready-p 'toml)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'toml))
|
||||
(treesit-parser-create 'toml)
|
||||
|
||||
;; Comments
|
||||
(setq-local comment-start "# ")
|
||||
|
@ -148,7 +148,7 @@ boundaries. JUSTIFY is passed to `fill-paragraph'."
|
||||
:syntax-table yaml-ts-mode--syntax-table
|
||||
|
||||
(when (treesit-ready-p 'yaml)
|
||||
(setq treesit-primary-parser (treesit-parser-create 'yaml))
|
||||
(treesit-parser-create 'yaml)
|
||||
|
||||
;; Comments.
|
||||
(setq-local comment-start "# ")
|
||||
|
Loading…
Reference in New Issue
Block a user