alphapapa / magit-todos

Show source files' TODOs (and FIXMEs, etc) in Magit status buffer
GNU General Public License v3.0
711 stars 46 forks source link
emacs git magit

+TITLE: magit-todos

NOTE: To avoid having this in the info manual, we use HTML rather than Org syntax; it still appears with the GitHub renderer.

+HTML:

This package displays keyword entries from source code comments and Org files in the Magit status buffer. Activating an item jumps to it in its file. By default, it uses keywords from [[https://github.com/tarsius/hl-todo][hl-todo]], minus a few (like =NOTE=).

:CONTENTS:

[[screenshots/matrix.png]]

Items from Org files can be displayed, and can be fontified like in Org buffers:

[[screenshots/fancy-org.png]]

Items can also be automatically grouped in a customizable way, which can be helpful in large repos:

[[screenshots/emacs-grouped.png]]

This shows grouping items by the first path component, then keyword, then filename, and with optional keyword header fontification:

[[screenshots/emacs-grouped-by-path.png]]

Items in =KEYWORD(username):= format are also read:

[[screenshots/thiderman.png]]

Items specific to the current branch (or =git diff=) can be displayed in a separate list:

[[screenshots/branch-list.png]]

** External scanner

One of the following external scanners is required:

Most Linux systems should have the latter two by default, but some non-standard systems may not. For example, on MacOS you may use [[https://brew.sh/][Homebrew]] to install =ripgrep=, or =git= with PCRE support, like: ~brew reinstall --with-pcre2 git~.

** Emacs package

If you installed from MELPA, you're done!

*** Manually

Install these required packages:

Then put this file in your =load-path=, and put this in your init file:

+BEGIN_SRC elisp

(require 'magit-todos)

+END_SRC

:CONTENTS:

Activate ~magit-todos-mode~. Then open a Magit status buffer, or run ~magit-todos-list~ to show a dedicated to-do list buffer.

To activate ~magit-todos-mode~ automatically, a recommended configuration for your init file is:

+begin_src elisp

(use-package magit-todos :after magit :config (magit-todos-mode 1))

+end_src

** Key bindings

In Magit status buffer:

With point in to-do list:

** Commands

Helm and Ivy are also supported. Note that the =helm= and =ivy= packages are not required, nor does this package depend on them; they are only used if present. Note as well that these commands can be used directly from source buffers, independently of Magit.

** Tips

*** TRAMP :PROPERTIES: :CUSTOM_ID: TRAMP :END:

Remote repositories (i.e. ones accessed via TRAMP) are not automatically scanned for to-dos unless option ~magit-todos-update-remote~ is enabled. Otherwise, a scan may be manually initiated with the command ~magit-todos-update~.

Note that if TRAMP can't find the scanner configured in option ~magit-todos-scanner~, you may need to use directory-local variables to either add the correct path to variable ~tramp-remote-path~ or choose a different scanner.

** 1.8-pre

Additions

Changes

Removals

** 1.7.2

Fixes

** 1.7.1

Fixes

** 1.7

Changed

Fixed

** 1.6

Added

Changed

Fixed

Removed

Internal

** 1.5.3

Fixes

** 1.5.2

Fixes

** 1.5.1

Fixes

** 1.5

Added

Changed

Removed

** 1.4.3

Fixed

** 1.4.2

Fixed

** 1.4.1

Fixed

** 1.4

Added

Fixed

Updated

Internal

** 1.3

Added

Internal

** 1.2

Added

Fixed

Worked Around

Removed

** 1.1.8

Fixed

** 1.1.7

Fixed

** 1.1.6

Fixed

** 1.1.5

Fixed

** 1.1.4

Fixes

** 1.1.3

Fixes

** 1.1.2

Fixes

** 1.1.1

Fixes

** 1.1

Additions

Changes

Fixes

** 1.0.4

Fixes

** 1.0.3

Fixes

** 1.0.2

Fixes

** 1.0.1

Fixes

** 1.0.0

Initial release.

GPLv3

Local Variables:

before-save-hook: org-make-toc

End: