dotfiles/.config/nvim/lua/plugins/fzf.lua
2024-07-04 13:10:14 +05:00

36 lines
2.1 KiB
Lua

return {
-- fzf
{
"ibhagwan/fzf-lua",
keys = {
{ "<leader>/", function() require("fzf-lua").buffers() end, desc = "Switch buffers" },
{ "<leader>l", function() require("fzf-lua").live_grep_native() end, desc = "Live Grep" },
{ "<leader>o", function() require("fzf-lua").oldfiles() end, desc = "Open Recent file" },
{ "<leader>b", function() require("fzf-lua").builtin() end, desc = "FZF menu" },
{ "<leader>ca", function() require("fzf-lua").lsp_code_actions() end, mode = { "n", "v" }, desc = "LSP Code Actions" },
{ "<leader>cd", function() require("fzf-lua").lsp_definitions() end, mode = { "n", "v" }, desc = "LSP Definitions" },
{ "<leader>cD", function() require("fzf-lua").lsp_declarations() end, mode = { "n", "v" }, desc = "LSP Declarations" },
{ "<leader>cI", function() require("fzf-lua").lsp_implementations() end, mode = { "n", "v" }, desc = "LSP Implementations" },
{ "<leader>cr", function() require("fzf-lua").lsp_references() end, mode = { "n", "v" }, desc = "LSP References" },
{ "<leader>ce", function() require("fzf-lua").lsp_document_diagnostics() end, desc = "LSP Diagnostics" },
{ "<leader>cwe", function() require("fzf-lua").lsp_workspace_diagnostics() end, desc = "LSP Workspace Diagnostics" },
{ "<leader>cs", function() require("fzf-lua").lsp_document_symbols() end, desc = "Symbols" },
{ "<leader>cS", function() require("fzf-lua").lsp_workspace_symbols() end, desc = "Workspace Symbols" },
{ "<leader>cD", function() require("fzf-lua").lsp_declarations() end, mode = { "n", "v" }, desc = "LSP Declarations" },
},
config = function()
require("fzf-lua").setup({
previewers = {
builtin = {
extensions = {
["png"] = { "ueberzug" },
["jpg"] = { "ueberzug" },
},
ueberzug_scaler = "fit_contain",
}
}
})
end,
}
}