File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -51,3 +51,19 @@ silent! setlocal formatoptions-=t formatoptions+=croqlj
51
51
52
52
let b: undo_ftplugin = ' setlocal sw< sts< et< isk< com< cms< path< inex< sua< def<' .
53
53
\ ' | unlet! b:match_ignorecase b:match_words b:block_begin b:block_end'
54
+
55
+ function s: projectionist_detect_elixir ()
56
+ if filereadable (' mix.exs' )
57
+ let root = simplify (fnamemodify (' .' , ' :p:s?[\/]$??' ))
58
+
59
+ let projections = {}
60
+ let projections[' lib/*.ex' ] = { ' type' : ' main' , ' alternate' : [' test/{}_test.exs' ] }
61
+ let projections[' lib/**/*.ex' ] = { ' type' : ' main' , ' alternate' : [' test/{}_test.exs' ] }
62
+ let projections[' test/*_test.exs' ] = { ' type' : ' test' , ' alternate' : [' lib/{}.ex' ] }
63
+ let projections[' test/**/*_test.exs' ] = { ' type' : ' test' , ' alternate' : [' lib/{}.ex' ] }
64
+
65
+ call projectionist#append (root, projections)
66
+ endif
67
+ endfunc
68
+
69
+ autocmd User ProjectionistDetect call s: projectionist_detect_elixir ()
You can’t perform that action at this time.
0 commit comments