Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
Tree-sitter Query 66%
Scheme 34%
README.md
ocaml.hx #
This plugin augments helix’s out-of-the-box capabilities for ocaml development,
by giving access to ocamllsp extensions.
This is extremely early stage, and mostly an excuse to play with helix plugins. Feel free to contact the author with suggestions.
Demo #
Installation #
This is a helix plugin, so it requires a helix built with plugin support. At the
time of writing, this means building mattwparas’ branch.
:ocaml-type-enclosing uses features that are not in mattwparas’ branch, so you’ll need to apply this patch as well.
forge pkg install --git https://tangled.org/clementd.wtf/ocaml-helix
Then add this to ~/.config/helix/init.scm
(require "helix-ocaml/ocaml.scm")
Note: this plugin does not define any shortcut itself, but since [space]-o is
free on a default helix install, you can add this to ~/.config/helix/config.toml
[keys.normal.space.o]
"c" = ":ocaml-construct"
"q" = ":ocaml-type-search"
"s" = ":ocaml-switch-impl-intf"
"t" = ":ocaml-type-enclosing"
Commands #
| Command | ocamllsp command |
Description |
|---|---|---|
:ocaml-construct |
ocamllsp/construct |
Replaces the current selection with an expression matching its expected type. If there is more than one possibility, a picker will be displayed |
:ocaml-type-search |
ocamllsp/typeSearch |
Prompts for a type in the status bar and inserts the selected result. Type search is scope-aware, so it will only suggest variables that are in scope |
:ocaml-switch-impl-intf |
ocamllsp/switchImplIntf |
Switch between module interface (.mli) and implementation (.ml). |
:ocaml-type-enclosing |
ocamllsp/typeEnclosing |
Display the type of the current selection (or of the expression enclosing the current selection if the current selection is not an expression). |
License #
Apache-2.0