Skip to main content

cmake-language-server

PyPI AUR version GitHub Actions (Tests) codecov GitHub

CMake LSP Implementation.

Alpha Stage, work in progress.

Features

  • Builtin command completion
  • Documentation for commands and variables on hover
  • Formatting (by cmake-format)

Commands

  • cmake-language-server: LSP server

Installation

$ pip install cmake-language-server

Tested Clients

Neovim

coc.nvim
  "languageserver": {
    "cmake": {
      "command": "cmake-language-server",
      "filetypes": ["cmake"],
      "rootPatterns": [
        "build/"
      ],
      "initializationOptions": {
        "buildDirectory": "build"
      }
    }
  }
vim-lsp
if executable('cmake-language-server')
  au User lsp_setup call lsp#register_server({
  \ 'name': 'cmake',
  \ 'cmd': {server_info->['cmake-language-server']},
  \ 'root_uri': {server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'build/'))},
  \ 'whitelist': ['cmake'],
  \ 'initialization_options': {
  \   'buildDirectory': 'build',
  \ }
  \})
endif

Configuration

  • buildDirectory This language server uses CMake's file API to get cached variables. The API communicates using <buildDirectory>/.cmake/api/. buildDirectory is relative path to the root uri of the workspace. To configure the build tree, you need to run the cmake command such as cmake .. -DFOO=bar.

Metadata

Release files for cmake-language-server 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmake-language-server 0.1.11
File Size Uploaded
cmake_language_server-0.1.11.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cmake-language-server 0.1.11
File Interpreter ABI Platform
cmake_language_server-0.1.11-py3-none-any.whl Python 3 none any Details

Total release size: 21.5 kB

Release files / cmake_language_server-0.1.11.tar.gz

Download URL cmake_language_server-0.1.11.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
005f48367ec569457a7229a58f6762044fddacac647858b39d725ae2b3cd695b
BLAKE2b-256 checksum
How to use checksums
cfad54c337fd2093a7c7c13528ac1393aeda009cdc16be954041834328845237
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / cmake_language_server-0.1.11-py3-none-any.whl

Download URL cmake_language_server-0.1.11-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74ce1fa93a3db258776d881935172a87124ed621298404ac42f960eab6be8c04
BLAKE2b-256 checksum
How to use checksums
60b80ea1c0b86b8c6ca6c2dd5292762f282e779d6631c0641d043123bf8be164
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.1.11 This release

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page