aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-05-26 07:11:50 +0800
committerGitHub <noreply@github.com>2024-05-26 07:11:50 +0800
commit3d39ea3ea9b6e66640e59731d155d731218e7e62 (patch)
tree8610444deb1748dbb54eb1897f3fc3397241ba7d /runtime/autoload
parenteaaf3d9048f37b2bf5914d34f7348a1ba6ebe250 (diff)
downloadrneovim-3d39ea3ea9b6e66640e59731d155d731218e7e62.tar.gz
rneovim-3d39ea3ea9b6e66640e59731d155d731218e7e62.tar.bz2
rneovim-3d39ea3ea9b6e66640e59731d155d731218e7e62.zip
vim-patch:9.1.0442: hare runtime files outdated (#29011)
Problem: hare runtime files outdated Solution: runtime(hare): update hare.vim to match upstream (Amelia Clarke) closes: vim/vim#14836 https://github.com/vim/vim/commit/35dfe58a540e2fb0eff953630f8e4fcbf4bc26ca Co-authored-by: Amelia Clarke <selene@perilune.dev>
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/hare.vim26
1 files changed, 26 insertions, 0 deletions
diff --git a/runtime/autoload/hare.vim b/runtime/autoload/hare.vim
new file mode 100644
index 0000000000..c4581fccf9
--- /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