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

Error with lsp-ui-imenu: Wrong type argument: integer-or-marker-p #16051

Closed
spacegoing opened this issue Jun 23, 2023 · 5 comments
Closed

Error with lsp-ui-imenu: Wrong type argument: integer-or-marker-p #16051

spacegoing opened this issue Jun 23, 2023 · 5 comments

Comments

@spacegoing
Copy link

spacegoing commented Jun 23, 2023

Description :octocat:

While working with Python in Spacemacs using the LSP backend, I
encountered an error when trying to use lsp-ui-imenu. After
activating lsp-ui-imenu and pressing RET to jump to a symbol, I
receive the error message Wrong type argument: integer-or-marker-p.

Reproduction guide 🪲

  • Open a Python file.
  • Enable lsp-mode and lsp-ui-imenu (if not already enabled).
  • Activate lsp-ui-imenu (e.g., SPC m i in the Python file).
  • Attempt to jump to a symbol using RET.

Observed behaviour: 👀 💔

receive the error message

funcall-interactively: Wrong type argument: integer-or-marker-p,
#<overlay from 2868 to 2879 in doe_net.py> [3 times]

Expected behaviour: ❤️ 😄

I expected lsp-ui-imenu to navigate to the selected symbol in the Python file without error.

System Info 💻

  • OS: darwin
  • Emacs: 28.2
  • Spacemacs: 0.999.0
  • Spacemacs branch: develop (rev. c6c5082)
  • Graphic display: t
  • Running in daemon: nil
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(helm auto-completion better-defaults emacs-lisp git markdown org sdefaults sdired sorg c-c++ python
      (python :variables python-backend 'lsp python-lsp-server 'pylsp python-formatter 'yapf)
      html yaml sql csv docker
      (latex :variables latex-enable-auto-fill t latex-enable-folding t)
      semantic lsp spell-checking syntax-checking)
  • System configuration features: ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS TOOLKIT_SCROLL_BARS ZLIB
@stskyblade
Copy link

I have tested it with same develop (rev. c6c5082) and layers as yours. Everything seems OK. I can jump to any symbol without error. I can't reproduce your bug. I don't have sdefaults, sdired, sorg layers.

Maybe you can remove those three layers and try again.
Or you can debug it by youself. You can use toggle-debug-on-error to find out what's going wrong.

@stskyblade
Copy link

Will be fixed on emacs-lsp/lsp-ui#753

This is because Semantic layer conflicts with the lsp-ui package. You can remove Semantic layer to solve this question.

@smile13241324
Copy link
Collaborator

I have tested this on latest develop and this seems to be fixed already upstream. Please reopen if the issue still appears on latest develop.

For reference here is my config section:

     semantic
     (python :variables
             python-backend 'lsp
             python-lsp-server 'pylsp
             python-test-runner 'pytest
             python-formatter 'lsp
             python-format-on-save t
             python-save-before-test t
             python-sort-imports-on-save t)

I have used the following tiny test file:

print("asdf")
print("asdf")
print("asdf")
print("asdf")
print("asdf")
print("asdf")
print("asdf")
print("asdf")
print("asdf")
print("asdf")

def my_func():
    print("something")

my_func()

I have made sure that I can jump from the name of my_func to its definition as well as that I can activate lsp-imenu with SPC m g M.

@spacegoing
Copy link
Author

@smile13241324 just confim it is fixed for me too.

@spacegoing
Copy link
Author

@smile13241324 yet my org-toc-show stops working now ToT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants