Add matched text to ALEFindReferences -quickfix for tsserver (#4898)
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-06-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions

* Add matched text to ALEFindReferences -quickfix for tsserver

* Update autoload/ale/references.vim
This commit is contained in:
Bogdan Gusiev
2025-02-16 02:16:01 +01:00
committed by GitHub
parent e5d6d94f71
commit ce2b002c03

View File

@@ -17,18 +17,21 @@ function! ale#references#ClearLSPData() abort
endfunction
function! ale#references#FormatTSResponseItem(response_item, options) abort
let l:match = substitute(a:response_item.lineText, '^\s*\(.\{-}\)\s*$', '\1', '')
if get(a:options, 'open_in') is# 'quickfix'
return {
\ 'filename': a:response_item.file,
\ 'lnum': a:response_item.start.line,
\ 'col': a:response_item.start.offset,
\ 'text': l:match,
\}
else
return {
\ 'filename': a:response_item.file,
\ 'line': a:response_item.start.line,
\ 'column': a:response_item.start.offset,
\ 'match': substitute(a:response_item.lineText, '^\s*\(.\{-}\)\s*$', '\1', ''),
\ 'match': l:match,
\}
endif
endfunction