commit 3c26b91ca0b44bc217fbb1f0a3ddf50f3c524d2c
parent cbb609508a7e3f062b59eb03525cb5318be05613
Author: Lou Woell <lou.woell@posteo.de>
Date: Tue, 16 Sep 2025 14:59:25 +0200
improve README, add contributing section
Diffstat:
2 files changed, 35 insertions(+), 16 deletions(-)
diff --git a/README.md b/README.md
@@ -6,21 +6,31 @@ documentation from within an editor, and jump to definitions.
In principle, everything needed for basic completion should be in place, I
haven't attempted using harehelper for that yet though.
-## Functionality
+## Usage
-All subcommands can be used with the toplevel
+```
+harehelper: help with hare
+
+Usage: harehelper [-hP] [-p <path>] [-t <tagset>] subcommand args
-- `-p` flag to append directories (such as the current project root) to the
- HAREPATH.
-- `-t` flag to (un)set build tags.
+-h: show help
+-p <path>: append to harepath
+-P: return harepath
+-t <tagset>: set/unset build tags
+
+Subcommands:
+ list: list symbols in module
+ resolve: resolve namespace for identifier
+ locate: return location of declaration for identifier
+ list-modules: list all modules in current harepath
+```
### resolve namespaces
given a file.ha:
```hare
-use os :: { stdout };
+use os::{stdout};
use hare::parse;
-
...
```
@@ -52,6 +62,13 @@ $ harehelper list-modules
$ harehelper list <module>
```
+## Contributing
+
+If you encounter issues, have suggestions, want to contribute a patch, or just
+let me know that you found this tool useful, you can reach me via
+[mail](mailto:lou@repetitions.de) or open an issue or pull request at the
+[codeberg repo](https://codeberg.org/lou/harehelper).
+
## Editor Integrations
### Emacs integration
@@ -71,13 +88,13 @@ To enable the default keymap in hare-mode, add `haredoc-nav-mode` to your
Default keybindings in haredoc buffers:
-- `s`: haredoc/goto-src // go to source of definition at point
-- `<`: haredoc/back // go back to previous haredoc page visited
-- `>`: haredoc/forward // inverse of the former
-- `n`: haredoc/next-decl // move cursor down one declaration
-- `p`: haredoc/prev-decl // move cursor up one declaration
-- `d`: haredoc/narrow // narrow haredoc to documentation of declaration at point
-- `u`: haredoc/widen // show documentation for one namespace
+- `s`: go to source of definition at point
+- `<`: go back to previous haredoc page visited
+- `>`: inverse of the former
+- `n`: move cursor down one declaration
+- `p`: move cursor up one declaration
+- `d`: narrow haredoc to documentation of declaration at point
+- `u`: show documentation for one namespace
#### Installation with [elpaca](https://github.com/progfolio/elpaca)
diff --git a/cmd/harehelper/helper.ha b/cmd/harehelper/helper.ha
@@ -22,9 +22,11 @@ use strings;
const help: []getopt::help = [
"help with hare",
('h', "show help"),
- ('p', "<path>", "append to harepath"),
+ ('p', "path", "append to harepath"),
('P', "return harepath"),
- ('t', "<tagset>", "set/unset build tags"),
+ ('t', "tagset", "set/unset build tags"),
+ "subcommand",
+ "args",
("list", [
"list symbols in module",
"module"