mirror of
https://github.com/dense-analysis/ale.git
synced 2026-07-29 19:26:46 +08:00
Add janet-format fixer for Janet (#5142)
This commit is contained in:
@@ -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'],
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user