File tree 3 files changed +15
-1
lines changed
3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ applying.
13
13
* [ ] break-down by edit and not by file
14
14
* [ ] one buffer for all changes in a file, view-port shifts on selection
15
15
* [ ] buffer contents updates based on selected changes
16
+ * [ ] Allow sorting list by token type that changes (e.g. var, class, comment)
16
17
* [x] allow disabling the preview
17
18
18
19
## Inspired by
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ local util = require("vim.lsp.util")
4
4
5
5
local M = {}
6
6
7
+ -- The original workspace_edit from the std library of vim for backup and resets.
7
8
local apply_workspace_edit = util .apply_workspace_edit
8
9
9
10
function M .setup (_ )
@@ -29,6 +30,12 @@ M.rename = function(new_name, opts)
29
30
vim .lsp .buf .rename (new_name , opts )
30
31
end
31
32
33
+ M .rename_preview = function (new_name , opts )
34
+ opts = opts or {}
35
+ opts .preview = true
36
+ M .rename (new_name , opts )
37
+ end
38
+
32
39
M .code_action = function (opts )
33
40
opts = opts or {}
34
41
@@ -50,4 +57,10 @@ M.code_action = function(opts)
50
57
vim .lsp .buf .code_action (opts )
51
58
end
52
59
60
+ M .code_action_preview = function (opts )
61
+ opts = opts or {}
62
+ opts .preview = true
63
+ M .code_action (opts )
64
+ end
65
+
53
66
return M
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ local lTelescope = require("lsp-preview.telescope")
4
4
local M = {}
5
5
6
6
--- Used as injection for the telescope picker to apply the selection.
7
- --- Filters the workspace edit for the selected hunks.
7
+ --- Filters the workspace edit for the selected hunks and applies it .
8
8
--- @param workspace_edit WorkspaceEdit
9
9
--- @param offset_encoding string
10
10
--- @return fun ( selected_indices : { value : Value } [] )
You can’t perform that action at this time.
0 commit comments