robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

zeertzjqvim-patch:62d8f3d: runtime: Revert several "mark invalid contact addresses" commits (#37192)ab20681c52

master
782 B26 linesraw
1" Vim autoload file.
2" Language:     Hare
3" Maintainer:   Amelia Clarke <selene@perilune.dev>
4" Last Updated: 2024-05-10
5" Upstream:     https://git.sr.ht/~sircmpwn/hare.vim
6
7" Attempt to find the directory for a given Hare module.
8function hare#FindModule(str)
9  let path = substitute(trim(a:str, ':', 2), '::', '/', 'g')
10  let dir = finddir(path)
11  while !empty(path) && empty(dir)
12    let path = substitute(path, '/\?\h\w*$', '', '')
13    let dir = finddir(path)
14  endwhile
15  return dir
16endfunction
17
18" Return the value of HAREPATH if it exists. Otherwise use a reasonable default.
19function hare#GetPath()
20  if empty($HAREPATH)
21    return '/usr/src/hare/stdlib,/usr/src/hare/third-party'
22  endif
23  return substitute($HAREPATH, ':', ',', 'g')
24endfunction
25
26" vim: et sts=2 sw=2 ts=8