I can't dedicate the time this project is deserving to it. Please reach out, if you want to maintain it.
A reimplementation of my Meson language server in C++ (Formerly Swift). It's there for providing code intelligence in editors using the language server protocol.
- Hovering
- Symbol resolving
- Jump-To-Definition
- Jump-To-Subdir
- A basic set of diagnostics
- Formatting
- Document symbols
- Autocompletion (Somewhat working)
- Inlay hints
- Highlighting
- Automatic subproject/wrap downloads
- Code actions
- Renaming
- Semantic Highlighting
- Folding
set_variable
/get_variable
with non-constant variable name will fail in more complex cases.subdir
with non-constant subdir name will fail in more complex cases.- Type deduction is not 100% correct yet
- Type definitions may have minor errors regarding:
- Is this argument optional?
- What is the type of the argument?
The first version, written in Vala, had some code maintenance problems because basically everything was done in one file. I had the choice between untangling that mess or rewriting it as cleanly as possible. I have chosen the latter because I wanted to learn Swift.
And now rewrote it in C++ for more performance, a better buildsystem and to address technical debt.
- For Fedora, a COPR is provided: https://copr.fedorainfracloud.org/coprs/jcwasmx86/Swift-MesonLSP/
- For Arch, you can use package from the official extra repository
- For Ubuntu 18.04,20.04,22.04 and Debian Bullseye, Bookworm, Sid you can use: https://github.com/JCWasmx86/swift-mesonlsp-apt-repo NOTE: It's only for the Swift versions, not the C++-Versions, Maintainers needed
- For Ubuntu 22.04, MacOS 12, MacOS 13 and Windows, you can download binaries from the release section: https://github.com/JCWasmx86/Swift-MesonLSP/releases/latest
# Install the dependencies...
git clone https://github.com/JCWasmx86/MesonLSP
cd MesonLSP
meson setup _build --buildtype release -Db_lto=true
ninja -C _build
sudo ninja -C _build install
Install the official meson extension. If you don't have MesonLSP in the PATH, it will ask you whether it should download the language server.
You have to do nothing. The editor already has the support code for MesonLSP. All you have to do is install the language server.
Add this JSON to ~/.config/kate/lspclient/settings.json
:
{
"servers": {
"meson": {
"command": [
"mesonlsp",
"--lsp"
],
"rootIndicationFileNames": [
"meson.build",
"meson_options.txt"
],
"url": "https://github.com/JCWasmx86/MesonLSP",
"highlightingModeRegex": "^Meson$"
}
}
}
After that, a dialog should be shown asking you to confirm that the language server may be started.
nvim-lspconfig has the mesonlsp server configuration you can use.
For coc.nvim, add this JSON to :CocConfig
:
{
"languageserver": {
"meson": {
"command": "MesonLSP",
"args": ["--lsp"],
"rootPatterns": ["meson.build"],
"filetypes": ["meson"]
}
}
}
Take an item from the TODO list in PROGRESS.md and work on it. Feel free to join the matrix channel #mesonlsp:matrix.org
- Working fine:
- Somewhat flaky to unusable