1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 06:40:05 +08:00
SpaceVim/docs/layers/lang/c.md

57 lines
1.1 KiB
Markdown
Raw Normal View History

2017-12-03 23:21:00 +08:00
---
title: "SpaceVim lang#c layer"
description: "This layer is for c/c++/object-c development"
---
# [Layers](https://spacevim.org/layers) > lang#c
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
2017-12-24 20:43:20 +08:00
- [Features](#features)
2017-12-03 23:42:37 +08:00
- [Configuration](#configuration)
2017-12-03 23:21:00 +08:00
<!-- vim-markdown-toc -->
## Description
This layer is for c/c++/object-c development.
## Layer Installation
2017-12-24 20:43:20 +08:00
To use this configuration layer, add `call SpaceVim#layers#load('lang#c')` to your custom configuration file.
2017-12-03 23:21:00 +08:00
2017-12-24 20:43:20 +08:00
## Features
- code completion
- syntax checking
- formatting
2017-12-03 23:42:37 +08:00
## Configuration
- `clang_executable` (string)
set the path to the clang executable
- `libclang_path` (string)
The libclang shared object (dynamic library) file path. by default it is empty.
- `clang_std` (dict)
```json
{
"c": "c11",
"cpp": "c++1z",
"objc": "c11",
"objcpp": "c++1z",
}
```
- `clang_flag`
2017-12-04 00:28:21 +08:00
Create a `.clang` file at your project root. You should be able to just paste most of your compile flags in there. You can also use a list ['-Iwhatever', ...] when loadding this layer.