Skip to content

Commit

Permalink
feat(VSCode): Open the Command Palette instead of Telescope (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
johmsalas authored Dec 25, 2023
1 parent 590d89b commit d6f121e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/textcase/plugin/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,13 @@ function M.quick_replace(case_method)
end

function M.open_telescope(filter)
if vim.g.vscode then
-- In vscode, Telescope isn't available, then Open the commands palette
-- there is no way to populate the command bar, it will show all the commands
vim.cmd("call VSCodeNotify('workbench.action.showCommands')")
return
end

local mode = vim.api.nvim_get_mode().mode
M.state.telescope_previous_mode = mode
M.state.telescope_previous_buffer = vim.api.nvim_get_current_buf()
Expand Down

0 comments on commit d6f121e

Please sign in to comment.