cmake-language-server
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 (neoclide/coc.nvim, prabirshrestha/vim-lsp)
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
buildDirectoryThis language server uses CMake's file API to get cached variables. The API communicates using<buildDirectory>/.cmake/api/.buildDirectoryis relative path to the root uri of the workspace. To configure the build tree, you need to run the cmake command such ascmake .. -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)
| File | Size | Uploaded | |
|---|---|---|---|
| cmake_language_server-0.1.11.tar.gz | 11.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|