From: Gabriel Santos via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 75141@debbugs.gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>, Yuan Fu <casouri@gmail.com>
Subject: bug#75141: [PATCH] Add button navigation to treesit-explorer
Date: Sat, 04 Jan 2025 18:17:10 -0300 [thread overview]
Message-ID: <87pll28ejt.fsf@disroot.org> (raw)
In-Reply-To: <87msgh5j0j.fsf@disroot.org>
[-- Attachment #1: Type: text/plain, Size: 74 bytes --]
Here is the updated patch, with "f" and "b" removed.
--
Gabriel Santos
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] Add button navigation to treesit-explorer --]
[-- Type: text/x-patch, Size: 1078 bytes --]
From 1224d220985edd9de0731b26c0be96eb9f6b35a1 Mon Sep 17 00:00:00 2001
From: Gabriel Santos <gabrielsantosdesouza@disroot.org>
Date: Fri, 27 Dec 2024 10:43:20 -0300
Subject: [PATCH] Add button navigation to treesit-explorer
* lisp/treesit.el (treesit--explorer-tree-mode-map):
Define it as a child of special-mode-map,
adding keys for button navigation.
---
lisp/treesit.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lisp/treesit.el b/lisp/treesit.el
index e643eb48654..ef27a370bc2 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -4041,6 +4041,16 @@ covers point. PARSER-NAME are unique."
"Mode for displaying syntax trees for `treesit-explore-mode'."
nil)
+(defvar-keymap treesit--explorer-tree-mode-map
+ :doc "Keymap for the treesit tree explorer.
+
+Navigates from button to button."
+ :parent special-mode-map
+ "n" #'forward-button
+ "p" #'backward-button
+ "TAB" #'forward-button
+ "<backtab>" #'backward-button)
+
(defun treesit-explorer-switch-parser (parser)
"Switch explorer to use PARSER."
(interactive
--
2.47.1
next prev parent reply other threads:[~2025-01-04 21:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-27 13:54 bug#75141: [PATCH] Add button navigation to treesit-explorer Gabriel Santos via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 11:57 ` Eli Zaretskii
2025-01-04 20:02 ` Yuan Fu
2025-01-04 20:25 ` Gabriel Santos via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 21:17 ` Gabriel Santos via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
[not found] <87sepy8grz.fsf@disroot.org>
[not found] ` <E8383DF2-495D-4151-A12C-A6B7D8B6B1B1@gmail.com>
2025-01-08 14:31 ` Gabriel Santos via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pll28ejt.fsf@disroot.org \
--to=bug-gnu-emacs@gnu.org \
--cc=75141@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=gabrielsantosdesouza@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).