Hilbish/.hilbishrc.lua

26 lines
543 B
Lua
Raw Normal View History

2021-03-20 00:28:22 +00:00
-- Default Hilbish config
local lunacolors = require 'lunacolors'
local bait = require 'bait'
local ansikit = require 'ansikit'
2021-03-20 22:51:51 +00:00
local function doPrompt(fail)
hilbish.prompt(lunacolors.format(
2022-03-07 02:23:38 +00:00
'{blue}%u {cyan}%d ' .. (fail and '{red}' or '{green}') .. ''
))
end
doPrompt()
bait.catch('command.exit', function(code)
doPrompt(code ~= 0)
2022-08-01 19:02:50 +00:00
print(code:lol())
end)
2021-03-20 22:51:51 +00:00
bait.catch('hilbish.vimMode', function(mode)
if mode ~= 'insert' then
ansikit.cursorStyle(ansikit.blockCursor)
else
ansikit.cursorStyle(ansikit.lineCursor)
end
end)