From 01800a23addb52788265e0349f519556dab41301 Mon Sep 17 00:00:00 2001 From: Dalius Dobravolskas Date: Sat, 14 Nov 2020 12:15:17 +0200 Subject: 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. --- doc/ale.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/ale.txt b/doc/ale.txt index eb8f0275..4263f698 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -3106,6 +3106,18 @@ ALERename *ALERename* in those files will not be updated. +ALECodeAction *ALECodeAction* + + Code Actions support for `tsserver`. + + There are two different kind of actions supported for `tsserver`. If run in + normal mode then code fix will be attempted if there is error in that line. + If there are multiple code fixes available use will be shown input to choose + one. In visual mode `tsserver` will be queries for applicable refactors + (e.g. extract to constant or extract to function) and user will be given + choice to select the one he/she likes. + + ALERepeatSelection *ALERepeatSelection* Repeat the last selection displayed in the preview window. -- cgit v1.2.3