commit d94cae9b0a29476a1877081492d645148ef8fb07
parent cb8ef6d85454af7d85014606f31c6f5349046c69
Author: Lou Woell <lou.woell@posteo.de>
Date:   Thu,  4 Sep 2025 16:23:21 +0200

Add Readme

Diffstat:
AREADME.md | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mcmd/harehelper/helper.ha | 1-
2 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -0,0 +1,56 @@ +A small tool for basic harelang interaction in Editors. + +Harehelper is a small cli providing functionality needed to easily access hare +documentation from within an editor, and jump to definitions. + +**VERY Work-in-Progress** + +all command name may change. + +## Functionality + +All subcommands can be used with the toplevel `-p` flag to append directories +(such as the current project root) to the HAREPATH. + +### resolve namespaces + +given a file.ha: +```hare +use os :: { stdout }; +use hare::parse; + +... +``` + +```bash +$ harehelper resolve stdout /path/to/file.ha +os::stdout + +$ harehelper resolve parse::identstr /path/to/file.ha +hare::parse::identstr +``` + +### locate declaration +(only works for toplevel declarations) + +```bash +$ harehelper locate os::stdout +/usr/src/hare/stdlib/os/+linux/stdfd.ha:29 +``` + +### print all modules in harepath + +```bash +$ harehelper list-modules +``` + +### print all symbols in module + +```bash +$ harehelper list <module> +``` + +### emacs integration + +`haredoc.el` provides an emacs interface using harehelper. The main entry points +are `hare/goto-definition`, `haredoc` and `haredoc-describe-thing-at-point`. diff --git a/cmd/harehelper/helper.ha b/cmd/harehelper/helper.ha @@ -85,5 +85,4 @@ export fn main () void = { }; os::exit(0); }; - };