Use c-ts-common's comment setup in go-ts-mode (bug#75978)
c-ts-common-comment-setup sets up fill-paragraph-function, which enables filling for comments. * lisp/progmodes/go-ts-mode.el (go-ts-mode): (go-mod-ts-mode): Use c-ts-common-comment-setup.
This commit is contained in:
parent
316893ca38
commit
1931425748
1 changed files with 3 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue