Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions plugin/projectionist.vim
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ function! s:has(ns, root, requirements) abort
endfunction

function! ProjectionistDetect(path) abort
let path = a:path
if path !~ '^/'
let path = getcwd() . '/' . path
endif

let b:projectionist = {}
unlet! b:projectionist_file
if a:path =~# '^\a[[:alnum:].+-]\+:'
let file = substitute(a:path, '[\/]$', '', '')
else
let file = simplify(fnamemodify(resolve(a:path), ':p:s?[\/]$??'))
endif
let file = simplify(fnamemodify(path, ':p:s?[\/]$??'))

let root = file
let ns = matchstr(file, '^\a\a\+\ze:')
Expand Down