summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-13 23:15:52 +0000
committerw0rp <devw0rp@gmail.com>2017-02-13 23:15:52 +0000
commitc0814934af98c47cdfcd3c4e7a290cef30f1a4a0 (patch)
tree2b75bceda3faad4676f1f6dd9d8da551c5cd0cdb /autoload
parent0589022c76f7b656ea90595150dbbb635e49b003 (diff)
downloadale-c0814934af98c47cdfcd3c4e7a290cef30f1a4a0.zip
Output ALE global variables for :ALEInfo
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/debugging.vim35
1 files changed, 35 insertions, 0 deletions
diff --git a/autoload/ale/debugging.vim b/autoload/ale/debugging.vim
index 468b5038..e56aea5b 100644
--- a/autoload/ale/debugging.vim
+++ b/autoload/ale/debugging.vim
@@ -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