mirror of
https://github.com/tiyn/wiki.git
synced 2025-04-19 14:07:46 +02:00
40 lines
838 B
Markdown
40 lines
838 B
Markdown
# 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](coc.md) 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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|