Neat-looking code action menu #133
-
Hello, I really want to know how did you set up that small code action menu: I was able to do something similar with actions-preview.nvim: lazy.nvim {
"aznhe21/actions-preview.nvim",
dependencies = "MunifTanjim/nui.nvim",
keys = {
{
"gf",
function()
require("actions-preview").code_actions()
end,
mode = { "v", "n" },
},
},
opts = {
backend = {
"nui",
"telescope",
},
nui = {
layout = {
position = {
row = 0,
col = 0,
},
size = {
width = 28,
height = 11,
},
relative = "cursor",
},
preview = {
size = "30%",
},
select = {
size = "70%",
},
},
},
}, But this will break any other form of code actions. I also was wondering if that menu supports quick selection via number keys (without Enter or anything like that). The only other option is to manually make a custom window just for this file and use normal general menu elsewhere. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It's a little lua module I've written which can be used as a And yes it does support quick selection via the number keys. Feel free to copy paste if you like it :) |
Beta Was this translation helpful? Give feedback.
Niice. Thanks. I added it to the end of a
custom.configs.crates
module. So it only appears forCargo.toml
.snippet