kakone: try to auto-format when possible
This commit is contained in:
		
							parent
							
								
									3fe411010d
								
							
						
					
					
						commit
						fd5fcbccee
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -4,6 +4,10 @@ try %{
 | 
			
		|||
    add-highlighter shared/python/code/function regex '\b([a-zA-Z_][a-zA-Z0-9_]*)\s*\(' 1:function
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
hook global BufWritePre '.*' %{
 | 
			
		||||
    try format
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
hook global WinSetOption filetype=sh %{
 | 
			
		||||
    set buffer formatcmd 'shfmt -s -ci -i "4"'
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue