> What’s New ? <
Mecrisp Stellaris Language Server¶
Everyone knows what these things are by now, they’re a autocomplete for your source code, in this case the LSP knows all the default Mecrisp-Stellaris Dictionary Words and even provides an example of the correct usage for most of them.
Editor / IDE |
Notes |
|---|---|
Built-in LSP client; extensive extension marketplace. |
|
Native LSP support via |
|
LSP via plugins: vim-lsp, coc.nvim, YouCompleteMe. |
|
eglot or lsp-mode. |
|
Via LSP package. |
|
atom-ide-ui and language-specific packages (project archived). |
|
Eclipse LSP4E integration. |
|
Native LSP support via intellij-lsp plugin or built-in since 2023.2. |
|
Built-in LSP client. |
|
Native LSP integration. |
|
LSP support built-in in Rust. |
|
Native LSP support. |
|
LSP support built-in (project archived). |
|
Built-in LSP client (macOS). |
In my case I designed and used it on the Helix Editor which is my current favorite tho I also use VIM, GVIM and NVIM at times.
Helix Configuration¶
~/.config/helix/config.toml
[[language]]
name = "forth"
scope = "source.forth"
injection-regex = "forth"
file-types = ["fs"]
comment-token = "\\"
language-servers = ["mecrisp-lsp"]
[language-server.mecrisp-lsp]
command = "/usr/local/bin/python3.11"
# CHANGE TO SUIT YOUR CORRECT PATH !
args = ["/home/tp/fossil/mecrisp-stellaris-lsp/src/mecrisp.lsp.py"]
Helix Screenshots using the LSP while editing a Mecrisp-Stellaris project Forth file¶
2-foldable function
12-bitencoding function
um* function
How do you use it ?¶
Once the LSP is installed, in Helix it’s as easy as hitting the insert key (to edit your *.fs code file) and entering the first three letters of a Mecrisp-Stellaris command like “emi” for “emit” and the LSP list of completion choices will pop up.
Use the up and down arrow key to select your choice and then use the right arrow key to select it and the pop-up will vanish.
The command you selected is now inserted in your text and you can continue coding.
How to See a List of All Dictionary Words ?¶
In insert mode, press “/” and you can scroll thru the entire Dictionary as listed in mecrisp_stellaris.db. This is a Sqlite database, so the content is easy to view.
Requirements¶
pygls>=0.6.0
lsprotocol>=1.4.0