File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ applying.
1313* [ ] break-down by edit and not by file
1414* [ ] one buffer for all changes in a file, view-port shifts on selection
1515* [ ] buffer contents updates based on selected changes
16+ * [ ] Allow sorting list by token type that changes (e.g. var, class, comment)
1617* [x] allow disabling the preview
1718
1819## Inspired by
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ local util = require("vim.lsp.util")
44
55local M = {}
66
7+ -- The original workspace_edit from the std library of vim for backup and resets.
78local apply_workspace_edit = util .apply_workspace_edit
89
910function M .setup (_ )
@@ -29,6 +30,12 @@ M.rename = function(new_name, opts)
2930 vim .lsp .buf .rename (new_name , opts )
3031end
3132
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+
3239M .code_action = function (opts )
3340 opts = opts or {}
3441
@@ -50,4 +57,10 @@ M.code_action = function(opts)
5057 vim .lsp .buf .code_action (opts )
5158end
5259
60+ M .code_action_preview = function (opts )
61+ opts = opts or {}
62+ opts .preview = true
63+ M .code_action (opts )
64+ end
65+
5366return M
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ local lTelescope = require("lsp-preview.telescope")
44local M = {}
55
66--- 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 .
88--- @param workspace_edit WorkspaceEdit
99--- @param offset_encoding string
1010--- @return fun ( selected_indices : { value : Value } [] )
You can’t perform that action at this time.
0 commit comments