mirror of
https://github.com/Superredstone/nixvim.git
synced 2026-10-03 15:28:50 +02:00
feat(plugin): replace telescope with fzf-lua
This commit is contained in:
@@ -5,10 +5,10 @@
|
|||||||
./cmp.nix
|
./cmp.nix
|
||||||
./comment.nix
|
./comment.nix
|
||||||
./cursorline.nix
|
./cursorline.nix
|
||||||
|
./fzf-lua.nix
|
||||||
./gitsigns.nix
|
./gitsigns.nix
|
||||||
./lsp.nix
|
./lsp.nix
|
||||||
./lualine.nix
|
./lualine.nix
|
||||||
./telescope.nix
|
|
||||||
./which-key.nix
|
./which-key.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
+39
-28
@@ -1,4 +1,17 @@
|
|||||||
{ ... }:
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
mkMap =
|
||||||
|
action: desc:
|
||||||
|
{
|
||||||
|
inherit action;
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
inherit desc;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
plugins.fzf-lua = {
|
plugins.fzf-lua = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -8,49 +21,47 @@
|
|||||||
height = 0.85;
|
height = 0.85;
|
||||||
width = 0.9;
|
width = 0.9;
|
||||||
};
|
};
|
||||||
fzf_opts = {
|
# fzf_opts = {
|
||||||
"--layout" = "reverse";
|
# "--layout" = "reverse";
|
||||||
};
|
# };
|
||||||
git_icons = true;
|
git_icons = true;
|
||||||
defaults = {
|
defaults.file_icons = true;
|
||||||
file_icons = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
keymaps = {
|
keymaps = {
|
||||||
# Files and search
|
# Files and search
|
||||||
"<Space>f" = "files";
|
"<Space>f" = mkMap "files" "Fzf-Lua Files";
|
||||||
"<Space>F" = "oldfiles";
|
"<Space>F" = mkMap "oldfiles" "Fzf-Lua Old Files";
|
||||||
"<Space>g" = "live_grep";
|
"<Space>g" = mkMap "live_grep" "Fzf-Lua Live Grep";
|
||||||
|
|
||||||
# Buffers and windows
|
# Buffers and windows
|
||||||
"<Space>b" = "buffers";
|
"<Space>b" = mkMap "buffers" "Fzf-Lua Buffers";
|
||||||
"<Space>w" = "tabs";
|
"<Space>w" = mkMap "tabs" "Fzf-Lua Tabs";
|
||||||
|
|
||||||
# Discoverability
|
# Discoverability
|
||||||
"<Space>h" = "help";
|
"<Space>m" = mkMap "keymaps" "Fzf-Lua Keymaps";
|
||||||
"<Space>m" = "keymaps";
|
"<Space>c" = mkMap "colorschemes" "Fzf-Lua Colorschemes";
|
||||||
"<Space>c" = "colorschemes";
|
|
||||||
|
|
||||||
# Git
|
# Git
|
||||||
"<Space>gs" = "git_status";
|
"<Space>gs" = mkMap "git_status" "Fzf-Lua Git Status";
|
||||||
"<Space>gf" = "git_files";
|
"<Space>gf" = mkMap "git_files" "Fzf-Lua Git Files";
|
||||||
"<Space>gl" = "git_log";
|
"<Space>gl" = mkMap "git_log" "Fzf-Lua Git Log";
|
||||||
"<Space>gc" = "git_commits";
|
"<Space>gc" = mkMap "git_commits" "Fzf-Lua Git Commits";
|
||||||
"<Space>gb" = "git_bcommits";
|
"<Space>gb" = mkMap "git_bcommits" "Fzf-Lua Git Buffer Commits";
|
||||||
|
|
||||||
# LSP
|
# LSP
|
||||||
"<Space>l" = "lsp_document_symbols";
|
"<Space>l" = mkMap "lsp_document_symbols" "Fzf-Lua Document Symbols";
|
||||||
"<Space>lr" = "lsp_references";
|
"<Space>lr" = mkMap "lsp_references" "Fzf-Lua References";
|
||||||
"<Space>ld" = "lsp_definitions";
|
"<Space>ld" = mkMap "lsp_definitions" "Fzf-Lua Definitions";
|
||||||
"<Space>la" = "lsp_code_actions";
|
"<Space>la" = mkMap "lsp_code_actions" "Fzf-Lua Code Actions";
|
||||||
"<Space>lw" = "lsp_workspace_symbols";
|
"<Space>lw" = mkMap "lsp_workspace_symbols" "Fzf-Lua Workspace Symbols";
|
||||||
|
|
||||||
# Diagnostics
|
# Diagnostics
|
||||||
"<Space>x" = "diagnostics";
|
"<Space>x" = mkMap "diagnostics_document" "Fzf-Lua Diagnostics";
|
||||||
|
"<Space>X" = mkMap "diagnostics_workspace" "Fzf-Lua Diagnostics Workspace";
|
||||||
|
|
||||||
# Resume last picker
|
# Resume
|
||||||
"<Space>z" = "resume";
|
"<Space>z" = mkMap "resume" "Fzf-Lua Resume";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
plugins.telescope = {
|
|
||||||
enable = true;
|
|
||||||
keymaps = {
|
|
||||||
"<Space>f" = "find_files";
|
|
||||||
"<Space>g" = "live_grep";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user