diff options
author | Andre Souto <suoto@users.noreply.github.com> | 2019-10-18 16:17:54 +0100 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2019-10-18 16:17:54 +0100 |
commit | 5e69aaf4c2b4ffbfd4fbe0af820e23bf559b8e14 (patch) | |
tree | 53a9f2ea1de728310cd86b26230bf35ded413f58 /autoload/ale.vim | |
parent | 9125ec8739f58941a5d6306d51f69d677849efcb (diff) | |
download | ale-5e69aaf4c2b4ffbfd4fbe0af820e23bf559b8e14.zip |
Adding support for LSP `window/showMessage` method (#2652)
* Added base handling for window/showMessage
* Ignoring severity log
* Code formatting
* Added user configurable severity
* Preferring ale#util#ShowMessage over echo'ing directly
* Using format similar to ale_echo_msg_format for consistency
* Updating docs
* Added LSP log config string; improved tests
* Use warning as fallback for incorrect user config
Diffstat (limited to 'autoload/ale.vim')
-rw-r--r-- | autoload/ale.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/autoload/ale.vim b/autoload/ale.vim index 1664e710..ee1a0d54 100644 --- a/autoload/ale.vim +++ b/autoload/ale.vim @@ -5,11 +5,18 @@ " Strings used for severity in the echoed message let g:ale_echo_msg_error_str = get(g:, 'ale_echo_msg_error_str', 'Error') let g:ale_echo_msg_info_str = get(g:, 'ale_echo_msg_info_str', 'Info') +let g:ale_echo_msg_log_str = get(g:, 'ale_echo_msg_log_str', 'Log') let g:ale_echo_msg_warning_str = get(g:, 'ale_echo_msg_warning_str', 'Warning') " Ignoring linters, for disabling some, or ignoring LSP diagnostics. let g:ale_linters_ignore = get(g:, 'ale_linters_ignore', {}) let g:ale_disable_lsp = get(g:, 'ale_disable_lsp', 0) +" LSP window/showMessage format +let g:ale_lsp_show_message_format = get(g:, 'ale_lsp_show_message_format', '%severity%:%linter%: %s') +" Valid values mimic LSP definitions (error, warning and information; log is +" never shown) +let g:ale_lsp_show_message_severity = get(g:, 'ale_lsp_show_message_severity', 'error') + let s:lint_timer = -1 let s:getcmdwintype_exists = exists('*getcmdwintype') |