diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 03:56:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 03:56:58 +0000 |
commit | 0f75b2ad2e23107f8112b6dcd4785eeef6cc34aa (patch) | |
tree | 25185226a8d172d94b0ff72f5a611659252c76d6 /runtime/autoload/hare.vim | |
parent | Releasing progress-linux version 2:9.1.0377-1~progress7.99u1. (diff) | |
download | vim-0f75b2ad2e23107f8112b6dcd4785eeef6cc34aa.tar.xz vim-0f75b2ad2e23107f8112b6dcd4785eeef6cc34aa.zip |
Merging upstream version 2:9.1.0496.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | runtime/autoload/hare.vim | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/runtime/autoload/hare.vim b/runtime/autoload/hare.vim new file mode 100644 index 0000000..c4581fc --- /dev/null +++ b/runtime/autoload/hare.vim @@ -0,0 +1,26 @@ +" Vim autoload file. +" Language: Hare +" Maintainer: Amelia Clarke <selene@perilune.dev> +" 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 |