Skip to content

Commit

Permalink
projectorganizer: Add popup panel for navigation
Browse files Browse the repository at this point in the history
This feature allows quick navigation do document/workspace symbols
based on their names, open files, and line numbers.

The panel's code is mostly stolen from the LSP plugin which in turn
stole it from the Colomban Wendling's Commander plugin.
  • Loading branch information
techee committed Aug 11, 2024
1 parent 644550b commit d9b714d
Show file tree
Hide file tree
Showing 10 changed files with 958 additions and 8 deletions.
1 change: 1 addition & 0 deletions po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ pretty-printer/src/PluginEntry.c
pretty-printer/src/ConfigUI.c

# ProjectOrganizer
projectorganizer/src/prjorg-goto-anywhere.c
projectorganizer/src/prjorg-main.c
projectorganizer/src/prjorg-menu.c
projectorganizer/src/prjorg-project.c
Expand Down
7 changes: 7 additions & 0 deletions projectorganizer/README
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ Project Organizer adds some extra entries under the Project menu:
the properties, it opens a project file with the same base name (without extension)
matching header patterns (and vice versa). If the files are already open, it
just switches the document tabs. Nothing happens if no matching file is found.
* Go to anywhere, Go to document symbol, Go to workspace symbol, Go to line -
these items allow to perform jump to the entered destination. The popup window is
identical for all of these actions, the only difference is the pre-filled prefix
that determines the type of the go to. No prefix performs the search in open and
project files, @ performs the search in current document's symbols, # performs
the search in all workspace symbols, and : performs navigation to the specified
line.

Each of these entries can be assigned a key binding under Edit->Preferences->Keybindings.

Expand Down
6 changes: 5 additions & 1 deletion projectorganizer/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ projectorganizer_la_SOURCES = \
prjorg-utils.h \
prjorg-utils.c \
prjorg-menu.h \
prjorg-menu.c
prjorg-menu.c \
prjorg-goto-panel.h \
prjorg-goto-panel.c \
prjorg-goto-anywhere.h \
prjorg-goto-anywhere.c

projectorganizer_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DG_LOG_DOMAIN=\"ProjectOrganizer\"
Expand Down
Loading

0 comments on commit d9b714d

Please sign in to comment.