[review] Changes
This commit is contained in:
parent
6a163fd5c1
commit
718d9a2690
5 changed files with 46 additions and 53 deletions
|
@ -237,7 +237,8 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
|
||||||
(lsp!))))
|
(lsp!))))
|
||||||
|
|
||||||
(when (and (featurep! +lsp) (featurep! :tools lsp +eglot))
|
(when (and (featurep! +lsp) (featurep! :tools lsp +eglot))
|
||||||
;; TODO : test this value
|
;; NOTE : This setting is untested yet
|
||||||
|
(after! eglot
|
||||||
;; IS-MAC custom configuration
|
;; IS-MAC custom configuration
|
||||||
(when IS-MAC
|
(when IS-MAC
|
||||||
(add-to-list 'eglot-workspace-configuration
|
(add-to-list 'eglot-workspace-configuration
|
||||||
|
@ -271,7 +272,7 @@ the children of class at point."
|
||||||
(goto-char (car (eglot--range-region range)))))
|
(goto-char (car (eglot--range-region range)))))
|
||||||
(cl-loop for child across (plist-get node :children)
|
(cl-loop for child across (plist-get node :children)
|
||||||
do (push (cons (1+ depth) child) tree)))))))
|
do (push (cons (1+ depth) child) tree)))))))
|
||||||
(eglot--error "Hierarchy unavailable"))))
|
(eglot--error "Hierarchy unavailable")))))
|
||||||
|
|
||||||
(use-package! ccls
|
(use-package! ccls
|
||||||
:when (and (featurep! +lsp) (not (featurep! :tools lsp +eglot)))
|
:when (and (featurep! +lsp) (not (featurep! :tools lsp +eglot)))
|
||||||
|
|
|
@ -14,10 +14,7 @@
|
||||||
:config
|
:config
|
||||||
(set-popup-rule! "^\\*eglot-help" :size 0.35 :quit t :select t)
|
(set-popup-rule! "^\\*eglot-help" :size 0.35 :quit t :select t)
|
||||||
(when (featurep! :checkers syntax)
|
(when (featurep! :checkers syntax)
|
||||||
;; Eager loading which is okay-ish since we want eglot to feed flycheck as soon as possible.
|
(after! flycheck
|
||||||
(load! "flycheck-eglot.el")
|
(load! "flycheck-eglot.el")))
|
||||||
(require 'flycheck-eglot))
|
|
||||||
(set-lookup-handlers! 'eglot--managed-mode
|
(set-lookup-handlers! 'eglot--managed-mode
|
||||||
:documentation #'+eglot/documentation-lookup-handler
|
:documentation #'+eglot/documentation-lookup-handler))
|
||||||
:definition '(xref-find-definitions :async t)
|
|
||||||
:references '(xref-find-references :async t)))
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
;;; flycheck-eglot --- Hacky eglot support in flycheck -*- lexical-binding: t; -*-
|
;;; flycheck-eglot --- Hacky eglot support in flycheck -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
(require 'flycheck)
|
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(defun flycheck-eglot--start (checker callback)
|
(defun flycheck-eglot--start (checker callback)
|
||||||
"Clean up errors when done.
|
"Clean up errors when done.
|
||||||
|
@ -44,7 +42,7 @@ CALLBACK is the function that we need to call when we are done, on all the error
|
||||||
|
|
||||||
(push 'eglot flycheck-checkers)
|
(push 'eglot flycheck-checkers)
|
||||||
|
|
||||||
(defun +doom/eglot-prefer-flycheck-h ()
|
(defun +doom-eglot-prefer-flycheck-h ()
|
||||||
(when eglot--managed-mode
|
(when eglot--managed-mode
|
||||||
(when-let ((current-checker (flycheck-get-checker-for-buffer)))
|
(when-let ((current-checker (flycheck-get-checker-for-buffer)))
|
||||||
(unless (equal current-checker 'eglot)
|
(unless (equal current-checker 'eglot)
|
||||||
|
@ -53,8 +51,6 @@ CALLBACK is the function that we need to call when we are done, on all the error
|
||||||
(flycheck-mode 1)
|
(flycheck-mode 1)
|
||||||
(flymake-mode -1)))
|
(flymake-mode -1)))
|
||||||
|
|
||||||
(add-hook 'eglot--managed-mode-hook #'+doom/eglot-prefer-flycheck-h)
|
(add-hook 'eglot--managed-mode-hook #'+doom-eglot-prefer-flycheck-h)
|
||||||
|
|
||||||
(provide 'flycheck-eglot)
|
|
||||||
;;; flycheck-eglot.el ends here
|
;;; flycheck-eglot.el ends here
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
|
|
||||||
(if (featurep! +eglot)
|
(if (featurep! +eglot)
|
||||||
(package! eglot :pin "d99a4478a9")
|
(package! eglot :pin "d99a4478a9")
|
||||||
(progn
|
|
||||||
(package! lsp-mode :pin "81d62d581b21d847783831e6e5ca9d3c63fe9a4d")
|
(package! lsp-mode :pin "81d62d581b21d847783831e6e5ca9d3c63fe9a4d")
|
||||||
(package! lsp-ui :pin "271b47cb33f11915295911f7cf8575f8a82a5e1c")
|
(package! lsp-ui :pin "271b47cb33f11915295911f7cf8575f8a82a5e1c")
|
||||||
(when (featurep! :completion ivy)
|
(when (featurep! :completion ivy)
|
||||||
(package! lsp-ivy :pin "dce58b5509271bbedb53ba9d0278dcb563a43977"))
|
(package! lsp-ivy :pin "dce58b5509271bbedb53ba9d0278dcb563a43977"))
|
||||||
(when (featurep! :completion helm)
|
(when (featurep! :completion helm)
|
||||||
(package! helm-lsp :pin "6b5ce182d7c94c62b55b8f7d0c7e643b2c30e560"))))
|
(package! helm-lsp :pin "6b5ce182d7c94c62b55b8f7d0c7e643b2c30e560")))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue