How to generate API docs and use LSP? #717
-
I recently started looking at rune after dabbling a bit with rhai. I have to say the language itself looks nicer (especially the support for enums and pattern matching). My use case is an advanced configuration language (I'm making something like ansible, or the NixOS system config. More specifically I'm making a version of this arch linux specific config manager (written in bash) that I can use on my work computer where I have to run Ubuntu). As such the speed of rhai would most likely be adequate, but rune looks like a nicer language to write in. While the documentation for the Rune language itself is good, the documentation for embedding rune in a Rust program seems far more limited than for Rhai. As such there is a couple of operations that I would need that I haven't manage to figure out:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi! So the way you use the tooling is to construct a modular commandline where you install your custom modules. That gives you 1, once you have the modular comamndline, generating documentation will include your custom modules. It also gives you 2, you can run the language server by using your modular commandline entry Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
I would like to see this documentation ported to the book, if that's something you're interested in doing while navigating this I'd love to help you out. |
Beta Was this translation helpful? Give feedback.
Hi!
So the way you use the tooling is to construct a modular commandline where you install your custom modules.
That gives you 1, once you have the modular comamndline, generating documentation will include your custom modules. It also gives you 2, you can run the language server by using your modular commandline entry
cargo run -p my-commandline-crate -- languageserver
. The blog post covers how you can configure this in an editor. I think 3 follows naturally from this. The tooling available is the vscode extension and the commandline which you can configure.Hope this helps!