From 69fd821f9d2b808322b5caf3001ce6333a1e4990 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 4 Jul 2019 16:57:15 +0200 Subject: Emacs: fix company-tabnine/lsp interaction --- emacs/.emacs.d/main.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index c510a0cd..cff3c9da 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -323,10 +323,13 @@ With two prefix arguments, write out the day and month name." (use-package all-the-icons) (use-package company-tabnine + :after (company-lsp) :commands (company-tabnine) :general ("" #'company-tabnine-call-other-backends "" #'company-tabnine-call-other-backends) :config (progn + (if (fboundp #'company-lsp) + (add-to-list 'company-backends #'company-lsp)) (add-to-list 'company-backends #'company-tabnine))) ;;; Documentation @@ -510,16 +513,24 @@ With two prefix arguments, write out the day and month name." :custom ((flymake-error-bitmap '(left-vertical-bar compilation-error)) (flymake-warning-bitmap '(left-vertical-bar compilation-warning)))) +(use-package company-lsp + :commands (company-lsp)) (use-package lsp-mode :ghook ('(typescript-mode-hook js-mode-hook) #'lsp) + :functions (lsp--flymake-setup) + :gfhook 'lsp--flymake-setup :custom ((lsp-auto-guess-root t) + (lsp-auto-configure nil) (lsp-prefer-flymake t) (lsp-enable-symbol-highlighting nil)) :config (progn (add-to-list 'lsp-language-id-configuration '(js-mode . "javascript")))) +(use-package lsp-clients + :after (lsp-mode)) + (use-package lsp-ui :after lsp-mode :ghook ('lsp-mode-hook) -- cgit 1.4.1