joaotavora/breadcrumb
حول
يعرض موضعك داخل مشروع كبير في سطر الترويسة في Emacs.
مشاريع أخرىالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- +١
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلM-x breadcrumb-mode

Usage
Breadcrumbs are sequences of short strings indicating where you are in some big tree-like maze that is probably your code. Hopefully the screenshot above clears it up.
M-x breadcrumb-modeis a global mode. Will try to turn itself on conservatively and only if there's a project.M-x breadcrumb-local-modeis a buffer-local minor mode, if you don't want the default heuristics for turning it on everywhere.M-x breadcrumb-opinionated-modeis if you're feeling naughty.
There's not much more to it. Breadcrumb will try to query imenu.el
and project.el for the best information.
Installation
You can download breadcrumb via GNU Elpa with M-x package-install RET breadcrumb RET
Or if you'd like to install it manually you can download breadcrumb.el and put it in
your load-path similar to (add-to-list 'load-path "~/path/to/breadcrumb.el")
More usage
If you want some leet modeline you may also manually put the mode-line constructs
(:eval (breadcrumb-imenu-crumbs))
and
(:eval (breadcrumb-project-crumbs))
in your settings of the mode-line-format or header-line-format
variables.
An opinionated mode line
If you had trouble understanding the previous section and just want to
get breadcrumbs on the mode-line, you can call M-x breadcrumb-opinionated-mode. Looks like this:

Call it again to turn it off. To adjust it, customize
breadcrumb-opinionated-mlf. Its parts are variables such as
breadcrumb-opinionated-project-crumbs and
breadcrumb-opinionated-imenu-crumbs, which you can also use in your
own mode-line-format or header-line-format.
Icons and other decorations
breadcrumb-opinionated-mode prefixes crumbs with Nerd
Font icons: a repository icon for the project, a file
icon for the file, and the VS Code "Codicons" for Imenu crumbs whose
kind is known (function, class, namespace, etc). The kind comes from
an imenu-kind text property on the names in the Imenu index, which
Eglot sets from the language server's symbol kinds. Eglot is the only
package I know of that does this, so other Imenu crumbs get no icon.
Imenu icons are colored by kind, with the same font-lock faces that nerd-icons-corfu uses for completion. The file icon is generic, unless the nerd-icons package is installed: then files get its colored per-file-type icons, and file-less buffers an icon for their major mode. I recommend it, and it works in terminals too. I also recommend the Victor Mono Nerd Font.
The icons, and the mode line's other Nerd Font glyphs, come from
breadcrumb-opinionated-nerd, an alist you can customize. Set it to
nil for no Nerd Font glyphs at all, say in a terminal without a Nerd
Font. To get the same icons outside of the opinionated mode line:
(setq breadcrumb-decorate-function #'breadcrumb-opinionated-nerdify)
More generally, breadcrumb-decorate-function can do any decoration
you wish. Go read its docstring.
Tweaks
The shape and size of each breadcrumb groups may be tweaked via
breadcrumb-imenu-max-length, breadcrumb-project-max-length,
breadcrumb-imenu-crumb-separator, and
breadcrumb-project-crumb-separator.
The structure each of the breadcrumbs varies depending on whether
either project.el and imenu.el (or both) can do useful things for
your buffer.
For Project breadcrumbs, this depends on whether project.el's
project-current can guess what project the current buffer belongs
to.
For Imenu breadcrumbs, this varies. Depending on the major-mode
author's taste, the Imenu tree (in variable imenu--index-alist) may
have different structure. Sometimes, minor mode also tweak the Imenu
tree in useful ways. For example, with recent Eglot (I think Eglot
1.14+), managed buffers get extra region info added to it, which makes
Breadcrumb show "richer" paths.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…