### Install via cargo-binstall (prebuilt binaries) Source: https://neocmakelsp.github.io/docs/installation.html Install a prebuilt binary of neocmakelsp using cargo-binstall, the easiest method for prebuilt binaries. ```bash cargo binstall neocmakelsp ``` -------------------------------- ### Install via Homebrew Source: https://neocmakelsp.github.io/docs/installation.html Install neocmakelsp using the Homebrew package manager on macOS or Linux. ```bash brew install neocmakelsp ``` -------------------------------- ### format args configuration example Source: https://neocmakelsp.github.io/docs/config.html Shows how to pass extra arguments to the formatting program, using two-space indentation with gersemi. ```toml [format] program = "gersemi" # Use two space indentation. args = ["--indent", "2", "-"] ``` -------------------------------- ### Install via Alpine Linux apk Source: https://neocmakelsp.github.io/docs/installation.html Install neocmakelsp using the Alpine Linux package manager (apk). ```bash apk add neocmakelsp ``` -------------------------------- ### Build from source with cargo install Source: https://neocmakelsp.github.io/docs/installation.html Compile and install neocmakelsp from source using cargo with the --locked flag to ensure dependencies come from the lockfile. ```bash cargo install --locked neocmakelsp ``` -------------------------------- ### Emacs: Setup neocmakelsp with cmake-ts-mode and eglot Source: https://neocmakelsp.github.io/docs/editors.html Add this to your Emacs configuration to use neocmakelsp as an eglot server for CMake files. It requires the cmake-ts-mode package and sets up a hook to ensure eglot starts. ```emacs-lisp (use-package cmake-ts-mode :config (add-hook 'cmake-ts-mode-hook (defun setup-neocmakelsp () (require 'eglot) (add-to-list 'eglot-server-programs `((cmake-ts-mode) . ("neocmakelsp" "stdio"))) (eglot-ensure)))) ``` -------------------------------- ### enable_external_cmake_lint configuration example Source: https://neocmakelsp.github.io/docs/config.html Enables linting with cmake-lint by setting enable_external_cmake_lint to true. ```toml # Run `cmake-lint` as part of the linting process. enable_external_cmake_lint = true ``` -------------------------------- ### Install via mason package manager in Neovim Source: https://neocmakelsp.github.io/docs/installation.html Install neocmakelsp using the mason package manager within Neovim. ```vim :MasonInstall neocmakelsp ``` -------------------------------- ### format program configuration example Source: https://neocmakelsp.github.io/docs/config.html Configures an external formatter program (gersemi) with arguments. The program is set to 'gersemi' and args to ['-']. ```toml [format] # Format with an external formatter. program = "gersemi" args = ["-"] ``` -------------------------------- ### Install shell completions on Alpine Linux Source: https://neocmakelsp.github.io/docs/installation.html Install shell completions for bash, fish, and zsh on Alpine Linux; these are packaged separately from the main binary. ```bash apk add neocmakelsp-bash-completion apk add neocmakelsp-fish-completion apk add neocmakelsp-zsh-completion ``` -------------------------------- ### line_max_words configuration example Source: https://neocmakelsp.github.io/docs/config.html Sets the maximum line length to 100 characters using line_max_words. ```toml # Set maximum line length to 100 characters. line_max_words = 100 ``` -------------------------------- ### Neovim: Configure and enable neocmakelsp with nvim-lspconfig Source: https://neocmakelsp.github.io/docs/editors.html Add this to your Neovim configuration (init.lua) after installing the nvim-lspconfig plugin. It configures the language server and enables it. ```lua -- Configure the language server vim.lsp.config("neocmake", { --[[ opts ]] }) -- Enable the language server vim.lsp.enable("neocmake") ``` -------------------------------- ### command_case configuration example Source: https://neocmakelsp.github.io/docs/config.html Sets command_case to 'upcase' to enforce lowercase commands. The comment indicates the check is for lowercase commands, but the value 'upcase' is used as shown. ```toml # Check that commands are lowercase. command_upcase = "upcase" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.