fix: Change _options to _project_options

This commit is contained in:
jhlink
2020-07-28 19:48:27 -04:00
parent 0e6578cf65
commit 5377272d20
4 changed files with 17 additions and 16 deletions

View File

@@ -4,12 +4,13 @@
function! s:set_variables() abort
for l:ft in ['c', 'cpp']
call ale#Set(l:ft . '_astyle_executable', 'astyle')
call ale#Set(l:ft . '_astyle_options', '')
call ale#Set(l:ft . '_astyle_project_options', '')
endfor
endfunction
call s:set_variables()
function! ale#fixers#astyle#Var(buffer, name) abort
let l:ft = getbufvar(str2nr(a:buffer), '&filetype')
let l:ft = l:ft =~# 'cpp' ? 'cpp' : 'c'
@@ -20,7 +21,7 @@ endfunction
function! ale#fixers#astyle#Fix(buffer) abort
let l:executable = ale#fixers#astyle#Var(a:buffer, 'executable')
let l:filename = ale#Escape(bufname(a:buffer))
let l:options = ale#fixers#astyle#Var(a:buffer, 'options')
let l:options = ale#fixers#astyle#Var(a:buffer, 'project_options')
let l:command = ' --stdin='
return {