summaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ravi-init-cpp.el10
-rw-r--r--lisp/ravi-init-lsp.el9
-rw-r--r--lisp/ravi-init-python.el2
3 files changed, 4 insertions, 17 deletions
diff --git a/lisp/ravi-init-cpp.el b/lisp/ravi-init-cpp.el
index 759de5f..7437caa 100644
--- a/lisp/ravi-init-cpp.el
+++ b/lisp/ravi-init-cpp.el
@@ -444,16 +444,6 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named
(use-package ccls
:if (eq ravi/use-cpp-lsp-backend 'ravi/use-cpp-ccls)
- :init
- (progn
- (defun ravi/ccls-enable ()
- (unless (file-remote-p default-directory)
- (condition-case nil
- (progn
- (require 'ccls)
- (lsp-deferred))
- (user-error nil))))
- (add-hook 'c-mode-common-hook #'ravi/ccls-enable))
:config
(setq ccls-executable (ravi/emacs-file "site-lisp/ccls/Release/ccls"))
(setq ccls-args `(,(concat "--log-file="
diff --git a/lisp/ravi-init-lsp.el b/lisp/ravi-init-lsp.el
index 2bf105a..e5be4fe 100644
--- a/lisp/ravi-init-lsp.el
+++ b/lisp/ravi-init-lsp.el
@@ -30,12 +30,9 @@
(use-package lsp-mode
:init
(setq lsp-keymap-prefix "H-l")
- (defun ravi/add-lsp-with-local-variables ()
- ;; The t at the end is to make hack-local-variables-hook buffer-local
- (add-hook 'hack-local-variables-hook 'lsp-deferred 0 t))
- :hook ((c-mode-hook . ravi/add-lsp-with-local-variables)
- (c++-mode-hook . ravi/add-lsp-with-local-variables)
- ;; (python-mode . ravi/add-lsp-with-local-variables)
+ :hook ((c-mode-hook . lsp-deferred)
+ (c++-mode-hook . lsp-deferred)
+ ;; (python-mode . lsp-deferred)
(lsp-mode-hook . lsp-enable-which-key-integration))
:commands (lsp lsp-deferred)
:bind (:map lsp-mode-map
diff --git a/lisp/ravi-init-python.el b/lisp/ravi-init-python.el
index 3878db3..154cfdc 100644
--- a/lisp/ravi-init-python.el
+++ b/lisp/ravi-init-python.el
@@ -66,7 +66,7 @@
in-site-lisp)))
(when (file-exists-p pyright-executable)
(lsp-dependency 'pyright `(:system ,pyright-executable))))
- (ravi/add-lsp-with-local-variables))
+ (lsp-deferred))
:hook (python-mode-hook . ravi/start-lsp-pyright))
(bind-key "<return>" 'newline-and-indent python-mode-map)