Skip to content

BUG: document_symbols no method get_depth #1710

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

Closed
3 tasks done
BigfootN opened this issue Mar 4, 2025 · 6 comments · Fixed by #1712
Closed
3 tasks done

BUG: document_symbols no method get_depth #1710

BigfootN opened this issue Mar 4, 2025 · 6 comments · Fixed by #1712
Labels
bug Something isn't working

Comments

@BigfootN
Copy link

BigfootN commented Mar 4, 2025

Did you check docs and existing issues?

  • I have read all the docs.
  • I have searched the existing issues.
  • I have searched the existing discussions.

Neovim Version (nvim -v)

0.10.4

Operating System / Version

Archlinux

Describe the Bug

Hello,

I am trying to use the source document_symbols but when I hit enter I get the following message:

Image

document_symbols/commands.lua:21: attempt to call method 'get_depth' (a nil value)

Screenshots, Traceback

No response

Steps to Reproduce

In my case it was a lua file with lua_ls as lsp.

  1. Setup the plugin with an empty configuration with document_symbols in the sources
  2. Execute the command:
Neotree source=document_symbols position=left
  1. Try to hit enter on a symbol in the Neotree with the symbols
  2. The error described appears

Expected Behavior

If it is a leaf there should be nothing. If the symbol is a node, the symbol should expand showing it's children symbols.

Your Configuration

{
	sources = {
		"filesystem",
		"document_symbols"
	}
}
@BigfootN BigfootN added the bug Something isn't working label Mar 4, 2025
@pynappo
Copy link
Collaborator

pynappo commented Mar 4, 2025

is there a specific lua file you can reproduce this with or does everything error for you? i'm not able to reproduce this for some reason

@BigfootN
Copy link
Author

BigfootN commented Mar 4, 2025

Thank you for your quick response.

No, unfortunately not. As long as the lua file has symbols it's what I observed.

Sorry for not being of more help.

@pynappo
Copy link
Collaborator

pynappo commented Mar 4, 2025

no worries, i will take a closer look in a few hours. it looks like i may have broken something with merging #1651

@pynappo
Copy link
Collaborator

pynappo commented Mar 4, 2025

If you have some time, can you test the #1712 PR and see if that helps your issue?

edit: actually, i'll just immediately merge it into main. you can checkout the main branch instead.

@BigfootN
Copy link
Author

BigfootN commented Mar 4, 2025

Thank you. I'll check that tomorrow and open an issue if there's an issue.

Thank you for your time 👍

@onnttf
Copy link

onnttf commented Mar 14, 2025

If you have some time, can you test the #1712 PR and see if that helps your issue?

edit: actually, i'll just immediately merge it into main. you can checkout the main branch instead.

Hi, I tested with this commit and I don't get this error anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants