`((c ,@c-ts-mode--thing-settings)
(cpp ,@c-ts-mode--thing-settings)))
- ;; Nodes like struct/enum/union_specifier can appear in
- ;; function_definitions, so we need to find the top-level node.
- (setq-local treesit-defun-prefer-top-level t)
;; When the code is in incomplete state, try to make a better guess
;; about which node to indent against.
;; Font-lock.
(setq-local treesit-font-lock-settings (c-ts-mode--font-lock-settings 'c))
;; Navigation.
+ ;;
+ ;; Nodes like struct/enum/union_specifier can appear in
+ ;; function_definitions, so we need to find the top-level node.
(setq-local treesit-defun-tactic 'top-level)
(treesit-major-mode-setup)
;; Indent.
(setq-local treesit-simple-indent-rules js--treesit-indent-rules)
;; Navigation.
- (setq-local treesit-defun-prefer-top-level t)
(setq-local treesit-defun-type-regexp
(rx (or "class_declaration"
"method_definition"
"statement")))
(text ,(regexp-opt '("comment" "text"))))))
- ;; Nodes like struct/enum/union_specifier can appear in
- ;; function_definitions, so we need to find the top-level node.
- (setq-local treesit-defun-prefer-top-level t)
-
;; Indent.
(when (eq php-ts-mode-indent-style 'wordpress)
(setq-local indent-tabs-mode t))
(treesit-node-parent node))
"interpolation"))))))))
- ;; AFAIK, Ruby can not nest methods
- (setq-local treesit-defun-prefer-top-level nil)
-
;; Imenu.
(setq-local imenu-create-index-function #'ruby-ts--imenu)
;; Comments.
(c-ts-common-comment-setup)
- (setq-local treesit-defun-prefer-top-level t)
;; Electric
(setq-local electric-indent-chars