-- Efficiency plugin designed to optimize code actions in Neovim. -- https://github.com/Chaitanyabsprip/fastaction.nvim vim.keymap.set( { "n", "x" }, "a", 'lua require("fastaction").code_action()', { desc = "Display code actions", buffer = bufnr } ) vim.keymap.set( { "n", "x" }, "A", 'lua require("fastaction").code_action({ select_first = true })', { desc = "Select and apply first code action", buffer = bufnr } ) return { "fastaction.nvim", event = { "LspAttach" }, after = function() require("fastaction").setup({ dismiss_keys = { "j", "k", "", "q" }, override_function = function(_) end, keys = "azertyuiopqsdfghjklm", popup = { border = "rounded", hide_cursor = true, highlight = { action = "MoreMsg", divider = "FloatBorder", key = "MoreMsg", source = "Comment", title = "Title", window = "NormalFloat", }, title = "Select one of:", }, priority = { -- dart = { -- { pattern = "organize import", key ="o", order = 1 }, -- { pattern = "extract method", key ="x", order = 2 }, -- { pattern = "extract widget", key ="e", order = 3 }, -- }, }, register_ui_select = true, format_right_section = nil, }) end, }