1
0
mirror of https://github.com/tiyn/wiki.git synced 2026-02-22 10:24:47 +01:00

vim/c: added vim setup and c language setup

- added vim setup
- added vim autocomplete guide based on coc
- added c support by coc lsp
- added c setup
This commit is contained in:
TiynGER
2020-11-01 14:35:41 +01:00
parent ce4d4a13dd
commit 9ba0e1908a
5 changed files with 197 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
# C
C is a common programming language.
In this entry we will focus on making vim support c and use vim as an ide for c.
## Autocompletion
### Coc
To enable autocompletion for coc you need to install `ccls`.
After that you need to add the following lines to your coc config file.
```json
{
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": [
"c",
"cpp",
"objc",
"objcpp"
],
"rootPatterns": [
".ccls",
"compile_commands.json",
".vim/",
".git/",
".hg/"
],
"initializationOptions": {
"cache": {
"diretory": "/tmp/ccls"
}
}
}
}
}
```