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.
This commit is contained in:
parent
f6b014475d
commit
b829ab5802
4 changed files with 30 additions and 0 deletions
3
.gitmodules
vendored
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
|
25
nvim/.config/nvim/plugin/projectionist.vim
Normal file
25
nvim/.config/nvim/plugin/projectionist.vim
Normal file
|
@ -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…
Add table
Add a link
Reference in a new issue