> 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.

LSP-capable editors

Editor / IDE

Notes

Visual Studio Code

Built-in LSP client; extensive extension marketplace.

Neovim

Native LSP support via vim.lsp (0.5+); also via plugins like nvim-lspconfig.

Vim

LSP via plugins: vim-lsp, coc.nvim, YouCompleteMe.

Emacs

eglot or lsp-mode.

Sublime Text

Via LSP package.

Atom

atom-ide-ui and language-specific packages (project archived).

Eclipse IDE

Eclipse LSP4E integration.

IntelliJ IDEA / Android Studio / JetBrains family

Native LSP support via intellij-lsp plugin or built-in since 2023.2.

Kate

Built-in LSP client.

GNOME Builder

Native LSP integration.

Helix Editor

LSP support built-in in Rust.

Lapce

Native LSP support.

Onivim 2

LSP support built-in (project archived).

Nova

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

_images/2-foldable.png

12-bitencoding function

_images/12-bitencoding.png

um* function

_images/um.png

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

Download here

https://sourceforge.net/projects/mecrisp-stellaris-folkdoc/files/mecrisp-stellaris-LSP.tar.gz/download