mirror of
https://github.com/neovim/nvim-lspconfig
synced 2024-09-16 14:24:07 +02:00
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:
parent
0e30101563
commit
37585d207a
1 changed files with 12 additions and 0 deletions
|
@ -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')]],
|
||||
|
|
Loading…
Reference in a new issue