From 3c8fa4795e873f0449e53cc8cca4c864d7586df5 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Tue, 3 Dec 2024 09:15:11 +0100 Subject: [PATCH] chore(nvim): projectionist config --- nvimrc | 32 +++++++++++++++++++++++++------- vim/lua/aerial_config.lua | 1 - 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/nvimrc b/nvimrc index a88be23..6c30127 100644 --- a/nvimrc +++ b/nvimrc @@ -303,17 +303,35 @@ packadd! vim-projectionist " https://github.com/tpope/vim-projectionist.git let g:projectionist_heuristics = { \ "*.go": { \ "*_test.go": { - \ "type": "source", - \ "alternate": "{}.go", + \ "type": "source", + \ "alternate": "{}.go", \ }, \ "*.go": { - \ "type": "source", - \ "alternate": "{}_test.go", + \ "type": "source", + \ "alternate": "{}_test.go", \ }, - \ "etc/rbenv.d/*.bash": {"type": "hook"} - \ } + \ }, + \ "*.rb": { + \ "app/*.rb": { + \ "type": "source", + \ "alternate": "spec/{}_spec.rb", + \ }, + \ "lib/*.rb": { + \ "type": "source", + \ "alternate": "spec/lib/{}_spec.rb", + \ }, + \ "spec/*_spec.rb": { + \ "type": "source", + \ "alternate": "app/{}.rb", + \ }, + \ "spec/lib/*_spec.rb": { + \ "type": "source", + \ "alternate": "lib/{}.rb", + \ }, + \ }, \ } -nnoremap A :A +nnoremap a :A +nnoremap A :AV " aerial packadd! aerial.nvim " https://github.com/stevearc/aerial.nvim.git diff --git a/vim/lua/aerial_config.lua b/vim/lua/aerial_config.lua index 571eb00..58d2d58 100644 --- a/vim/lua/aerial_config.lua +++ b/vim/lua/aerial_config.lua @@ -6,5 +6,4 @@ require("aerial").setup({ autojump = true, nerd_font = "auto", }) -vim.keymap.set("n", "a", "AerialToggle!") vim.keymap.set("n", "ds", "call aerial#fzf()")