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

YAML documents only show the top-level node name #28

Open
erhhung opened this issue Jan 27, 2024 · 1 comment
Open

YAML documents only show the top-level node name #28

erhhung opened this issue Jan 27, 2024 · 1 comment

Comments

@erhhung
Copy link

erhhung commented Jan 27, 2024

I installed this package hoping it would provide more context when editing long YAML docs like Kubernetes manifests and values files, but when moving my cursor around with the major mode enabled, I only see the current name of the top-level node (node with no indentation) instead of the full hierarchical path—at least the path to the parent of the node my cursor is on.

Is my expected behavior not the intended one?

@joaotavora
Copy link
Owner

Is my expected behavior not the intended one?

More or less. Breadcrumb doesn't do any syntactic analysis of the buffer's contents. It relies on an existing Imenu backend to do that. If the Imenu information your yaml mode provides is relatively poor, so will Breadcrumb's hints.

Unfortunately, both yaml-mode and yaml-ts-mode which I have just tried have very poor Imenu information. You could submit a bug report to bug-gnu-emacs@gnu.org to request this enhancement (or try to add it yourself! maybe it would be easier for yaml-ts-mode).

Alternatively, there's another package which sometimes does a good job in supplying good Imenu info, Eglot. After installing yaml-language-server and typing M-x eglot ,I got very decent results with Breadcrumb:

image

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

2 participants