default hilbish config
This commit is contained in:
		
							parent
							
								
									7932d087ea
								
							
						
					
					
						commit
						b5c73ea916
					
				
					 1 changed files with 26 additions and 0 deletions
				
			
		
							
								
								
									
										26
									
								
								config/hilbish/init.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								config/hilbish/init.lua
									
										
									
									
									
										Normal 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)
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue