Update libclang setup to avoid slow starting sessions

+ Remove find from the LIBCLANG environment variable
+ Let the user run commands to set this variable up if needed, found in
the README

Change from echo to printf
This commit is contained in:
Shaun Reed 2020-06-14 12:59:32 -04:00
parent 2e3d2523f1
commit eaefbdc471
3 changed files with 6 additions and 4 deletions

View File

@ -32,4 +32,6 @@ fi
eval "$(dircolors ~/.dir_colors)"
export LS_COLORS="di=1;34:ln=31;47:so=32:pi=33:ex=1;32:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43"
# Default libclang path for libclang-10-dev
#export LIBCLANG="/usr/lib/llvm-10/lib/libclang.so.1"

6
.vimrc
View File

@ -96,9 +96,6 @@ nmap <silent> <C-j> <Plug>(ale_next_wrap)
""let g:syntastic_check_on_open = 1
""let g:syntastic_check_on_wq = 0
" Clang_complete settings
let g:clang_library_path='/usr/lib/llvm-8/lib/'
" Understand how the plugin works: :h signify-modus-operandi
" Spare the plugin some work and read: :h g:signify_vcs_list
" Signify plugin settings
@ -152,3 +149,6 @@ let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''
" Clang_complete settings
"let g:clang_library_path=$LIBCLANG

View File

@ -29,7 +29,7 @@ I use the `libclang-10-dev` package for clang completion. You can use whichever
In all cases, you will need to run the two commands below or otherwise set the path to `libclang.so.1` on your system.
```
echo "export LIBCLANG=\""$(sudo find / -name libclang.so.1)"\"" >> ~/.bash_aliases
printf "export LIBCLANG=\""$(find / -name libclang.so.1 2>/dev/null)"\"\n\n" >> .bash_aliases
echo "let g:clang_library_path=$LIBCLANG" >> ~/.vimrc
```