diff --git a/.bash_aliases b/.bash_aliases index 4412db1..e98ead3 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -18,5 +18,4 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo export EDITOR="vim" export VISUAL="vim" 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" -export LIBCLANG=$(find / -name libclang.so.1 2>/dev/null) diff --git a/.vimrc b/.vimrc index 5af9fda..434092f 100644 --- a/.vimrc +++ b/.vimrc @@ -89,9 +89,6 @@ highlight ALEError ctermfg=DarkRed nmap (ale_previous_wrap) nmap (ale_next_wrap) -" Clang_complete settings -let g:clang_library_path = $LIBCLANG - " Colorizer plugin settings " See :h colorizer in Vim for more info @@ -136,3 +133,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 + diff --git a/README.md b/README.md index 06c6e18..6ee707e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,13 @@ cd /path/to/dot/ stow -t ~ . ``` -I use the `libclang-10-dev` package for clang completion. You can use whichever version you want, as the `.vimrc` configuration hosted here uses an environment variable `$LIBCLANG` which is set using the output of `sudo find / -name libclang.so.1`. To use the same version as I do, simply run `sudo apt install libclang-10-dev` +I use the `libclang-10-dev` package for clang completion. You can use whichever version you want, but to use the same version as I do, run the following commands. + +```bash +sudo apt install libclang-10-dev +printf "export LIBCLANG=\""$(find / -name libclang.so.1 2>/dev/null)"\"\n\n" >> .bash_aliases +echo "let g:clang_library_path=$LIBCLANG" >> ~/.vimrc +``` `stow --adopt .` can be used to install conflicting files, but doing so will result in the loss of your local configurations. If you want to keep them, back up the conflicting files output in the error message before running this command.