Skip to content

Commit b97c8fc

Browse files
committed
Fix jsonnetfmt error "Undefined variable: l:supported_filetypes"
1 parent 64be2b8 commit b97c8fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autoload/codefmt/jsonnetfmt.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
let s:plugin = maktaba#plugin#Get('codefmt')
22

3+
let s:SUPPORTED_FILETYPES = ['json', 'jsonnet']
4+
35

46
""
57
" @private
@@ -14,10 +16,8 @@ function! codefmt#jsonnetfmt#GetFormatter() abort
1416
return executable(s:plugin.Flag('jsonnetfmt_executable'))
1517
endfunction
1618

17-
let l:supported_filetypes = ['json', 'jsonnet']
18-
1919
function l:formatter.AppliesToBuffer() abort
20-
return index(l:supported_filetypes, &filetype) >= 0
20+
return index(s:SUPPORTED_FILETYPES, &filetype) >= 0
2121
endfunction
2222

2323
""

0 commit comments

Comments
 (0)