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
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(when (featurep 'treesit)
|
||||
;; Set `tab-width' in `after-change-major-mode-hook' function too.
|
||||
(setopt go-ts-mode-indent-offset 2)
|
||||
(add-hook 'after-change-major-mode-hook
|
||||
(defun on-go-ts-mode-hook ()
|
||||
(when (derived-mode-p 'go-ts-mode 'go-mod-ts-mode)
|
||||
(setq-local tab-width 2))))
|
||||
(add-hook 'go-ts-mode-hook (lambda ()
|
||||
(setq-local tab-width 2)))
|
||||
(add-to-list 'auto-mode-alist `(,(rx ".go" eos) . go-ts-mode)))
|
||||
#+end_src
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user