Skip to content

MaximilianLloyd/ascii.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ascii.nvim

A curated collection of ascii art and utilities for your Neovim dashboard.

Preview of ascii.nvim in neovim


Installaton

  • Install using your favorite plugin manager (here i'm using packer)
  • Nui.nvim is used for preview functionality
...
use({ "MaximilianLloyd/ascii.nvim", requires = {
	"MunifTanjim/nui.nvim"
} })
...

Then set the art you want in your dashboard configuration. Here i'm using alpha.nvim.

Set a specific art piece.

...
local options = {
	header = {
		...
	    val = ascii.art.animals.dogs.lucky,
		...
	},
}
...

Or get one at random

...
local options = {
	header = {
		...
	    val = ascii.get_random_global(),
		...
	},
}
...

Or get one at random from a subcategory.

...
local options = {
	header = {
		...
	    val = ascii.get_random("animals", "dogs"),
		...
	},
}
...

Usage

See what subcategories are available.

Browse using poup

Browse using popup

lua require("ascii").preview()

j to move down in the list and k to move up. The path is the value that can be copied to your dashboard configuration.


Non-popup way to browse plugins.

lua require("ascii").print_category("animals")

Preview the art available in the subcategory.

lua require("ascii").print_subcategory("animals", "dogs")

Get a random art piece from a subcategory.

lua require("ascii").get_random("animals", "dogs")

Telescope integration

telescope.load_extension("ascii")

Then you can do

Telescope ascii

To fuzzy search. The name is the path you can use in your config.

Categories

Create your own and contribute

I created a small rust cli tool that converts ascii art to a lua table, so you can easily contribute.


Todo

  • Implement telescope extension
  • Random independant of category