Skip to content

Commit

Permalink
Merge pull request #17 from regen100/update-doc
Browse files Browse the repository at this point in the history
Update README
  • Loading branch information
regen100 authored Jun 6, 2020
2 parents 48d5980 + 3697fae commit ce2c3a2
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ Alpha Stage, work in progress.
$ pip install cmake-language-server
```

### Clients
### Tested Clients

- Neovim ([neoclide/coc.nvim][coc.nvim])
- Neovim ([neoclide/coc.nvim][coc.nvim], [prabirshrestha/vim-lsp][vim-lsp])

#### Neovim

##### coc.nvim

```jsonc
"languageserver": {
"cmake": {
Expand All @@ -46,5 +48,21 @@ $ pip install cmake-language-server
}
```

##### vim-lsp

```vim
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
```

[coc.nvim]: https://github.com/neoclide/coc.nvim
[vim-lsp]: https://github.com/prabirshrestha/vim-lsp

0 comments on commit ce2c3a2

Please sign in to comment.