diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index cdd6e427db7..5110ab890f3 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -28,6 +28,7 @@ ;;; Code: (require 'treesit) +(require 'c-ts-common) (eval-when-compile (require 'rx)) (declare-function treesit-parser-create "treesit.c") @@ -258,9 +259,7 @@ (treesit-parser-create 'go) ;; Comments. - (setq-local comment-start "// ") - (setq-local comment-end "") - (setq-local comment-start-skip (rx "//" (* (syntax whitespace)))) + (c-ts-common-comment-setup) ;; Navigation. (setq-local treesit-defun-type-regexp @@ -458,9 +457,7 @@ what the parent of the node would be if it were a node." (treesit-parser-create 'gomod) ;; Comments. - (setq-local comment-start "// ") - (setq-local comment-end "") - (setq-local comment-start-skip (rx "//" (* (syntax whitespace)))) + (c-ts-common-comment-setup) ;; Indent. (setq-local indent-tabs-mode t