kakoune: add pint as formatter
This commit is contained in:
		
							parent
							
								
									5da937fb46
								
							
						
					
					
						commit
						cc0ddda78a
					
				
					 4 changed files with 13 additions and 0 deletions
				
			
		| 
						 | 
					@ -124,6 +124,7 @@
 | 
				
			||||||
      zbar
 | 
					      zbar
 | 
				
			||||||
      wl-clipboard
 | 
					      wl-clipboard
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					    pint-fmt = [ ];
 | 
				
			||||||
    powerplay-led-idle = [
 | 
					    powerplay-led-idle = [
 | 
				
			||||||
      bash
 | 
					      bash
 | 
				
			||||||
      libinput
 | 
					      libinput
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										7
									
								
								scripts/pint-fmt
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										7
									
								
								scripts/pint-fmt
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,7 @@
 | 
				
			||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					file="$(mktemp --tmpdir=/dev/shm).php"
 | 
				
			||||||
 | 
					cat - >"$file"
 | 
				
			||||||
 | 
					./vendor/bin/pint --quiet "$file"
 | 
				
			||||||
 | 
					cat "$file"
 | 
				
			||||||
 | 
					rm "$file"
 | 
				
			||||||
| 
						 | 
					@ -133,6 +133,7 @@ in
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      emmet-cli
 | 
					      emmet-cli
 | 
				
			||||||
      nodePackages.prettier
 | 
					      nodePackages.prettier
 | 
				
			||||||
 | 
					      pint-fmt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      aspell
 | 
					      aspell
 | 
				
			||||||
      aspellDicts.en
 | 
					      aspellDicts.en
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,6 +30,10 @@ hook global WinSetOption filetype=angular %[
 | 
				
			||||||
    add-highlighter buffer/angular ref html
 | 
					    add-highlighter buffer/angular ref html
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hook global BufCreate .*\.php %{
 | 
				
			||||||
 | 
					    set buffer formatcmd 'pint-fmt'
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
hook global BufCreate .*\.js %{
 | 
					hook global BufCreate .*\.js %{
 | 
				
			||||||
    set buffer formatcmd 'prettier --parser babel'
 | 
					    set buffer formatcmd 'prettier --parser babel'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue