docs(neocmake): document to show neocmake support snippet (#3251)

my contributer has added snippet for my project, so I want to add
document about his greate work
This commit is contained in:
Access 2024-07-26 21:35:18 +09:00 committed by GitHub
parent 0e30101563
commit 37585d207a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,6 +15,18 @@ return {
https://github.com/Decodetalkers/neocmakelsp
CMake LSP Implementation
Neovim does not currently include built-in snippets. `neocmakelsp` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup.
```lua
--Enable (broadcasting) snippet capability for completion
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
require'lspconfig'.neocmake.setup {
capabilities = capabilities,
}
```
]],
default_config = {
root_dir = [[root_pattern('.git', 'cmake')]],