default hilbish config

This commit is contained in:
♥ Minnie ♥ 2023-04-18 02:38:17 +08:00
parent 7932d087ea
commit b5c73ea916

26
config/hilbish/init.lua Normal file
View file

@ -0,0 +1,26 @@
-- Default Hilbish config
local lunacolors = require 'lunacolors'
local bait = require 'bait'
local ansikit = require 'ansikit'
local function doPrompt(fail)
hilbish.prompt(lunacolors.format(
'{blue}%u {cyan}%d ' .. (fail and '{red}' or '{green}') .. ''
))
end
print(lunacolors.format(hilbish.greeting))
doPrompt()
bait.catch('command.exit', function(code)
doPrompt(code ~= 0)
end)
bait.catch('hilbish.vimMode', function(mode)
if mode ~= 'insert' then
ansikit.cursorStyle(ansikit.blockCursor)
else
ansikit.cursorStyle(ansikit.lineCursor)
end
end)