plugin/explorer: add telescope-live-grep-args plugin
This commit is contained in:
parent
a8cdb463fa
commit
3e991b54ea
4 changed files with 39 additions and 7 deletions
18
flake.lock
18
flake.lock
|
@ -38,6 +38,7 @@
|
||||||
"editorconfig-nvim": "editorconfig-nvim",
|
"editorconfig-nvim": "editorconfig-nvim",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"tabby-nvim": "tabby-nvim",
|
"tabby-nvim": "tabby-nvim",
|
||||||
|
"telescope-live-grep-args-nvim": "telescope-live-grep-args-nvim",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -58,6 +59,23 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"telescope-live-grep-args-nvim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1661594012,
|
||||||
|
"narHash": "sha256-T5j2qgoDtVkk1uCLjoNeyw4eTu6eLbTXQHUuvHs3Tls=",
|
||||||
|
"owner": "nvim-telescope",
|
||||||
|
"repo": "telescope-live-grep-args.nvim",
|
||||||
|
"rev": "32b633b062d1168a2d18ad27994e5b4ef97f0a74",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nvim-telescope",
|
||||||
|
"repo": "telescope-live-grep-args.nvim",
|
||||||
|
"rev": "32b633b062d1168a2d18ad27994e5b4ef97f0a74",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659877975,
|
"lastModified": 1659877975,
|
||||||
|
|
10
flake.nix
10
flake.nix
|
@ -12,6 +12,11 @@
|
||||||
url = "github:gpanders/editorconfig.nvim?rev=7d10fe6bc340fd783c0b61cf627dd235100284db";
|
url = "github:gpanders/editorconfig.nvim?rev=7d10fe6bc340fd783c0b61cf627dd235100284db";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
telescope-live-grep-args-nvim = {
|
||||||
|
url = "github:nvim-telescope/telescope-live-grep-args.nvim?rev=32b633b062d1168a2d18ad27994e5b4ef97f0a74";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ { self, nixpkgs, utils, ... }:
|
outputs = inputs @ { self, nixpkgs, utils, ... }:
|
||||||
|
@ -22,6 +27,7 @@
|
||||||
overlays = [
|
overlays = [
|
||||||
(f: p: {
|
(f: p: {
|
||||||
vimPlugins = p.vimPlugins // {
|
vimPlugins = p.vimPlugins // {
|
||||||
|
# TODO: make util to build plugins from array
|
||||||
tabby-nvim = p.vimUtils.buildVimPluginFrom2Nix {
|
tabby-nvim = p.vimUtils.buildVimPluginFrom2Nix {
|
||||||
name = "tabby-nvim";
|
name = "tabby-nvim";
|
||||||
src = inputs.tabby-nvim;
|
src = inputs.tabby-nvim;
|
||||||
|
@ -30,6 +36,10 @@
|
||||||
name = "editorconfig-nvim";
|
name = "editorconfig-nvim";
|
||||||
src = inputs.editorconfig-nvim;
|
src = inputs.editorconfig-nvim;
|
||||||
};
|
};
|
||||||
|
telescope-live-grep-args-nvim = p.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
name = "telescope-live-grep-args-nvim";
|
||||||
|
src = inputs.telescope-live-grep-args-nvim;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{ nvim-tree-lua, telescope-nvim, ... }:
|
{ nvim-tree-lua, telescope-nvim, telescope-live-grep-args-nvim, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
luaConfig = (builtins.readFile ./nvim-tree.lua)
|
luaConfig = (builtins.readFile ./nvim-tree.lua)
|
||||||
+ (builtins.readFile ./telescope-nvim.lua);
|
+ (builtins.readFile ./telescope-nvim.lua);
|
||||||
|
|
||||||
plugins = [
|
plugins = [ nvim-tree-lua ]
|
||||||
nvim-tree-lua
|
++ [ telescope-nvim telescope-live-grep-args-nvim ];
|
||||||
telescope-nvim
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
-- See: https://github.com/nvim-telescope/telescope.nvim
|
-- See: https://github.com/nvim-telescope/telescope.nvim
|
||||||
require("telescope").setup({})
|
local telescope = require("telescope")
|
||||||
|
|
||||||
|
telescope.setup({})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>ff", "<Cmd>Telescope find_files hidden=true<CR>")
|
vim.keymap.set("n", "<leader>ff", "<Cmd>Telescope find_files hidden=true<CR>")
|
||||||
vim.keymap.set("n", "<leader>fg", "<Cmd>Telescope live_grep<CR>")
|
|
||||||
vim.keymap.set("n", "<leader>fb", "<Cmd>Telescope buffers<CR>")
|
vim.keymap.set("n", "<leader>fb", "<Cmd>Telescope buffers<CR>")
|
||||||
vim.keymap.set("n", "<leader>fh", "<Cmd>Telescope help_tags<CR>")
|
vim.keymap.set("n", "<leader>fh", "<Cmd>Telescope help_tags<CR>")
|
||||||
|
|
||||||
|
-- required telescope-live-grep-args-nvim plugin
|
||||||
|
vim.keymap.set("n", "<leader>fg", function()
|
||||||
|
telescope.extensions.live_grep_args.live_grep_args()
|
||||||
|
end)
|
||||||
|
|
Reference in a new issue