HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Program Files/Git/usr/share/vim/vim91/autoload/hare.vim
" Vim autoload file.
" Language:     Hare
" Maintainer:   Amelia Clarke <[email protected]>
" Last Updated: 2024-05-10
" Upstream:     https://git.sr.ht/~sircmpwn/hare.vim

" Attempt to find the directory for a given Hare module.
function hare#FindModule(str)
  let path = substitute(trim(a:str, ':', 2), '::', '/', 'g')
  let dir = finddir(path)
  while !empty(path) && empty(dir)
    let path = substitute(path, '/\?\h\w*$', '', '')
    let dir = finddir(path)
  endwhile
  return dir
endfunction

" Return the value of HAREPATH if it exists. Otherwise use a reasonable default.
function hare#GetPath()
  if empty($HAREPATH)
    return '/usr/src/hare/stdlib,/usr/src/hare/third-party'
  endif
  return substitute($HAREPATH, ':', ',', 'g')
endfunction

" vim: et sts=2 sw=2 ts=8