nvim: Add telescope file-browser

This commit is contained in:
Sridhar Ratnakumar 2022-04-26 09:09:20 -04:00
parent c8530866fb
commit 4010b41b76
2 changed files with 33 additions and 2 deletions

View file

@ -19,6 +19,7 @@
hercules-ci-agent.url = "github:hercules-ci/hercules-ci-agent/master";
nixos-shell.url = "github:Mic92/nixos-shell";
# Vim & its plugins (not in nixpkgs)
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
neovim-nightly-overlay.inputs.neovim-flake.url = "github:neovim/neovim/v0.7.0?dir=contrib";
vim-eldar.url = "github:agude/vim-eldar";

View file

@ -1,8 +1,10 @@
{ pkgs, inputs, system, ... }:
{
let
nvim = inputs.neovim-nightly-overlay.packages.${system}.neovim;
in {
programs.neovim = {
enable = true;
package = inputs.neovim-nightly-overlay.packages.${system}.neovim;
package = nvim;
coc = {
enable = true;
@ -88,6 +90,34 @@
nmap("<leader>fz", ":Telescope zoxide list<cr>")
'';
}
{
plugin = telescope-file-browser-nvim;
type = "lua";
config = ''
-- You don't need to set any of these options.
-- IMPORTANT!: this is only a showcase of how you can set default options!
require("telescope").setup {
extensions = {
file_browser = {
theme = "ivy",
mappings = {
["i"] = {
-- your custom insert mode mappings
},
["n"] = {
-- your custom normal mode mappings
},
},
},
},
}
-- To get telescope-file-browser loaded and working with telescope,
-- you need to call load_extension, somewhere after setup function:
require("telescope").load_extension "file_browser"
nmap("<leader>fb", ":Telescope file_browser<cr>")
'';
}
{
plugin = lualine-nvim;
type = "lua";