Git Product home page Git Product logo

all-the-icons-completion's Introduction

all-the-icons-completion

https://melpa.org/packages/all-the-icons-completion-badge.svg

Add icons to completion candidates using the built in completion metadata functions.

This package can be used with the default completions buffer: https://user-images.githubusercontent.com/19792685/127399489-91048936-95ee-4189-acc4-f88d7bd8b1a1.png

Or with a completion framework such as Vertico: https://user-images.githubusercontent.com/19792685/127399499-00101758-3dad-4983-abd1-0c3a58927f00.png

Requirements

This package only supports Emacs version 26.1 and above.

It requires all-the-icons.

Installation

This package can be installed from MELPA, or by cloning it and putting it in the load path.

Setup

Add the following to your init-file:

(all-the-icons-completion-mode)

If you want to use it as an addon to marginalia-mode, add the following to your init-file:

(all-the-icons-completion-mode)
(add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup)

This will ensure that it is on when marginalia-mode is on and is off when it’s off.

Customization

Completion icons are retrieved through the generic function all-the-icons-completion-get-icon, with different methods per category. To add icons for a new category or override existing behaviour, define a new method, e.g.:

(cl-defmethod all-the-icons-completion-get-icon (cand (_cat (eql custom-category)))
  "Return the icon for the candidate CAND of completion category custom-category."
  (get-icon-for-custom-category-cand cand))

Acknowledgements

Thanks to @minad and @noctuid for getting the ball rolling on the functions used in this package.

all-the-icons-completion's People

Contributors

iyefrat avatar stebalien avatar yilin-zhang avatar sethidden avatar protesilaos avatar roshanshariff avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.