Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lsp): add a bypass for magit-find-file #6309

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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