diff --git a/flake.nix b/flake.nix index 1a59bef..b99af1c 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; diff --git a/home/neovim.nix b/home/neovim.nix index 6442e1e..38850ca 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -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("fz", ":Telescope zoxide list") ''; } + { + 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("fb", ":Telescope file_browser") + ''; + } + { plugin = lualine-nvim; type = "lua";