Emacs: Replace company-lsp with company-capf.
company-lsp is no longer supported and will be deprecated soon.
This commit is contained in:
parent
3b33519849
commit
c6fdc804a5
|
@ -1,6 +1,6 @@
|
|||
;;; lsp.el --- Language Server Protocol. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-07-07T05:30:48+0200>
|
||||
;; Time-stamp: <2020-07-07T05:33:56+0200>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -20,7 +20,8 @@
|
|||
(lsp-auto-guess-root t) ; Don't ask for project root.
|
||||
(lsp-eldoc-render-all t)
|
||||
(lsp-restart 'auto-restart)
|
||||
(lsp-enable-semantic-highlighting t)) ; Needs clangd 11(?).
|
||||
(lsp-enable-semantic-highlighting t) ; Needs clangd 11(?).
|
||||
(lsp-prefer-capf t))
|
||||
:config (progn
|
||||
(setq lsp-clients-clangd-args '("--compile-commands-dir=build"))
|
||||
;; Add “-clang-tidy” to clangd args if the version supports it.
|
||||
|
@ -30,7 +31,10 @@
|
|||
(put 'lsp-clients-clangd-args 'safe-local-variable #'consp))
|
||||
:bind ("C-c C-f" . lsp-execute-code-action)
|
||||
:hook ((c++-mode . lsp)
|
||||
(c-mode . lsp)))
|
||||
(c-mode . lsp)
|
||||
;; ↓ See <https://github.com/emacs-lsp/lsp-mode/issues/1736>. ↓
|
||||
(lsp-managed-mode
|
||||
. (lambda () (setq-local company-backends '(company-capf))))))
|
||||
|
||||
;; Eye-candy and flycheck support for lsp-mode.
|
||||
(use-package lsp-ui
|
||||
|
@ -51,13 +55,6 @@
|
|||
:hook ((lsp-mode . lsp-ui-mode)
|
||||
(lsp-ui-peek-mode . my/lsp-ws-toggle)))
|
||||
|
||||
;; Completions with lsp-mode.
|
||||
(use-package company-lsp
|
||||
:demand t
|
||||
:after (lsp-mode company)
|
||||
:custom (company-lsp-cache-candidates 'auto)
|
||||
:config (push 'company-lsp company-backends))
|
||||
|
||||
;; ivy interface to lsp-mode.
|
||||
(use-package lsp-ivy
|
||||
:demand t
|
||||
|
|
Loading…
Reference in New Issue
Block a user