2021-03-20 00:28:22 +00:00
|
|
|
-- Default Hilbish config
|
2022-02-22 01:14:49 +00:00
|
|
|
local lunacolors = require 'lunacolors'
|
|
|
|
local bait = require 'bait'
|
2022-03-06 14:08:42 +00:00
|
|
|
local ansikit = require 'ansikit'
|
2021-03-20 22:51:51 +00:00
|
|
|
|
2022-03-13 20:12:34 +00:00
|
|
|
local function doPrompt(fail)
|
2022-02-22 01:14:49 +00:00
|
|
|
hilbish.prompt(lunacolors.format(
|
2022-03-07 02:23:38 +00:00
|
|
|
'{blue}%u {cyan}%d ' .. (fail and '{red}' or '{green}') .. '∆ '
|
2021-03-30 23:48:37 +00:00
|
|
|
))
|
|
|
|
end
|
|
|
|
|
2021-12-31 17:25:53 +00:00
|
|
|
print(lunacolors.format(hilbish.greeting))
|
2021-04-03 17:14:14 +00:00
|
|
|
|
2021-03-30 23:48:37 +00:00
|
|
|
doPrompt()
|
|
|
|
|
2021-04-05 21:27:55 +00:00
|
|
|
bait.catch('command.exit', function(code)
|
|
|
|
doPrompt(code ~= 0)
|
2021-03-30 23:48:37 +00:00
|
|
|
end)
|
2021-03-20 22:51:51 +00:00
|
|
|
|
2022-03-06 14:08:42 +00:00
|
|
|
bait.catch('hilbish.vimMode', function(mode)
|
|
|
|
if mode ~= 'insert' then
|
|
|
|
ansikit.cursorStyle(ansikit.blockCursor)
|
|
|
|
else
|
|
|
|
ansikit.cursorStyle(ansikit.lineCursor)
|
|
|
|
end
|
|
|
|
end)
|