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

anaconda-mode activates despite using (lsp +eglot) #7823

Open
4 tasks done
egr95 opened this issue Apr 15, 2024 · 0 comments
Open
4 tasks done

anaconda-mode activates despite using (lsp +eglot) #7823

egr95 opened this issue Apr 15, 2024 · 0 comments
Labels
is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet

Comments

@egr95
Copy link

egr95 commented Apr 15, 2024

I confirm that...

  • I have searched the issue tracker, documentation, FAQ, Discourse, and Google, in case this issue has already been reported/resolved.

  • I have read "How to Debug Issues", and will use it to provide as much information about this issue as possible.

  • The issue can be reproduced on the latest available commit of Doom.

  • The issue can be reproduced on a stable release of Emacs, such as 27, 28, or 29. (Unstable versions end in .50, .60, or .9x)

Expected behavior

When I open a python buffer, anaconda-mode should not be enabled since I am already using eglot. I think the issue is because the following condition fails to detect that I am running eglot, perhaps because eglot--managed-mode is only activated after the condition is checked? See doom/modules/lang/python/config.el

  (add-hook! 'python-mode-local-vars-hook :append
    (defun +python-init-anaconda-mode-maybe-h ()
      "Enable `anaconda-mode' if `lsp-mode' is absent and
`python-shell-interpreter' is present."
      (unless (or (bound-and-true-p lsp-mode)
                  (bound-and-true-p eglot--managed-mode)
                  (bound-and-true-p lsp--buffer-deferred)
                  (not (executable-find python-shell-interpreter t)))
        (anaconda-mode +1))))

Current behavior

When I open a python buffer, anaconda-mode is enabled. Bindings like M-. should not be taken over by anaconda-mode.

Steps to reproduce

Enable (lsp +eglot) and (python +lsp) in init.el. Then open emacs and open a python buffer. Then use C-h m to check the active modes, and you will see anaconda-mode show up.

System Information

https://pastebin.com/LnNZuLUD

@egr95 egr95 added is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet
Projects
Status: No status
Development

No branches or pull requests

1 participant