mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-06 18:07:46 +08:00
Support for LSP/tsserver Code Actions (#3437)
* Added tsserver and LSP code action support. * tsserver refactors support added. * Handling special case when new text is added after new line symbol. * ale#code_action#ApplyChanges simplified. * Initial attempt on LSP Code Actions. * workspace/executeCommand added. * Some null checks added. * Add last column to LSP Code Action message. * Pass diagnostics to LSP code action. Previously ApplyChanges code was applied from top-to-bottom that required extra parameters to track progress and there was bug. I have changed code to bottom-to-top approach as that does not require those extra parameters and solved the bug. Tested with typescript-language-server and it is working.
This commit is contained in:
committed by
GitHub
parent
1ec573bf0d
commit
01800a23ad
@@ -3,6 +3,9 @@ Before:
|
||||
|
||||
let g:ale_enabled = 0
|
||||
|
||||
" Enable fix end-of-line as tests below expect that
|
||||
set fixeol
|
||||
|
||||
runtime autoload/ale/code_action.vim
|
||||
runtime autoload/ale/util.vim
|
||||
|
||||
@@ -211,6 +214,7 @@ Execute(End of file can be modified):
|
||||
\)
|
||||
|
||||
AssertEqual g:test.text + [
|
||||
\ '',
|
||||
\ 'type A: string',
|
||||
\ 'type B: number',
|
||||
\ '',
|
||||
|
||||
Reference in New Issue
Block a user