commit 36173440533a00f1e0e67a0c63919677f3a2b78e parent dd9b9953e9497fad648df36c18ede16eedcc8da7 Author: Vincent Demeester <vincent@sbr.pm> Date: Mon, 6 Apr 2020 13:21:26 +0200 emacs: remove lsp-mode for now Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
M | tools/emacs/config/setup-completion.el | | | 52 | ---------------------------------------------------- |
M | tools/emacs/config/setup-go.el | | | 15 | --------------- |
2 files changed, 0 insertions(+), 67 deletions(-)
diff --git a/tools/emacs/config/setup-completion.el b/tools/emacs/config/setup-completion.el @@ -210,58 +210,6 @@ Ivy-powered commands, using `ivy-prescient-re-builder'." :config (company-prescient-mode 1)) - (use-package lsp-mode - :commands (lsp lsp-deferred) - :config - (setq lsp-enable-file-watchers nil - lsp-gopls-staticcheck t - lsp-gopls-complete-unimported t - lsp-eldoc-render-all nil - lsp-enable-snippet nil - lsp-enable-links nil - lsp-enable-folding nil - lsp-enable-completion-at-point t - lsp-diagnostic-package :auto - lsp-restart 'auto-restart - lsp-auto-guess-root t - lsp-ui-sideline-enable nil - lsp-ui-sideline-show-hover nil - lsp-ui-sideline-delay 2.0 - lsp-ui-doc-enable nil - lsp-ui-doc-max-width 30 - lsp-ui-doc-max-height 15 - lsp-document-highlight-delay 2.0 - lsp-ui-flycheck-enable nil - ;; @see https://github.com/emacs-lsp/lsp-mode/pull/1498 - ;; and read code related to auto configure - ;; require clients could be slow and that's only thing auto configure - ;; could do for me. Manual loading of client is faster. - lsp-auto-configure t - ; Use flycheck instead of flymake - lsp-prefer-flymake nil) - ;; don't ping LSP lanaguage server too frequently - (defvar lsp-on-touch-time 0) - (defadvice lsp-on-change (around lsp-on-change-hack activate) - ;; don't run `lsp-on-change' too frequently - (when (> (- (float-time (current-time)) - lsp-on-touch-time) 30) ;; 30 seconds - (setq lsp-on-touch-time (float-time (current-time))) - ad-do-it)) - :hook ((go-mode . lsp-deferred) - (python-mode . lsp-deferred))) - - (with-eval-after-load "company" - (use-package company-lsp - :after lsp-mode - :config - (push 'company-lsp company-backends))) - - (with-eval-after-load "projectile" - (defun my-set-projectile-root () - (when lsp--cur-workspace - (setq projectile-project-root (lsp--workspace-root lsp--cur-workspace)))) - (add-hook 'lsp-before-open-hook #'my-set-projectile-root)) - )) (provide 'setup-completion) diff --git a/tools/emacs/config/setup-go.el b/tools/emacs/config/setup-go.el @@ -15,25 +15,10 @@ (set (make-local-variable 'compile-command) "go build -v && go test -v && go vet"))) -(use-package lsp-go - :after (lsp-mode go-mode) - :config - ;;Set up before-save hooks to format buffer and add/delete imports. - ;;Make sure you don't have other gofmt/goimports hooks enabled. - (defun lsp-go-install-save-hooks () - ;; (add-hook 'before-save-hook #'lsp-format-buffer t t) - (add-hook 'before-save-hook #'lsp-organize-imports t t)) - (add-hook 'go-mode-hook #'lsp-go-install-save-hooks) - ) - (use-package flycheck-golangci-lint :hook (go-mode . flycheck-golangci-lint-setup) :config (setq flycheck-golangci-lint-tests t)) -(use-package dap-go - :disabled - :after dap-mode) - (use-package gotest :after go-mode)