A Language Server Protocol implementation for CMake providing code completion, hover documentation, and formatting.
cmake-language-server is a Language Server Protocol implementation specifically for CMake files. It provides intelligent code assistance features like command completion, hover documentation, and formatting for CMake scripts, making it easier to write and maintain CMake build configurations. The server communicates with editors through the standardized LSP protocol, bringing IDE-like capabilities to CMake development.
CMake developers and build system engineers who work with CMake files regularly and want enhanced editing capabilities in their preferred code editors.
Developers choose cmake-language-server because it provides standardized CMake language support across different editors through the LSP protocol, eliminating the need for editor-specific CMake plugins. Its integration with CMake's file API ensures accurate context-aware features based on actual build configurations.
CMake LSP Implementation
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements the Language Server Protocol, providing consistent CMake support across LSP-compatible editors without needing editor-specific plugins.
Leverages CMake's file API to access cached variables and build directory data, ensuring accurate completions and documentation based on actual project state.
Integrates with cmake-format to automatically style CMake files, enforcing configurable rules and reducing manual formatting effort.
Offers built-in command completion and hover documentation for CMake commands and variables, speeding up script writing and reducing lookup time.
The README labels it as 'Alpha Stage, work in progress,' meaning it may have bugs, incomplete features, or breaking changes unsuitable for critical projects.
Requires a pre-configured build directory and CMake execution for full context-aware features, adding setup overhead and limiting usability in new or unbuilt projects.
Tested only with Neovim clients (coc.nvim, vim-lsp), so support for other editors is untested and may require manual configuration or lack functionality.
Depends on the external Python tool cmake-format for formatting, which adds a dependency and potential installation or compatibility issues.