Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDE for C/C++ developer #19

Open
Gabirel opened this issue Apr 21, 2017 · 3 comments
Open

IDE for C/C++ developer #19

Gabirel opened this issue Apr 21, 2017 · 3 comments
Labels

Comments

@Gabirel
Copy link
Owner

Gabirel commented Apr 21, 2017

Teach you how to make SpaceVim become a IDE for C/C++

@Gabirel Gabirel changed the title IDE for C developer IDE for C/C++ developer Apr 21, 2017
@Gabirel Gabirel added the IDE label Apr 21, 2017
@HanielF
Copy link

HanielF commented Jun 2, 2017

so?

@Gabirel
Copy link
Owner Author

Gabirel commented Jun 2, 2017

I've been lazy recently. If you really need this, I could finish this in this week. Probably.

@Gabirel
Copy link
Owner Author

Gabirel commented Apr 17, 2019

Vim + YCM (Still Updating under this comment)

Tested on a medium project successfully, which has over 10 thousand lines of source code.

YES! Please Use YCM since YCM is so easy and smooth to use.

Basic Setup

  1. Enable YCM
    Add this to your ~/.SpaceVim.d/init.vim

let g:spacevim_enable_ycm = 1

PS: If you want to enable YCM in ~/.SpaceVim.d/init.toml, please use bootstrap-function

  1. Configure your project with .ycm_extra_config.py

With Conan - set FLAGS manually

  1. Enable YCM with conan
    Here's the simple case: (Using cmake at the same time)
    ycm is for generating .ycm_extra_config.py and conan_ycm_flags.json
[requires]
OpenSSL/1.0.2o@conan/stable

[generators]
cmake
ycm
  1. Generate flags and config file
    Execute the below code when configuring the project for cmake

conan install ..

  1. Copy and link flags and config file for YCM to your root directory of the project
    Make sure that you have .ycm_extra_config.py and conan_ycm_flags.json in your root directory of the project

  2. That's it!! Enjoy YCM and SpaceVim.

Use compiledb

TODO

PS: Here's are my config for YCM. Use it at your own risk.

let g:spacevim_enable_ycm = 1
let g:spacevim_custom_plugins = [
    \ ['rdnetto/YCM-Generator'],
    \ ]
let g:ycm_error_symbol = ''
let g:ycm_complete_in_comments = 1
let g:ycm_collect_identifiers_from_comments_and_strings = 0
let g:ycm_confirm_extra_conf = 0
let g:ycm_seed_identifiers_with_syntax = 0
let g:ycm_semantic_triggers =  {
  \   'c' : ['->', '.'],
  \   'cpp,objcpp' : ['->', '.', '::'],
  \   'php' : ['->', '::'],
  \   'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'],
  \   'ruby' : ['.', '::'],
  \   'lua' : ['.', ':'],
  \ }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants