Clean up "lst:setup-go"
This commit is contained in:
parent
17a25a336c
commit
7ac3b2321f
@ -4977,12 +4977,9 @@ Links for further investigation are:
|
|||||||
#+name: lst:setup-go
|
#+name: lst:setup-go
|
||||||
#+begin_src emacs-lisp -n :results silent
|
#+begin_src emacs-lisp -n :results silent
|
||||||
(when (featurep 'treesit)
|
(when (featurep 'treesit)
|
||||||
;; Set `tab-width' in `after-change-major-mode-hook' function too.
|
|
||||||
(setopt go-ts-mode-indent-offset 2)
|
(setopt go-ts-mode-indent-offset 2)
|
||||||
(add-hook 'after-change-major-mode-hook
|
(add-hook 'go-ts-mode-hook (lambda ()
|
||||||
(defun on-go-ts-mode-hook ()
|
(setq-local tab-width 2)))
|
||||||
(when (derived-mode-p 'go-ts-mode 'go-mod-ts-mode)
|
|
||||||
(setq-local tab-width 2))))
|
|
||||||
(add-to-list 'auto-mode-alist `(,(rx ".go" eos) . go-ts-mode)))
|
(add-to-list 'auto-mode-alist `(,(rx ".go" eos) . go-ts-mode)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user