LinArcX / scrum-sprint.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

:lua require('scrum-sprint').foo()

đź”­ telescope-command-palette.nvim

telescope-command-palette.nvim is a neovim plugin written entirely in lua that will help you to access your custom commands/function/key-bindings.





Plug "LinArcX/telescope-command-palette.nvim"


use { "LinArcX/telescope-command-palette.nvim" }

Setup and Configuration

First load the extension:


And then declare the CpMenu items like this:

CpMenu = {
    { "tips", ":help tips" },
    { "cheatsheet", ":help index" },
    { "tutorial", ":help tutor" },
    { "summary", ":help summary" },
    { "quick reference", ":help quickref" },
    { "search help(F1)", ":lua require('telescope.builtin').help_tags()", 1 },
    { "current working directory", ":pwd" },
    { "reload vimrc", ":source $MYVIMRC"},

The idea is that you decleare some categories("Help", "Vim", etc..) and inside each category, you define your commands. Each command has three parts:

  • description
  • command
  • insert/normal mode (indicates that whether you want to be in insert mode after run the command or not. 1 means: insert mode. everything else is normal mode)

Per project configurations

If you're working on different projects and want to have special key_bindings per project, you can create a .nvimrc in root of your project and append items to CpMenu like this:

    { "pause", ":lua require'dap'.pause()" },
    { "step into", ":lua require'dap'.step_into()" },
    { "step back", ":lua require'dap'.step_back()" },
    { "step over", ":lua require'dap'.step_over()" },
    { "step out", ":lua require'dap'.step_out()" },
    { "frames", ":lua require'telescope'.extensions.dap.frames{}" },
    { "current scopes", ":lua ViewCurrentScopes(); vim.cmd(\"wincmd w|vertical resize 40\")" },
    { "current scopes floating window", ":lua ViewCurrentScopesFloatingWindow()" },
    { "current value floating window", ":lua ViewCurrentValueFloatingWindow()" },
    { "commands", ":lua require'telescope'.extensions.dap.commands{}" },
    { "configurations", ":lua require'telescope'.extensions.dap.configurations{}" },
    { "repl", ":lua require'dap'; vim.cmd(\"wincmd w|resize 12\")" },
    { "close", ":lua require'dap'.close(); require'dap'.repl.close()" },
    { "run to cursor", ":lua require'dap'.run_to_cursor()" },
    { "continue", ":lua require'dap'.continue()" },
    { "clear breakpoints", ":lua require('dap.breakpoints').clear()" },
    { "brakpoints", ":lua require'telescope'.extensions.dap.list_breakpoints{}" },
    { "toggle breakpoint", ":lua require'dap'.toggle_breakpoint()" },

Default mappings (insert mode):

Key Description
c-b go back to categories

Default mappings (normal mode):

Key Description
c-b go back to categories


:Telescope command_palette.


  • [] make separator optional
  • [] extrect require parts and maybe better structure for project
  • [] show most used commands based frecency algorithm.
  • [] when go back to categories, remember the selected item.
  • [] add options to be like vscode command-palatte. (@, ...)
ezoic increase your site revenue


License:GNU General Public License v3.0


Language:Lua 100.0%