Giter VIP home page Giter VIP logo

deoplete-clang2's People

Contributors

mhinz avatar shougo avatar tweekmonster avatar wsdjeg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deoplete-clang2's Issues

Exception during clang2.on_event for event 'Init': expected string or bytes-like object.

Hello,
I've just installed deoplete_clang2 and I'm getting this error when trying to edit a .c file:

[deoplete] Traceback (most recent call last):                                                                                                                          
[deoplete]   File "/home/savickaskr/.vim/bundle/deoplete.nvim/rplugin/python3/deoplete/deoplete.py", line 473, in on_event                                             
[deoplete]     source.on_event(context)                                                                                                                                
[deoplete]   File "/home/savickaskr/.vim/bundle/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 151, in on_event                            
[deoplete]     cmd, flags = self.build_flags(context)                                                                                                                  
[deoplete]   File "/home/savickaskr/.vim/bundle/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 506, in build_flags                         
[deoplete]     db_flags = self.find_db_flags(context)                                                                                                                  
[deoplete]   File "/home/savickaskr/.vim/bundle/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 354, in find_db_flags                       
[deoplete]     ')\s*(\S+)', entry.get('command')):                                                                                                                     
[deoplete]   File "/usr/lib/python3.6/re.py", line 229, in finditer                                                                                                    
[deoplete]     return _compile(pattern, flags).finditer(string)                                                                                                        
[deoplete] TypeError: expected string or bytes-like object                                                                                                             
[deoplete] Exception during clang2.on_event for event 'Init': expected string or bytes-like object.  Use :messages for error details.  

My ~/.config/nvim/init.vim:

set number
set mouse=a
set background=dark

" NeoBundle settings
" Skip initialization for vim-tiny or vim-small.
if 0 | endif

if &compatible
  set nocompatible               " Be iMproved
endif

set runtimepath+=~/.config/nvim/bundle/neobundle/
call neobundle#begin(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'

" My Bundles here:
" Refer to |:NeoBundle-examples|.
NeoBundle 'airblade/vim-gitgutter'
NeoBundle 'scrooloose/nerdtree'
NeoBundle 'vim-airline/vim-airline'
NeoBundle 'vim-airline/vim-airline-themes'
NeoBundle 'tpope/vim-commentary'
NeoBundle 'google/vim-searchindex'
NeoBundle 'icymind/NeoSolarized'
NeoBundle 'Shougo/deoplete.nvim'
NeoBundle 'tweekmonster/deoplete-clang2'

call neobundle#end()

filetype plugin indent on

NeoBundleCheck

let g:gitgutter_enabled = 1
let g:gitgutter_realtime = 1
let g:gitgutter_eager = 1

" NERDTree settings
" Open NERDTreee when opening vim with no files were specified
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif

" Close vim if the only tab open is NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

" Files to be ignored by NERDTree
let NERDTreeIgnore = ['\.o$', 'core']

" Toggle NERDTree
map <F2> :NERDTreeToggle<CR>

" Airline settings
let g:airline_theme='solarized'
let g:airline_solarized_bg='dark'

" Easier navigation in splits
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>

" Set colorscheme
colorscheme NeoSolarized

" Deaoplete setup
let g:deoplete#enable_at_startup = 1

My compile_commands.json:

[
    {
        "arguments": [
            "cc",
            "-c",
            "-Wall",
            "-Wextra",
            "-pedantic",
            "-Iinclude",
            "-pthread",
            "-std=gnu99",
            "-o",
            "main.o",
            "main.c"
        ],
        "directory": "/home/savickaskr/projects/stmd/testapp",
        "file": "main.c"
    }
]

Add example in readme.md with compile_commands.json

Hi, giving a try to deoplete from YCM.
Can we have an example on how to work with the compile_commands.json. It says no config required... but where should the json be? It is generated by cmake in the build folder, #14 but it should be in the root of the project right? That should be noticed to the user.

Also, for a deoplete noob, do I need something else to say to deoplete? Something like this maybe?
let g:deoplete#sources.cpp = ['buffer', 'clang2']

Thanks!

deolete deprecated "debug_enabled"

A recent commit from Shougo deprecates debug_enabled: Shougo/deoplete.nvim@ba4d03e

I'm getting the following error:

[deoplete] Traceback (most recent call last):
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete.nvim/rplugin/python3/deoplete/deoplete.py", line 136, in gather_results
[deoplete]     ctx['candidates'] = source.gather_candidates(ctx)
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 596, in gather_candidates
[deoplete]     return list(self.gather_includes(context))
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 586, in gather_includes
[deoplete]     _, flags = self.build_flags(context)
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 505, in build_flags
[deoplete]     flags = self.get_clang_flags(lang) + flags
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 226, in get_clang_flags
[deoplete]     stdout = self.call_clang([], clang_flags, True)
[deoplete]   File "/home/jeremy/.config/nvim/plugins/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 321, in call_clang
[deoplete]     elif self.debug_enabled and stderr.strip():
[deoplete] AttributeError: 'Source' object has no attribute 'debug_enabled'
[deoplete] Could not get completions from: clang2.  Use :messages for error details.

And the problem line:

elif self.debug_enabled and stderr.strip():

Not getting clang completion immediately

Hi,

I am using this plugin for C/C++ programming and I think it is great, especially for the parameters placeholders that avoid the sometimes annoying switches between tabs to have a look at man.

However, I noticed that the translation is not immediate/automatic: let's say I want to type mmap (includes are there already). What happens is that I don't get the clang completion immediately but I have to type a space in the middle of the word then go back and continue typing. Only now the clang completion appears. This is quite annoying since I would like to get the completion in realtime.

Anyone having the same issue?

Currently using nvim 0.2.0, clang 4.0 (tested also with 3.4.2 and seen the same behavior) and latest deoplete and deoplete-clang2 sources.

My init.vim

let g:deoplete#enable_at_startup = 1
let g:deoplete#sources#clang#sort_algo = 'priority'
set completeopt-=preview

Thanks,

Christian

Fresh install throws an error?

Not sure if useful, but it seems like I get an error after a fresh install. The error occurs whenever a new buffer is open for editing. Based on the output, I'm guessing whenever a buffer is read.

Figured someone else may have a similar issue or have ideas for the solution:

[deoplete] Traceback (most recent call last):
  File "/home/polar/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 591, in _on_event
    source.on_event(context)
  File "/home/polar/.vim/plugged/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 147, in on_event
    self.clang_path = context['vars'].get(
KeyError: 'vars'
Exception during clang2.on_event for event 'Init': 'vars'.  Use :messages / see above for error details.
[deoplete] Traceback (most recent call last):
  File "/home/polar/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 591, in _on_event
    source.on_event(context)
  File "/home/polar/.vim/plugged/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 147, in on_event
    self.clang_path = context['vars'].get(
KeyError: 'vars'
Exception during clang2.on_event for event 'BufReadPost': 'vars'.  Use :messages / see above for error details.
[deoplete] Traceback (most recent call last):
  File "/home/polar/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 591, in _on_event
    source.on_event(context)
  File "/home/polar/.vim/plugged/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 147, in on_event
    self.clang_path = context['vars'].get(
KeyError: 'vars'
Exception during clang2.on_event for event 'BufReadPost': 'vars'.  Use :messages / see above for error details.

issue with this plugin and neosnippet

mini vimrc

set rtp+=~/.cache/vimfiles/repos/github.com/Shougo/neosnippet.vim
set rtp+=~/.cache/vimfiles/repos/github.com/Shougo/neosnippet-snippets
set rtp+=~/.cache/vimfiles/repos/github.com/Shougo/deoplete.nvim
set rtp+=~/.cache/vimfiles/repos/github.com/tweekmonster/deoplete-clang2
let g:deoplete#enable_at_startup = get(g:, 'deoplete#enable_at_startup', 1)

imap <expr><Tab>
            \ neosnippet#expandable_or_jumpable() ?
            \ "\<Plug>(neosnippet_expand_or_jump)" : "\<Tab>"

reproduce step:

  1. open vim via vim -u test.vim
  2. :e test.c
  3. type i to insert mode, then type into main<tab>

you will see

main<Plug>(neosnippet_expand_or_jump)

but I think it should be

int main(int argc, char const* argv[])
{
    
    return 0;
}

ref : https://github.com/SpaceVim/SpaceVim/issues/356

[deoplete] Could not get completions from: clang2

While working on neovim code and trying to change a member variable myStruct.XXX (deoplete trying to complete XXX):

[deoplete] Traceback (most recent call last):
[deoplete]   File "/home/teto/.local/share/nvim/site/pack/deoplete.nvim/rplugin/python3/deoplete/deoplete.py", line 118, in gather_results
[deoplete]     ctx['candidates'] = source.gather_candidates(ctx)
[deoplete]   File "/home/teto/.local/share/nvim/site/pack/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 659, in gather_candidates
[deoplete]     cmd, flags = self.build_flags(context)
[deoplete]   File "/home/teto/.local/share/nvim/site/pack/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 502, in build_flags
[deoplete]     flags = self.get_clang_flags(lang) + flags
[deoplete]   File "/home/teto/.local/share/nvim/site/pack/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 223, in get_clang_flags
[deoplete]     stdout = self.call_clang([], clang_flags, True)
[deoplete]   File "/home/teto/.local/share/nvim/site/pack/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 300, in call_clang
[deoplete]     stderr=subprocess.PIPE, cwd=cwd)
[deoplete]   File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
[deoplete]     restore_signals, start_new_session)
[deoplete]   File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
[deoplete]     raise child_exception_type(errno_num, err_msg)
[deoplete] PermissionError: [Errno 13] Permission denied
[deoplete] Could not get completions from: clang2.  Use :messages for error details.

A priori all files belong to the current user.

autofill_neomake causing future self.nvim calls to hang

After running lines 157-159, any call to self.nvim.* will block the thread indefinitely. Naturally this means no completions are made, as execution stops when getting the contents of the buffer. Presumably the async_call is never completing, but I stopped debugging (for now) once I figured out what how to get around the problem.

I am using Neovim v0.2.2 on Windows. I do not have neomake installed.

The 'fix' for me was just to let autofill_neomake = 0.

Issue with UltiSnips snippets

I have a snippet that expands

if

to

if (true) {
	
}

However, when I also use deoplete-clang it expands to

if<Plug>delimitMateS-Tab

instead. The problem persists regardless of my UltiSnips settings, and it doesn't happen with deoplete-clang.

Throws errors when trying to type the name of an `#include`d header

Here are the steps:

  • Create a new file (touch derp.c)
  • Edit the file (nvim derp.c)
  • Type the following: #include <
  • Once I start typing the name of the header (e.g. stdio.h) deoplete throws the following errors:
[deoplete] Traceback (most recent call last):
[deoplete]   File "/Users/hiphish/.local/share/nvim/site-packages/deoplete.nvim/rplugin/python3/deoplete/deoplete.py", line 116, in gather_results
[deoplete]     ctx['candidates'] = convert2candidates(ctx['candidates'])
[deoplete]   File "/Users/hiphish/.local/share/nvim/site-packages/deoplete.nvim/rplugin/python3/deoplete/util.py", line 51, in convert2candidates
[deoplete]     return [{'word': x} for x in l] if l and isinstance(l[0], str) else l
[deoplete] TypeError: 'generator' object is not subscriptable
[deoplete] Could not get completions from: clang2.  Use :messages for error details.

This happens every time. Any idea?

Permission denied error?

Same setup works with deoplete-clang but not here.
I was just triggering asking for autocompletions after std::
using clang 5.0 in arch

[deoplete] Traceback (most recent call last):
[deoplete]   File "/home/phc/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/deoplete.py", line 136, in gather_results
[deoplete]     ctx['candidates'] = source.gather_candidates(ctx)
[deoplete]   File "/home/phc/.vim/plugged/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 662, in gather_candidates
[deoplete]     cmd, flags = self.build_flags(context)
[deoplete]   File "/home/phc/.vim/plugged/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 505, in build_flags
[deoplete]     flags = self.get_clang_flags(lang) + flags
[deoplete]   File "/home/phc/.vim/plugged/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 226, in get_clang_flags
[deoplete]     stdout = self.call_clang([], clang_flags, True)
[deoplete]   File "/home/phc/.vim/plugged/deoplete-clang2/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 303, in call_clang
[deoplete]     stderr=subprocess.PIPE, cwd=cwd)
[deoplete]   File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
[deoplete]     restore_signals, start_new_session)
[deoplete]   File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
[deoplete]     raise child_exception_type(errno_num, err_msg, err_filename)
[deoplete] PermissionError: [Errno 13] Permission denied: ''
[deoplete] Could not get completions from: clang2.  Use :messages for error details.
`

options for this plugins should be detect when deoplete-clang2 is loaded.

@tweekmonster
I have this config in my vimrc, but my deoplete is lazy loaded on Insert mode event. so when I open a cpp file, :Neomake clang still get errors about use of undeclared identifier 'nullptr', after I go into insert mode, :Neomake clang will not show issues, so I think the options below is detect when deoplete is loaded.

let g:deoplete#sources#clang#flags = ['--std=c++11']
let g:deoplete#sources#clang#autofill_neomake = 1

Protected method in base class

When using the autocomplete on a protected method in a base class, the autocomplete shows an unexpected and unuseful.

image

image

It appears this only happens when a base class has a protected method. Everything else seems to appear fine.

OSError: EOF

OS: ubuntu 16.04;
using neovim-0.2.3, clang: 5.0;
After typing two chars, the error occurs.

[deoplete] Traceback (most recent call last):                                                                                               
  File "/home/x1314aq/.cache/vimfiles/repos/github.com/Shougo/deoplete.nvim/rplugin/python3/deoplete/child.py", line 232, in _gather_results                                 
    ctx['candidates'] = source.gather_candidates(ctx)                                                                                                                        
  File "/home/x1314aq/.cache/vimfiles/.cache/init.vim/.dein/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 637, in gather_candidates                             
    buf = self.nvim.current.buffer                                                                                                                                           
  File "/usr/local/lib/python3.5/dist-packages/neovim/api/nvim.py", line 436, in buffer                                                                                      
    return self._session.request('nvim_get_current_buf')                                                                                                                     
  File "/usr/local/lib/python3.5/dist-packages/neovim/api/nvim.py", line 140, in request                                                                                     
    res = self._session.request(name, *args, **kwargs)                                                                                                                       
  File "/usr/local/lib/python3.5/dist-packages/neovim/msgpack_rpc/session.py", line 94, in request                                                                           
    raise IOError('EOF')                                                                                                                                                     
OSError: EOF                                                                                                                                                                 
Errors from: clang2.  Use :messages / see above for error details.

Paths to headers get completed but everything else does not

Hey!
I'm just starting out with C++ and making a small project with libcinder. I build it with cmake configuration that Cinder provides. Everything works fine but I can't make auto completion work.

What's interesting is that when I type #include "(...) a dropdown shows me a bunch of vaild options, including Cinder libs like:

#include "cinder/gl/gl.h"
#include "cinder/gl/Batch.h"

But when I try to see stuff in the included namespace typing something like gl::(...)... Nothing. I see only suggestions from buffer source.

My ./compile_commands.json looks like this:

[
{
  "directory": "/home/alex/projects/fixation",
  "command": "/usr/bin/c++  -DFT2_BUILD_LIBRARY -DFT_DEBUG_LEVEL_TRACE -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_USE_OPENGL -D_GLIBCXX_USE_CXX11_ABI=0 -D_UNIX -isystem /home/alex/repos/Cinder/include  -g   -std=c++14 -o CMakeFiles/Fixation.dir/src/Fixation.cpp.o -c /home/alex/projects/fixation/src/Fixation.cpp",
  "file": "/home/alex/projects/fixation/src/Fixation.cpp"
}
]

After running cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 my project folder looks like this:

./Debug
./Debug/Fixation
./Makefile
./cmake_install.cmake
./structure.txt
./assets
./CMakeCache.txt
./compile_commands.json
./CMakeLists.txt
./CMakeFiles
./CMakeFiles/cmake.check_cache
./CMakeFiles/progress.marks
./CMakeFiles/CMakeTmp
./CMakeFiles/feature_tests.bin
./CMakeFiles/3.8.2
./CMakeFiles/3.8.2/CompilerIdC
./CMakeFiles/3.8.2/CompilerIdC/CMakeCCompilerId.c
./CMakeFiles/3.8.2/CompilerIdC/tmp
./CMakeFiles/3.8.2/CompilerIdC/a.out
./CMakeFiles/3.8.2/CMakeDetermineCompilerABI_CXX.bin
./CMakeFiles/3.8.2/CMakeCXXCompiler.cmake
./CMakeFiles/3.8.2/CMakeDetermineCompilerABI_C.bin
./CMakeFiles/3.8.2/CMakeSystem.cmake
./CMakeFiles/3.8.2/CMakeCCompiler.cmake
./CMakeFiles/3.8.2/CompilerIdCXX
./CMakeFiles/3.8.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
./CMakeFiles/3.8.2/CompilerIdCXX/tmp
./CMakeFiles/3.8.2/CompilerIdCXX/a.out
./CMakeFiles/Makefile.cmake
./CMakeFiles/feature_tests.c
./CMakeFiles/Fixation.dir
./CMakeFiles/Fixation.dir/progress.make
./CMakeFiles/Fixation.dir/build.make
./CMakeFiles/Fixation.dir/link.txt
./CMakeFiles/Fixation.dir/flags.make
./CMakeFiles/Fixation.dir/depend.make
./CMakeFiles/Fixation.dir/src
./CMakeFiles/Fixation.dir/cmake_clean.cmake
./CMakeFiles/Fixation.dir/DependInfo.cmake
./CMakeFiles/TargetDirectories.txt
./CMakeFiles/CMakeDirectoryInformation.cmake
./CMakeFiles/Makefile2
./CMakeFiles/feature_tests.cxx
./CMakeFiles/CMakeOutput.log
./src
./src/Fixation.cpp

Any help would be much appreciated. Thank you!

Cannot get autocomplete from the plugin

cannot get autocomplete from the plugin when editing a cpp file

my operating system is Manjaro Linux, and package clang is already installed.
my vimrc file can be seen here, https://pastebin.com/qRd2P1QU
my nvim :checkhealth result can be seen here, https://pastebin.com/0ULJhfsR

run nvim --version in the terminal give me the following result:

NVIM v0.2.2
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wconversion -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.2.2/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Features: +acl +iconv +jemalloc +tui 
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

also, when typing #include < I noticed my cpu usage surge to 100% for about 4 seconds before falling back.

No C++11/14 support even if it's explicitly specified in init.vim MacOS

OS: Mac OS High Sierra
NVIM: v0.2.2
Deoplete-clang2: 787dd4d

Summarry: There is no functions suggestions from C++11 and above even if
let g:deoplete#sources#clang#std#cpp='c++14' is set.

Everything work fine from C++98.
My init.vim

inoremap jj <esc>
inoremap <C-k> <return>
map <C-n> :NERDTreeToggle<CR>
map <C-s> :call CurtineIncSw()<CR>
map <space> /
map <c-space> ?
vnoremap . :norm.<CR>
let mapleader = "\<Space>"                                                      
set ignorecase
set incsearch

set nu
set nohlsearch
syntax on                                                                       
call plug#begin()
if has('nvim')
  Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
  Plug 'Shougo/deoplete.nvim'
  Plug 'roxma/nvim-yarp'
  Plug 'roxma/vim-hug-neovim-rpc'
endif
Plug 'tpope/vim-surround'
Plug 'Shougo/neopairs.vim'
Plug 'vim-airline/vim-airline'
Plug 'tweekmonster/deoplete-clang2'
Plug 'SirVer/ultisnips'                                                         
Plug 'scrooloose/nerdtree'
Plug 'mhinz/vim-janah'
Plug 'honza/vim-snippets'                                                       
Plug 'neomake/neomake'
Plug 'ericcurtin/CurtineIncSw.vim'
call plug#end()                                                                
let g:neopairs#enable = 1
let g:deoplete#sources#clang#flags = ['-darwin=10.13']
let g:deoplete#enable_at_startup = 1                                            
let g:deoplete#sources#clang#libclang_path="/Library/Developer/CommandLineTools/usr/lib/libclang.dylib"
let g:deoplete#sources#clang#clang_header ="/usr/local/Cellar/llvm/5.0.0/lib/clang"
let g:chromatica#enable_at_startup=1
let g:chromatica#libclang_path="/Library/Developer/CommandLineTools/usr/lib/libclang.dylib"
let g:deoplete#sources#clang#std#cpp='c++14'
"--------------------
" ultisnips
"--------------------
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
"
" ATTENTION: don't map this to keys which are the first part of a 'two part'
" command. E.g. don't map to `<c-g>` because `g` is part of `gt`, `gT`, ...
" This will slow down jupming between tab stops, but only when 'vim-surround'
" is installed.
let g:UltiSnipsExpandTrigger="<C-j>"
let g:UltiSnipsJumpForwardTrigger="<C-j>"
let g:UltiSnipsJumpBackwardTrigger="<C-h>"

" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"

let g:UltiSnipsSnippetDirectories=["mysnippets", "copiedsnippets"]
call neomake#configure#automake('nw', 750)
autocmd ColorScheme janah highlight Normal ctermbg=235
colorscheme janah

obesezanyjapanesebeetle-size_restricted

Interesting fact:
Completion works with no regard for the following globals presence.

g:deoplete#sources#clang#libclang_path="/Library/Developer/CommandLineTools/usr/lib/libclang.dylib"
g:deoplete#sources#clang#clang_header ="/usr/local/Cellar/llvm/5.0.0/lib/clang"

Completion still works although I put this variables in a comment section. Weird!

Disable argument placeholders

Hi, I've been using this instead of deoplete-clang for some time now and it works great, especially for bigger projects. However, I find the argument placeholders annoying and would like to disable them to have the plugin act like other deoplete sources. Would it be possible to add such an option?

placeholder next/prev mapping `<Tab>` interfere with completion pum

I really would like better integration with deoplete, as this completion source was designed for that plugin.
It is very convenient to use only when completing things, however I cannot find a solution to this problem:

When having the following configuration

        let g:clang2_placeholder_next='<Tab>'
	inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"

deoplete-clang2's placeholder_next always takes precedence.

TL;DR

It is not possible to continue to the next completion item with <Tab>, because clang2's placeholder jumping algorithm takes over an the currently active item is used.

`deoplete` throws error when start using this plugin

This is full messages:

[deoplete] Exception during clang2.on_event for event 'Init': Expecting value: line 1 column 1 (char 0).  Use :messages for error details.                                                      
[deoplete] Traceback (most recent call last):                                                   
[deoplete]   File "/home/nqa/dein.vim/.cache/init.vim/.dein/rplugin/python3/deoplete/deoplete.py", line 454, in on_event                                                                        
[deoplete]     source.on_event(context)                                                         
[deoplete]   File "/home/nqa/dein.vim/.cache/init.vim/.dein/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 151, in on_event                                                         
[deoplete]     cmd, flags = self.build_flags(context)                                           
[deoplete]   File "/home/nqa/dein.vim/.cache/init.vim/.dein/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 503, in build_flags                                                      
[deoplete]     db_flags = self.find_db_flags(context)                                           
[deoplete]   File "/home/nqa/dein.vim/.cache/init.vim/.dein/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 347, in find_db_flags                                                    
[deoplete]     for entry in json.load(fp):                                                      
[deoplete]   File "/usr/lib/python3.6/json/__init__.py", line 299, in load                      
[deoplete]     parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)        
[deoplete]   File "/usr/lib/python3.6/json/__init__.py", line 354, in loads                     
[deoplete]     return _default_decoder.decode(s)                                                
[deoplete]   File "/usr/lib/python3.6/json/decoder.py", line 339, in decode                     
[deoplete]     obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                
[deoplete]   File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode                 
[deoplete]     raise JSONDecodeError("Expecting value", s, err.value) from None                 
[deoplete] json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)              
[deoplete] Exception during clang2.on_event for event 'Init': Expecting value: line 1 column 1 (char 0).  Use :messages for error details.  

Problem running on Fedora

The following arises:

[deoplete] Traceback (most recent call last):                                                                                                                                                                                     
[deoplete]   File "/home/arsen/.vim/dein/.cache/init.vim/.dein/rplugin/python3/deoplete/deoplete.py", line 467, in on_event                                                                                                                  
[deoplete]     source.on_event(context)                    
[deoplete]   File "/home/arsen/.vim/dein/.cache/init.vim/.dein/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 151, in on_event                                                                                                   
[deoplete]     cmd, flags = self.build_flags(context)      
[deoplete]   File "/home/arsen/.vim/dein/.cache/init.vim/.dein/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 506, in build_flags                                                                                                
[deoplete]     db_flags = self.find_db_flags(context)      
[deoplete]   File "/home/arsen/.vim/dein/.cache/init.vim/.dein/rplugin/python3/deoplete/sources/deoplete_clang2.py", line 350, in find_db_flags                                                                                              
[deoplete]     for entry in json.load(fp):                 
[deoplete]   File "/usr/lib64/python3.6/json/__init__.py", line 299, in load                                          
[deoplete]     parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)                              
[deoplete]   File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads                                         
[deoplete]     return _default_decoder.decode(s)           
[deoplete]   File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode                                         
[deoplete]     obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                      
[deoplete]   File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode                                     
[deoplete]     raise JSONDecodeError("Expecting value", s, err.value) from None                                       
[deoplete] json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)                                    
[deoplete] Exception during clang2.on_event for event 'Init': Expecting value: line 1 column 1 (char 0).  Use :messages for error details. 

This worked fine on Gentoo and Arch so I don't know.

Thanks in advance

`libclang` versus `clang -cc1`

Hi there, thanks for the plugin. I am trying to search a little bit about what is the difference between using libclang or using the clang front end clang -cc1? And only this FAQ.

I've found libclang unreliable with heavy templated code in c++, and happy to explore alternatives.

Any clarification, or link to information would be appreciated. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.