mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
chore(lang): Tweak company and whitespace options for golang
Setting company-echo-delay to 0.5 instead of 0 will help reduce unneeded and intrusive code-completion popups while in the middle of typing. It seemed like a good idea when I first set it, but after some use, no thanks. The whitespace-style tweak, effectively removes "indentation" from the list of items whitespace-cleanup deals with on save. Indentation is already being fixed by lsp-mode's before-save hooks, and whitespace-cleanup was not very intelligent about it. It specifically replaced all instances of four consecutive spaces in raw string literals with a tab, which caused issues with multi-line raw strings containing JSON.
This commit is contained in:
@@ -31,8 +31,9 @@
|
||||
|
||||
(defun siren-go-mode-setup ()
|
||||
(setq-local tab-width 4
|
||||
company-echo-delay 0
|
||||
company-minimum-prefix-length 1)
|
||||
company-echo-delay 0.5
|
||||
company-minimum-prefix-length 1
|
||||
whitespace-style (delete 'indentation whitespace-style))
|
||||
|
||||
(add-hook 'before-save-hook #'lsp-format-buffer t t)
|
||||
(add-hook 'before-save-hook #'lsp-organize-imports t t)
|
||||
|
||||
Reference in New Issue
Block a user