Output ALE global variables for :ALEInfo

This commit is contained in:
w0rp
2017-02-13 23:15:52 +00:00
parent 0589022c76
commit c0814934af
2 changed files with 74 additions and 8 deletions

View File

@@ -1,6 +1,32 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: This file implements debugging information for ALE
let s:global_variable_list = [
\ 'ale_echo_cursor',
\ 'ale_echo_msg_error_str',
\ 'ale_echo_msg_format',
\ 'ale_echo_msg_warning_str',
\ 'ale_enabled',
\ 'ale_keep_list_window_open',
\ 'ale_lint_delay',
\ 'ale_lint_on_enter',
\ 'ale_lint_on_save',
\ 'ale_lint_on_text_changed',
\ 'ale_linter_aliases',
\ 'ale_linters',
\ 'ale_open_list',
\ 'ale_set_highlights',
\ 'ale_set_loclist',
\ 'ale_set_quickfix',
\ 'ale_set_signs',
\ 'ale_sign_column_always',
\ 'ale_sign_error',
\ 'ale_sign_offset',
\ 'ale_sign_warning',
\ 'ale_statusline_format',
\ 'ale_warn_about_trailing_whitespace',
\]
function! s:GetLinterVariables(filetype, linter_names) abort
let l:variable_list = []
let l:filetype_parts = split(a:filetype, '\.')
@@ -28,6 +54,12 @@ function! s:EchoLinterVariables(variable_list) abort
endfor
endfunction
function! s:EchoGlobalVariables() abort
for l:key in s:global_variable_list
echom 'let g:' . l:key . ' = ' . string(get(g:, l:key, v:null))
endfor
endfunction
function! ale#debugging#Info() abort
let l:filetype = &filetype
@@ -56,4 +88,7 @@ function! ale#debugging#Info() abort
echom ' Linter Variables:'
echom ''
call s:EchoLinterVariables(l:variable_list)
echom ' Global Variables:'
echom ''
call s:EchoGlobalVariables()
endfunction