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

no completion for stl's method when PWD is folders except /tmp #76

Open
Frefreak opened this issue Aug 31, 2017 · 0 comments
Open

no completion for stl's method when PWD is folders except /tmp #76

Frefreak opened this issue Aug 31, 2017 · 0 comments

Comments

@Frefreak
Copy link

Problems summary

I noticed that method completion fail to show for STL's variable, however it works when in /tmp. Methods for struct and class and all other type of completions I can think of work everywhere though.
For example the following:

#include <vector>

using namespace std;

int main(void)
{
	vector<int> vec;
	vec.
}

Expected

Completion of methods for vector pops out. However there's none when current working directory is folders like ~ or ~/anynamesitried; but when pwd is /tmp it works as expected. (I noticed this occasionally)

Environment Information

  • OS: arch linux
  • Neovim version:
    NVIM v0.2.1-824-g5566f3000
    Build type: Release

Provide a minimal init.vim with less than 50 lines and not plugin manager (Required!)

set runtimepath+=~/path/to/deoplete.nvim/
set runtimepath+=~/path/to/deoplete-clang/
let g:deoplete#enable_at_startup = 1                                        
                                                                                
let g:deoplete#sources#clang#libclang_path="/usr/lib/libclang.so.4.0"           
let g:deoplete#sources#clang#clang_header="/usr/include/clang"

The reproduce ways from neovim starting (Required!)

init.vim in ~/test

  1. cd ~/test
  2. nvim -u init.vim asdf.cpp # above contents
  3. completion not work.
  4. :wq
  5. cd /tmp
  6. nvim -u ~/test/init.vim ~/test/asdf.cpp
  7. completion work.

Generate a logfile if appropriate

when in /tmp: http://lpaste.net/358100
when not in /tmp: http://lpaste.net/358101

extra information

The file structure for clang's include path seems to be changed if I remember correctly. Now it looks like:

λ /u/i/clang ls
Analysis    AST          Basic    Config  Edit    Frontend      Index  Parse    Sema           StaticAnalyzer
ARCMigrate  ASTMatchers  CodeGen  Driver  Format  FrontendTool  Lex    Rewrite  Serialization  Tooling

which is different from what is show in README.md, the path contains those files is /usr/lib/clang/4.0.1/include, I tried this path for clang_header but its the same.

λ /u/i/clang ls /usr/lib/clang/4.0.1/include 
adxintrin.h       avx512ifmaintrin.h    __clang_cuda_builtin_vars.h           fma4intrin.h   mm3dnow.h         rdseedintrin.h          stdint.h              x86intrin.h
altivec.h         avx512ifmavlintrin.h  __clang_cuda_cmath.h                  fmaintrin.h    mmintrin.h        rtmintrin.h             stdnoreturn.h         xmmintrin.h
ammintrin.h       avx512pfintrin.h      __clang_cuda_complex_builtins.h       fxsrintrin.h   mm_malloc.h       s390intrin.h            tbmintrin.h           xopintrin.h
arm_acle.h        avx512vbmiintrin.h    __clang_cuda_intrinsics.h             htmintrin.h    module.modulemap  sanitizer               tgmath.h              xray
armintr.h         avx512vbmivlintrin.h  __clang_cuda_math_forward_declares.h  htmxlintrin.h  msa.h             shaintrin.h             tmmintrin.h           xsavecintrin.h
arm_neon.h        avx512vlbwintrin.h    __clang_cuda_runtime_wrapper.h        ia32intrin.h   mwaitxintrin.h    smmintrin.h             unwind.h              xsaveintrin.h
avx2intrin.h      avx512vlcdintrin.h    clflushoptintrin.h                    immintrin.h    nmmintrin.h       stdalign.h              vadefs.h              xsaveoptintrin.h
avx512bwintrin.h  avx512vldqintrin.h    cpuid.h                               intrin.h       opencl-c.h        stdarg.h                varargs.h             xsavesintrin.h
avx512cdintrin.h  avx512vlintrin.h      cuda_wrappers                         inttypes.h     pkuintrin.h       stdatomic.h             vecintrin.h           xtestintrin.h
avx512dqintrin.h  avxintrin.h           emmintrin.h                           iso646.h       pmmintrin.h       stdbool.h               __wmmintrin_aes.h
avx512erintrin.h  bmi2intrin.h          f16cintrin.h                          limits.h       popcntintrin.h    stddef.h                wmmintrin.h
avx512fintrin.h   bmiintrin.h           float.h                               lzcntintrin.h  prfchwintrin.h    __stddef_max_align_t.h  __wmmintrin_pclmul.h

There's no path looks like something/clang/<version> which also contains those header files in my system. Can this possibly the reason for this strange behavior? I have no clue why the above happens.
Feel free to ask if you need any further information :)

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

No branches or pull requests

1 participant