commit f351d885b24130e4e9b13e5ea73ea88a1a3208c6
parent 3d736b6be21cd9019a69830de548891f606094af
Author: Vincent Demeester <vincent@sbr.pm>
Date: Mon, 14 Mar 2022 16:14:40 +0100
tools/emacs: lsp config and flycheck removal
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
3 files changed, 22 insertions(+), 52 deletions(-)
diff --git a/tools/emacs/config/config-compile.el b/tools/emacs/config/config-compile.el
@@ -66,51 +66,5 @@
(add-hook 'compilation-filter-hook #'vde/colorize-compilation-buffer)
(add-hook 'compilation-mode-hook #'vde/goto-address-mode))
-;; FIXME(vdemeester) switch to flymake instead
-(use-package flycheck
- :if (and (not noninteractive)
- (not (eq system-type 'windows-nt)))
- :hook (prog-mode . flycheck-mode)
- :commands (flycheck-mode flycheck-next-error flycheck-previous-error)
- :init
- (dolist (where '((emacs-lisp-mode-hook . emacs-lisp-mode-map)
- (haskell-mode-hook . haskell-mode-map)
- (js2-mode-hook . js2-mode-map)
- (c-mode-common-hook . c-mode-base-map)))
- (add-hook (car where)
- `(lambda ()
- (bind-key "M-n" #'flycheck-next-error ,(cdr where))
- (bind-key "M-p" #'flycheck-previous-error ,(cdr where)))))
- :config
- (defalias 'show-error-at-point-soon
- 'flycheck-show-error-at-point)
- (setq-default flycheck-idle-change-delay 1.2
- ;; Remove newline checks, since they would trigger an immediate check
- ;; when we want the idle-change-delay to be in effect while editing.
- flycheck-check-syntax-automatically '(save
- idle-change
- mode-enabled))
- ;; Each buffer gets its own idle-change-delay because of the
- ;; buffer-sensitive adjustment above.
- (defun magnars/adjust-flycheck-automatic-syntax-eagerness ()
- "Adjust how often we check for errors based on if there are any.
- This lets us fix any errors as quickly as possible, but in a
- clean buffer we're an order of magnitude laxer about checking."
- (setq flycheck-idle-change-delay
- (if flycheck-current-errors 0.3 3.0)))
- (make-variable-buffer-local 'flycheck-idle-change-delay)
- (add-hook 'flycheck-after-syntax-check-hook
- #'magnars/adjust-flycheck-automatic-syntax-eagerness)
- (defun flycheck-handle-idle-change ()
- "Handle an expired idle time since the last change.
- This is an overwritten version of the original
- flycheck-handle-idle-change, which removes the forced deferred.
- Timers should only trigger inbetween commands in a single
- threaded system and the forced deferred makes errors never show
- up before you execute another command."
- (flycheck-clear-idle-change-timer)
- (flycheck-buffer-automatically 'idle-change)))
-;; -UseFlycheck
-
(provide 'config-compile)
;;; config-compile.el ends here
diff --git a/tools/emacs/config/programming-go.el b/tools/emacs/config/programming-go.el
@@ -20,11 +20,6 @@
(setq-default company-go-show-annotation t)
(push 'company-go company-backends))
-;; (use-package flycheck-golangci-lint
-;; :commands (flycheck-golangci-lint-setup)
-;; :hook (go-mode . flycheck-golangci-lint-setup)
-;; :config (setq flycheck-golangci-lint-tests t))
-
(use-package gotest
:after go-mode)
diff --git a/tools/emacs/config/programming-lsp.el b/tools/emacs/config/programming-lsp.el
@@ -9,7 +9,28 @@
:init
(setq lsp-keymap-prefix "C-c l")
:config
- (setq lsp-eldoc-render-all t))
+ (setq )
+ :custom
+ ;; turn this on to capture client/server comms before
+ ;; submitting bug reports with `lsp-workspace-show-log`
+ (lsp-log-io nil)
+ ;; (lsp-lens-enable t)
+ (lsp-eldoc-enable-hover t)
+ ;; (lsp-enable-indentation nil)
+ (lsp-prefer-flymake t)
+ (lsp-ui-sideline-enable nil)
+ (lsp-ui-doc-enable t)
+ (lsp-ui-imenu-enable t)
+ (lsp-ui-sideline-ignore-duplicate t)
+ (lsp-enable-folding t)
+ (lsp-enable-dap-auto-configure nil) ; Don't try to auto-enable dap: this creates a lot of binding clashes
+ (lsp-headerline-breadcrumb-enable nil)
+ (lsp-modeline-code-actions-enable nil)
+ (lsp-modeline-diagnostics-enable nil)
+ (lsp-idle-delay .01)
+ (lsp-keymap-prefix nil)
+ (lsp-eldoc-render-all t)
+ (lsp-file-watch-threshold 4000))
(use-package consult-lsp
:after (lsp))