From 29636037fbfd081377e8857b74634f84a266b2e5 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Thu, 21 Jul 2022 08:24:04 +0200 Subject: [PATCH] feat(neovim): use auto-session and project-nvim instead of obsession --- home-manager/neovim/default.nix | 5 +++-- home-manager/neovim/keymaps.lua | 1 + home-manager/neovim/project-nvim.lua | 1 + home-manager/neovim/telescope.lua | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 home-manager/neovim/project-nvim.lua diff --git a/home-manager/neovim/default.nix b/home-manager/neovim/default.nix index 0c73ccc..fc20135 100644 --- a/home-manager/neovim/default.nix +++ b/home-manager/neovim/default.nix @@ -25,8 +25,8 @@ ansible-vim # session handling - vim-obsession - vim-prosession + project-nvim + auto-session nvim-treesitter markdown-preview-nvim # use({ "iamcco/markdown-preview.nvim", run = ":call mkdp#util#install()" }) @@ -96,6 +96,7 @@ ${builtins.readFile ./nvim-cmp.lua } ${builtins.readFile ./telescope.lua } ${builtins.readFile ./themes.lua } + ${builtins.readFile ./project-nvim.lua } EOF ''; }; diff --git a/home-manager/neovim/keymaps.lua b/home-manager/neovim/keymaps.lua index a3f0bde..c0ec231 100644 --- a/home-manager/neovim/keymaps.lua +++ b/home-manager/neovim/keymaps.lua @@ -23,6 +23,7 @@ nnoremap("G", ":GV --all") nnoremap("ff", "Telescope find_files theme=dropdown") nnoremap("fb", "Telescope buffers theme=dropdown") nnoremap("fg", "Telescope git_files theme=dropdown") +nnoremap("fp", "Telescope projects theme=dropdown") nnoremap("", "Telescope grep_string") nnoremap("", "Telescope live_grep") diff --git a/home-manager/neovim/project-nvim.lua b/home-manager/neovim/project-nvim.lua new file mode 100644 index 0000000..3b5902f --- /dev/null +++ b/home-manager/neovim/project-nvim.lua @@ -0,0 +1 @@ +require('project_nvim').setup({}) diff --git a/home-manager/neovim/telescope.lua b/home-manager/neovim/telescope.lua index 836d7a9..7e7aabb 100644 --- a/home-manager/neovim/telescope.lua +++ b/home-manager/neovim/telescope.lua @@ -31,3 +31,4 @@ telescope.setup({ telescope.load_extension("fzf") telescope.load_extension("ui-select") +telescope.load_extension("projects")