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

Display syntax tree of current buffer in separate buffer. #72

Open
m4xxed opened this issue Dec 15, 2023 · 2 comments
Open

Display syntax tree of current buffer in separate buffer. #72

m4xxed opened this issue Dec 15, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@m4xxed
Copy link

m4xxed commented Dec 15, 2023

This is an idea I had while reading through your documentation and trying out the package.
I noticed that the echo area displays a subtree around the current node that is being walked over, and I loved it!

I would love to get more into structural editing and I think one possible way of aiding new users (of structural editing) would be a small "minimap" of the current syntax tree, either on the left like the minimap package, or maybe like a treemacs-buffer on the right.

If there is something in development currently, I'd love to find out, and if you have a good starting pointer for me on where I can get the current buffers syntax tree that is used by combobulate, I'd appreciate that, too. I would be willing to try to implement it myself, just looking for a good place to start.

@mickeynp
Copy link
Owner

It's definitely on the cards, but I'd love if someone worked on that. Give this function in combobulate-display.el a try: combobulate-display-draw-complete-tree.

You can try it out like so: M-: (combobulate-display-draw-complete-tree (combobulate-root-node) "*combobulate-tree*") then switch to *combobulate-tree* buffer.

For making a buffer appear on the right consistently you can use the side bar feature:

https://www.masteringemacs.org/article/demystifying-emacs-window-manager

@mickeynp mickeynp added enhancement New feature or request good first issue Good for newcomers labels Dec 16, 2023
@mickeynp
Copy link
Owner

Another thing on my todo list is to incorporate SVG elements into the tree for select node types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants