Adds Projectionist plugin

Greg Hurrell video: https://www.youtube.com/watch?v=3jDafvUESbs

This allows me to jump between c source, header and test files easily.

It is capable of a lot more than this but I haven't looked into it too
much yet.
Jonathan Hodgson 3 years ago
parent aa9e27ea22
commit e9b6c36278
  1. 3
      .gitmodules
  2. 1
      nvim/.config/nvim/init.vim
  3. 1
      nvim/.config/nvim/pack/bundle/opt/vim-projectionist
  4. 25
      nvim/.config/nvim/plugin/projectionist.vim

3
.gitmodules vendored

@ -79,3 +79,6 @@
[submodule "nvim/.config/nvim/pack/bundle/opt/nvim-treesitter"]
path = nvim/.config/nvim/pack/bundle/opt/nvim-treesitter
url = https://github.com/nvim-treesitter/nvim-treesitter
[submodule "nvim/.config/nvim/pack/bundle/opt/vim-projectionist"]
path = nvim/.config/nvim/pack/bundle/opt/vim-projectionist
url = https://github.com/tpope/vim-projectionist

@ -11,6 +11,7 @@ if has('packages')
packadd! vim-fugitive
packadd! vim-json
packadd! vim-less
packadd! vim-projectionist
packadd! vim-repeat
packadd! vim-snippets
packadd! vim-surround

@ -0,0 +1 @@
Subproject commit ddfa49f9ece73aca44d2b45d693e7b58adbf8f8c

@ -0,0 +1,25 @@
let g:projectionist_heuristics = {
\'*': {
\ 'src/*.c': {
\ 'alternate': [
\ 'src/{}.h',
\ 'tests/{}.test.c'
\ ],
\ 'type': 'source'
\ },
\ 'src/*.h': {
\ 'alternate': [
\ 'tests/{}.test.c',
\ 'src/{}.c'
\ ],
\ 'type': 'header'
\ },
\ 'tests/*.test.c': {
\ 'alternate': [
\ 'src/{}.c',
\ 'src/{}.h',
\ ],
\ 'type': 'test'
\ },
\ }
\}
Loading…
Cancel
Save