From 2e3d2523f1d85f22d3e4bd6ab0284efa39b9a0bf Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Thu, 11 Jun 2020 14:52:57 -0400 Subject: [PATCH 1/2] Update README for more detailed instructions Add recommendation to headless branch for first-time setup + This branch provides the terminal tweaks I use + Does not modify desktop environment or window manager settings Add an explanation for setting up clang_completion as it can sometimes require some tweaking. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index d2d61a1..d228631 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ A place for backing up my dotfiles. Be sure to clone recursively if you want to grab updated plugins / submodules included. For example, using Pathogen with Vim to manage plugins requires that the plugin to be installed are cloned to the `~/.vim/bundle/` directory. Cloning recursively allows git to clone these same nested repositories/submodules within this directory so Pathogen can handle running the Vim plugins. +It is recommended for the most simple setup to use the `headless` branch, as it is very lightly modified and intended to only change terminal configurations for various packages. Everything there should work out of the box following the README instructions, whereas a more custom branch like this one may require some tweaking to fit your local system modifications. + These configs were created and tested on Lubuntu using i3-gaps, and should only be used on similar systems. This is intentionally a very light configuration created for a Toshiba 2 Chromebook running an Intel Dual Core N2840 2.16GHz with 2GB of RAM. I find it to be very usable as a daily driver when booting from a persistent USB created with [Universal USB Installer](https://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/), after booting you can expect to be using ~300MB of RAM. This leaves plenty of RAM available to browse the web, run IDEs and view PDFs or work on other documents in LibreOffice. Media keys work for backlight, volume, and yakuake drop-down toggle. Alt is mod key within i3-gaps @@ -22,6 +24,15 @@ cd /path/to/dot/ stow -t ~ . ``` +I use the `libclang-10-dev` package for clang completion. You can use whichever version you want, but be sure to set your path accordingly. To use the same version as I do, run `sudo apt install libclang-10-dev` + +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 +echo "let g:clang_library_path=$LIBCLANG" >> ~/.vimrc +``` + Note that the `dot/packages/` directory is for reference and is the only directory included not meant to be used with stow. If this directory is stowed there will be no real change to the system - you will still need to install the package lists manually. `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. From eaefbdc471435446754e219a03a747094650f85b Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sun, 14 Jun 2020 12:59:32 -0400 Subject: [PATCH 2/2] 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 --- .bash_aliases | 2 ++ .vimrc | 6 +++--- README.md | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index 16bcb1c..6775f19 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -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" diff --git a/.vimrc b/.vimrc index 27cfa95..3a81ce7 100644 --- a/.vimrc +++ b/.vimrc @@ -96,9 +96,6 @@ nmap (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 + diff --git a/README.md b/README.md index d228631..74ef638 100644 --- a/README.md +++ b/README.md @@ -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 ```