summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2019-07-04 16:57:15 +0200
committerAlan Pearce2019-07-04 16:57:15 +0200
commit69fd821f9d2b808322b5caf3001ce6333a1e4990 (patch)
treef958c9b3314b44024a0b1f868be71fbc6c3de5d0
parent598f3659971e4829f2f4b61d4a07b0c930ce022f (diff)
downloaddotfiles-69fd821f9d2b808322b5caf3001ce6333a1e4990.tar.lz
dotfiles-69fd821f9d2b808322b5caf3001ce6333a1e4990.tar.zst
dotfiles-69fd821f9d2b808322b5caf3001ce6333a1e4990.zip
Emacs: fix company-tabnine/lsp interaction
-rw-r--r--emacs/.emacs.d/main.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index c510a0c..cff3c9d 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 ("<M-tab>" #'company-tabnine-call-other-backends
             "<C-tab>" #'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)