actions-preview

This commit is contained in:
RingOfStorms (Joshua Bell) 2024-10-21 14:23:14 -05:00
parent 99f5ed48b8
commit 967da5ad93
4 changed files with 28 additions and 1 deletions

17
flake.lock generated
View file

@ -144,6 +144,22 @@
"type": "github"
}
},
"nvim_plugin-aznhe21/actions-preview.nvim": {
"flake": false,
"locked": {
"lastModified": 1718540350,
"narHash": "sha256-lYjsv8y1fMuTGpBF/iG7cm/a7tLdh748vJhVsSp/Iz8=",
"owner": "aznhe21",
"repo": "actions-preview.nvim",
"rev": "9f52a01c374318e91337697ebed51c6fae57f8a4",
"type": "github"
},
"original": {
"owner": "aznhe21",
"repo": "actions-preview.nvim",
"type": "github"
}
},
"nvim_plugin-b0o/schemastore.nvim": {
"flake": false,
"locked": {
@ -875,6 +891,7 @@
"nvim_plugin-MunifTanjim/nui.nvim": "nvim_plugin-MunifTanjim/nui.nvim",
"nvim_plugin-RRethy/vim-illuminate": "nvim_plugin-RRethy/vim-illuminate",
"nvim_plugin-Saecki/crates.nvim": "nvim_plugin-Saecki/crates.nvim",
"nvim_plugin-aznhe21/actions-preview.nvim": "nvim_plugin-aznhe21/actions-preview.nvim",
"nvim_plugin-b0o/schemastore.nvim": "nvim_plugin-b0o/schemastore.nvim",
"nvim_plugin-catppuccin/nvim": "nvim_plugin-catppuccin/nvim",
"nvim_plugin-chrisgrieser/nvim-early-retirement": "nvim_plugin-chrisgrieser/nvim-early-retirement",

View file

@ -44,6 +44,8 @@
"nvim_plugin-nvim-telescope/telescope-fzf-native.nvim".flake = false; # fzf integration for telescope
"nvim_plugin-nvim-telescope/telescope-ui-select.nvim".url = "github:nvim-telescope/telescope-ui-select.nvim";
"nvim_plugin-nvim-telescope/telescope-ui-select.nvim".flake = false; # telescope used for selections in ui
"nvim_plugin-aznhe21/actions-preview.nvim".url = "github:aznhe21/actions-preview.nvim";
"nvim_plugin-aznhe21/actions-preview.nvim".flake = false; # telescope used for code action diffs in ui
"nvim_plugin-nvim-telescope/telescope-file-browser.nvim".url = "github:nvim-telescope/telescope-file-browser.nvim";
"nvim_plugin-nvim-telescope/telescope-file-browser.nvim".flake = false; # telescope based file browser
"nvim_plugin-nvim-tree/nvim-tree.lua".url = "github:nvim-tree/nvim-tree.lua";

View file

@ -51,7 +51,14 @@ return {
map("gr", require("telescope.builtin").lsp_references, "Goto References")
map("gI", require("telescope.builtin").lsp_implementations, "Goto Implementation")
map("<leader>lr", vim.lsp.buf.rename, "Rename")
map("<leader>la", vim.lsp.buf.code_action, "Code Action")
-- map("<leader>la", vim.lsp.buf.code_action, "Code Action")
map("<leader>la", function()
U.safeRequire("actions-preview", function()
require("actions-preview").code_actions()
end, function()
vim.lsp.buf.code_action()
end)
end, "Code Action")
map("K", vim.lsp.buf.hover, "Hover Documentation")
map("gD", vim.lsp.buf.declaration, "Goto Declaration")
end,

View file

@ -4,6 +4,7 @@ return {
{ "nvim-lua/plenary.nvim" },
{ "nvim-telescope/telescope-fzf-native.nvim", event = "VeryLazy" },
{ "nvim-telescope/telescope-ui-select.nvim", event = "VeryLazy" },
{ "aznhe21/actions-preview.nvim", event = "VeryLazy" },
},
init = function()
U.cmd_executable("rg", {