{"id":13493984,"url":"https://github.com/JCWasmx86/mesonlsp","last_synced_at":"2025-03-28T13:31:42.106Z","repository":{"id":65722336,"uuid":"597721579","full_name":"JCWasmx86/mesonlsp","owner":"JCWasmx86","description":"An unofficial, unendorsed language server for meson written in C++","archived":false,"fork":false,"pushed_at":"2024-10-29T09:35:00.000Z","size":4395,"stargazers_count":64,"open_issues_count":16,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-31T08:37:35.516Z","etag":null,"topics":["cplusplus","language-server","language-server-protocol","languageserver","meson","mesonbuild"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JCWasmx86.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-05T12:49:56.000Z","updated_at":"2024-10-23T15:01:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d2689c7-4262-4bfb-b3ed-cf9244ba0026","html_url":"https://github.com/JCWasmx86/mesonlsp","commit_stats":null,"previous_names":["jcwasmx86/mesonlsp"],"tags_count":88,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCWasmx86%2Fmesonlsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCWasmx86%2Fmesonlsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCWasmx86%2Fmesonlsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JCWasmx86%2Fmesonlsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JCWasmx86","download_url":"https://codeload.github.com/JCWasmx86/mesonlsp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246037377,"owners_count":20713407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cplusplus","language-server","language-server-protocol","languageserver","meson","mesonbuild"],"created_at":"2024-07-31T19:01:20.624Z","updated_at":"2025-03-28T13:31:42.101Z","avatar_url":"https://github.com/JCWasmx86.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# Maintainers needed\n\nI can't dedicate the time this project is deserving to it. Please reach out, if you want to maintain it.\n\n\n# MesonLSP\n[![Copr build status](https://copr.fedorainfracloud.org/coprs/jcwasmx86/Swift-MesonLSP/package/mesonlsp/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/jcwasmx86/Swift-MesonLSP/package/mesonlsp/)\n[![CodeFactor](https://www.codefactor.io/repository/github/jcwasmx86/mesonlsp/badge)](https://www.codefactor.io/repository/github/jcwasmx86/mesonlsp)\n[![codecov](https://codecov.io/github/JCWasmx86/Swift-MesonLSP/branch/main/graph/badge.svg?token=5OV4WH5DL1)](https://codecov.io/github/JCWasmx86/Swift-MesonLSP)\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/mesonlsp.svg)](https://repology.org/project/mesonlsp/versions)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8319/badge)](https://www.bestpractices.dev/projects/8319)\n\nA reimplementation of my Meson language server in C++ (Formerly Swift).\nIt's there for providing code intelligence in editors using the language server protocol.\n\n## Current feature set\n- Hovering\n- Symbol resolving\n- Jump-To-Definition\n- Jump-To-Subdir\n- A basic set of diagnostics\n- Formatting\n- Document symbols\n- Autocompletion (Somewhat working)\n- Inlay hints\n- Highlighting\n- Automatic subproject/wrap downloads\n- Code actions\n- Renaming\n- Semantic Highlighting\n- Folding\n\n![Auto Completion](docs/img/auto-completion.png)\n![Diagnostics](docs/img/diags.png)\n![Hover](docs/img/hover.png)\n![Hover](docs/img/hover2.png)\n![Inlay Hints](docs/img/inlay.png)\n![Special integration for pkg-config](docs/img/pkgconfig.png)\n\n## Limitations\n- `set_variable`/`get_variable` with non-constant variable name will fail in more complex cases.\n- `subdir` with non-constant subdir name will fail in more complex cases.\n- Type deduction is not 100% correct yet\n- Type definitions may have minor errors regarding:\n  - Is this argument optional?\n  - What is the type of the argument?\n\n## Why a reimplementation?\nThe first version, written in Vala, had some code maintenance problems because basically everything was done in one file.\nI had the choice between untangling that mess or rewriting it as cleanly as possible.\nI have chosen the latter because I wanted to learn Swift.\n\nAnd now rewrote it in C++ for more performance, a better buildsystem and to address technical debt.\n\n## Installation\n### Install the language server\n#### Easy way\n- For Fedora, a COPR is provided: https://copr.fedorainfracloud.org/coprs/jcwasmx86/Swift-MesonLSP/\n- For Arch, you can use package from the official [extra repository](https://archlinux.org/packages/extra/x86_64/mesonlsp/)\n- 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**\n- 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\n\n#### Compile from source\n```\n# Install the dependencies...\ngit clone https://github.com/JCWasmx86/MesonLSP\ncd MesonLSP\nmeson setup _build --buildtype release -Db_lto=true\nninja -C _build\nsudo ninja -C _build install\n```\n\n### Connect with your editor\n#### VSCode (Official support)\nInstall the official meson extension. If you don't have MesonLSP in the PATH,\nit will ask you whether it should download the language server.\n#### GNOME Builder 45 and GNOME Builder Nightly (Official support)\nYou have to do nothing. The editor already has the support code for MesonLSP. All you have to do is\ninstall the language server.\n#### Kate (No official support)\nAdd this JSON to `~/.config/kate/lspclient/settings.json`:\n```\n{\n  \"servers\": {\n    \"meson\": {\n      \"command\": [\n        \"mesonlsp\",\n        \"--lsp\"\n      ],\n      \"rootIndicationFileNames\": [\n        \"meson.build\",\n        \"meson_options.txt\"\n      ],\n      \"url\": \"https://github.com/JCWasmx86/MesonLSP\",\n      \"highlightingModeRegex\": \"^Meson$\"\n    }\n  }\n}\n```\nAfter that, a dialog should be shown asking you to confirm that the language server may be started.\n\n#### Neovim\nnvim-lspconfig has the [mesonlsp server configuration](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/mesonlsp.lua) you can use.\n\nFor coc.nvim, add this JSON to `:CocConfig`:\n```\n{\n    \"languageserver\": {\n        \"meson\": {\n            \"command\": \"MesonLSP\",\n            \"args\": [\"--lsp\"],\n            \"rootPatterns\": [\"meson.build\"],\n            \"filetypes\": [\"meson\"]\n        }\n    }\n}\n```\n\n## Want to contribute?\nTake an item from the TODO list in [PROGRESS.md](PROGRESS.md) and work on it. Feel\nfree to join the matrix channel [#mesonlsp:matrix.org](https://matrix.to/#/#mesonlsp:matrix.org)\n\n### Projects I tested the language server with\n- Working fine:\n  - [Fractal](https://gitlab.gnome.org/GNOME/fractal)\n  - [GitG](https://gitlab.gnome.org/GNOME/gitg)\n  - [GLib](https://gitlab.gnome.org/GNOME/glib)\n  - [GNOME Builder](https://gitlab.gnome.org/GNOME/gnome-builder)\n  - [GNOME Builder Plugins](https://github.com/JCWasmx86/GNOME-Builder-Plugins)\n  - [GTK](https://gitlab.gnome.org/GNOME/gtk)\n  - [libswiftdemangle](https://github.com/JCWasmx86/libswiftdemangle)\n  - [Mesa](https://gitlab.freedesktop.org/mesa/mesa)\n  - [QEMU](https://gitlab.com/qemu-project/qemu)\n  - [rustc-demangle](https://github.com/JCWasmx86/rustc-demangle)\n  - [Systemd](https://github.com/systemd/systemd)\n  - [GStreamer](https://gitlab.freedesktop.org/gstreamer/gstreamer)\n- Somewhat flaky to unusable\n  - [HelenOS](http://www.helenos.org/)\n  - [picolibc](https://github.com/picolibc/picolibc)\n  - [DPDK](https://www.dpdk.org/)\n  - [EFL](https://git.enlightenment.org/enlightenment/efl)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJCWasmx86%2Fmesonlsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJCWasmx86%2Fmesonlsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJCWasmx86%2Fmesonlsp/lists"}