Add janet-format fixer for Janet (#5142)

This commit is contained in:
David Gouch
2026-07-25 22:22:54 +09:00
committed by GitHub
parent 5fab9dec37
commit 5d4b0881b7
7 changed files with 62 additions and 0 deletions
+5
View File
@@ -737,6 +737,11 @@ let s:default_registry = {
\ 'suggested_filetypes': ['clojure'],
\ 'description': 'formatter and linter for clojure files',
\ },
\ 'janet-format': {
\ 'function': 'ale#fixers#janet_format#Fix',
\ 'suggested_filetypes': ['janet'],
\ 'description': 'Formatter for janet files',
\ },
\ 'typstyle': {
\ 'function': 'ale#fixers#typstyle#Fix',
\ 'suggested_filetypes': ['typst'],
+13
View File
@@ -0,0 +1,13 @@
" Author: David Gouch <dgouch@gmail.com>
" Description: Format with janet-format https://github.com/janet-lang/spork
call ale#Set('janet_janet_format_executable', 'janet-format')
function! ale#fixers#janet_format#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'janet_janet_format_executable')
return {
\ 'command': ale#Escape(l:executable) . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction