A Neovim plugin that opens a terminal with the Crush CLI in a vertical split.
Using lazy.nvim:
{
'gitsang/crush.nvim',
opts = {
width = 80, -- Width of the vertical split
fixed_width = true, -- Whether to fix the width (true = locked, false = adjustable)
crush_cmd = "crush --yolo", -- Command to run in the terminal
copy_to_clipboard = false, -- Copy to system clipboard
actions = {},
},
cmd = { "Crush", "CrushFilePos", "CrushActions" },
keys = {
{ "<leader>CC", "<cmd>Crush<cr>", desc = "Toggle Crush", mode = { "n", "v" } },
{ "<leader>CP", ":'<,'>CrushFilePos<cr>", desc = "Copy file path and line info", mode = { "n", "v" } },
{ "<leader>CA", ":'<,'>CrushActions<cr>", desc = "Run Crush actions", mode = { "n", "v" } },
},
}After installation, you can run the following commands:
Run the :Crush command to open a terminal in a vertical split running the crush command.
The :CrushFilePos command copies the relative file path and line/column information to the clipboard in various visual modes, then send it to crush.
The :CrushActions command allows you to define custom actions that can be executed from a popup selector.
You can find how to define your own actions in Custom Actions Tutorial
