You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have started working on a plugin for improved ocaml support in helix (basically a set of commands allowing to use ocaml-specific LSP extensions). I suspect this will be a common use-case for plugins.
I've got a few things working, but I ran into issues, and I wondered how other people got around it and what was planned for smoother integration into helix.
The experience of writing plugins has been mostly pleasant so far.
LSP helpers
Getting a Position for the current cursor is doable with get-current-line-number and get-current-line-character works but requires care wrt offset encoding. A packaged solution would make things nice.
Getting a range for the current primary selection seems harder (afaik there is no way to turn an arbitrary offset into a LSP position in steel)
Helpers for document URIs would be nice as well. The LSP mod has a lot of this logic already implemented, just not exposed to steel
More generally, exposing all this logic as hard-to-misuse steel primitives would be a nice touch for the common (I assume) use-case of exploiting LSP extensions.
UI primitives
So far I've used the prompt and picker components, as well as the status bar, but did not find a way to use custom pickers (especially with multiple columns and custom actions). Completion / action menus would be nice but I haven't found them.
stdlib
The stdlib has been enough so far, but a few more helpers wrt file paths could have been helpful (basename, stuff like that). Nothing impossible to implement with existing functions, but nice to have.
More generally this has been quite pleasant and I was able to get going really fast. evalp and eval-buffer have been super helpful. steel-docs.md is a bit lacking and for now reading source code is still the best course of action
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have started working on a plugin for improved ocaml support in helix (basically a set of commands allowing to use ocaml-specific LSP extensions). I suspect this will be a common use-case for plugins.
I've got a few things working, but I ran into issues, and I wondered how other people got around it and what was planned for smoother integration into helix.
The experience of writing plugins has been mostly pleasant so far.
LSP helpers
Getting a
Positionfor the current cursor is doable withget-current-line-numberandget-current-line-characterworks but requires care wrt offset encoding. A packaged solution would make things nice.Getting a range for the current primary selection seems harder (afaik there is no way to turn an arbitrary offset into a LSP position in steel)
Helpers for document URIs would be nice as well. The LSP mod has a lot of this logic already implemented, just not exposed to steel
More generally, exposing all this logic as hard-to-misuse steel primitives would be a nice touch for the common (I assume) use-case of exploiting LSP extensions.
UI primitives
So far I've used the
promptandpickercomponents, as well as the status bar, but did not find a way to use custom pickers (especially with multiple columns and custom actions). Completion / action menus would be nice but I haven't found them.stdlib
The stdlib has been enough so far, but a few more helpers wrt file paths could have been helpful (basename, stuff like that). Nothing impossible to implement with existing functions, but nice to have.
More generally this has been quite pleasant and I was able to get going really fast.
evalpandeval-bufferhave been super helpful. steel-docs.md is a bit lacking and for now reading source code is still the best course of actionNote
https://github.com/waddie/ui-utils.hx provides a useful picker
All reactions