Skip to content

Commit

Permalink
fix(lsp): add a bypass for magit-find-file
Browse files Browse the repository at this point in the history
  • Loading branch information
Patryk27 committed Jul 11, 2022
1 parent 33c5f37 commit 458758b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/tools/lsp/+lsp.el
Expand Up @@ -67,6 +67,13 @@ Can be a list of backends; accepts any value `company-backends' accepts.")
:implementations '(lsp-find-implementation :async t)
:type-definition #'lsp-find-type-definition)

(defadvice! +lsp--skip-during-magit-preview (fn &rest args)
"Ensure that `lsp' is not initialized when user opens the buffer through
`magit-find-file' and friends."
:around #'lsp
(unless (bound-and-true-p magit-buffer-revision)
(apply fn args)))

(defadvice! +lsp--respect-user-defined-checkers-a (fn &rest args)
"Ensure user-defined `flycheck-checker' isn't overwritten by `lsp'."
:around #'lsp-diagnostics-flycheck-enable
Expand Down

0 comments on commit 458758b

Please sign in to comment.