Skip to content

Latest commit

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ashaar.nvim

Screenshot

This is a little neovim plugin I wrote, inspired by fortune though this is specifically designed for couplets.

A single couplet in urdu is called a sher while a collection of them is called ash'aar.

This plugin is a collection of urdu couplets (displayed in the roman script) for alpha-nvim. On startup, it chooses from a list of authors and then chooses a couplet from that author. All of the couplets are in the external file ashaar_list.lua in an extensible format :

localashaar= {
Shakespeare= {
"For sweetest things turn sourest by their deeds : Lilies that fester, smell far worse than weeds."
}
}
--Obviously the collection is of urdu poets and the couplets are in urdu.

The couplet 'syntax' is just <line1><space>:<space><line2>. Like To be or not to be : That is the question.

Quick Start

Lazy

Go to wherever you have configured alpha-nvim and put ashaar as a dependency :

return {
'goolord/alpha-nvim',
dependencies= {
'nvim-tree/nvim-web-devicons',
'shellheim/ashaar.nvim',
},
config=function()
...end,
}

Now use this in your alpha-nvim config :

return {
'goolord/alpha-nvim',
dependencies= {
'nvim-tree/nvim-web-devicons',
'shellheim/ashaar.nvim',
},
config=function()
localalpha=require'alpha'localdashboard=require'alpha.themes.dashboard'-- Call ashaarlocalashaar=require'ashaar'-- Set headerdashboard.section.header.val= {
'███▄▄▄▄ ▄████████ ▄██████▄ ▄█ █▄ ▄█ ▄▄▄▄███▄▄▄▄ ',
'███▀▀▀██▄ ███ ███ ███ ███ ███ ███ ███ ▄██▀▀▀███▀▀▀██▄ ',
'███ ███ ███ █▀ ███ ███ ███ ███ ███▌ ███ ███ ███ ',
'███ ███ ▄███▄▄▄ ███ ███ ███ ███ ███▌ ███ ███ ███ ',
'███ ███ ▀▀███▀▀▀ ███ ███ ███ ███ ███▌ ███ ███ ███ ',
'███ ███ ███ █▄ ███ ███ ███ ███ ███ ███ ███ ███ ',
'███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ',
' ▀█ █▀ ██████████ ▀██████▀ ▀██████▀ █▀ ▀█ ███ █▀ ',
}
dashboard.section.buttons.val= {
dashboard.button('n', ' > New File', '<cmd>ene<CR>'),
dashboard.button('f', '󰱼 > Find File', '<cmd>Telescope find_files<CR>'),
dashboard.button('r', ' > Find Recent Files', '<cmd>Telescope oldfiles<CR>'),
dashboard.button('c', ' > Configuration', '<cmd>edit ~/.config/nvim/init.lua<CR>'),
dashboard.button('q', ' > Quit NVIM', '<cmd>qa<CR>'),
}
-- Give the returned couplet to alpha's footerdashboard.section.footer.val=ashaar()
alpha.setup(dashboard.opts)
end,
}

About

A neovim plugin to display random urdu couplets on startup.

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages