mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
nvim: Add telescope file-browser
This commit is contained in:
parent
c8530866fb
commit
4010b41b76
2 changed files with 33 additions and 2 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue