diff options
author | Raphael Nepomuceno <58113327+rphln@users.noreply.github.com> | 2020-09-14 12:11:16 -0300 |
---|---|---|
committer | Raphael Nepomuceno <58113327+rphln@users.noreply.github.com> | 2020-09-14 12:11:16 -0300 |
commit | 9769565f882b43512105d1b63a2f4ceda7a39d86 (patch) | |
tree | 16a70dd875f7dd9bb0680a7cd59e745499a3e479 /autoload | |
parent | 08295ce17405cb5f6c80d2f726262493bfd21210 (diff) | |
download | ale-9769565f882b43512105d1b63a2f4ceda7a39d86.zip |
Collapse spaces and lines in the completion menu.
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/completion.vim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim index ecd93600..882fd5e6 100644 --- a/autoload/ale/completion.vim +++ b/autoload/ale/completion.vim @@ -606,11 +606,14 @@ function! ale#completion#ParseLSPCompletions(response) abort let l:doc = l:doc.value endif + " Collapse whitespaces and line breaks into a single space. + let l:detail = substitute(get(l:item, 'detail', ''), '\_s\+', ' ', 'g') + let l:result = { \ 'word': l:word, \ 'kind': ale#completion#GetCompletionSymbols(get(l:item, 'kind', '')), \ 'icase': 1, - \ 'menu': get(l:item, 'detail', ''), + \ 'menu': l:detail, \ 'info': (type(l:doc) is v:t_string ? l:doc : ''), \} " This flag is used to tell if this completion came from ALE or not. |