Config files for my *NIX systems.
There are some other configuration steps that must be taken manually, depending on the platform.
To switch <ESC>
and <CAPS-LOCK>
, the method depends on the platform:
- Linux-based (GNOME): install
gnome-tweaks
(sudo apt install gnomre-tweaks
) and use the menu, it's an option in there. - MacOS: Use
karabiner
, install it throughbrew
+ the provided dotfiles.
For now the configuration files are managed using GNU Stow
To use stow
, first install it with the distro's package manager:
sudo apt install stow
Then to "install" each configuration, simply run:
stow <app>
This contains some general settings for the environment that I want shared across systems. Note that this assumes that the system is *NIX (i.e: Linux, macOS or WSL).
This contains a .system-env.sh
file with some environment variables that are
used to configure some of the basic tools that are assumed to be installed as part
of the base installation (meaning, tools that I always want to be there, some of them
may not be in some systems by default and require some installation).
The environment loaders should also be configured to automatically load a .system-env-specific.sh
file which contains system specific configurations, which could also
contain overrides to shared configurations.
Setting up the zsh
shell depends on the platform.
On MacOS it should be the default, so you can skip this section.
To setup the zsh
shell, you first need to install it.
It should be in all the package managers:
sudo apt install zsh
The setup is mostly done using Oh My Zsh
.
The setup is done through a provided remote script:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
For my current uses of Neovim, it's better to use the latest version possible.
For that we either need a package manager that supports following HEAD
or manually
manage it through the repository.
The simplest version is to use Homebrew, which supports this kind of use out of the box:
brew install neovim --HEAD
Else, we need some manual steps:
First download the neovim source code from the git repository:
git clone https://github.com/neovim/neovim
Create a target folder for the local installation.
By default I use ~/neovim
as the target.
mkdir ~/neovim
The next step is actually building the source. First you need to make sure to install the build requirements. They are described here, but for Debian based systems (Debian, Ubuntu, PopOS, etc.):
sudo apt-get install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip curl doxygen
Now, setup the target for installation and start building (for more information, see this):
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$HOME/neovim" CMAKE_BUILD_TYPE=Release -j4
make install
And now, the nvim
binary is created at: ~/neovim/bin/nvim
.
You need to make sure it's available in the PATH
.
For this, you can either add this path directly to it, or more cleanly add
a symlink to a more standard bin directory:
ln -s ~/neovim/bin/nvim ~/.local/bin/nvim
Now we have the binary ready to be used. However, the current state of the configuration makes it so that neovim is not really usable without some extra steps.
After the installation of the nvim
binary, you need to install the Plug
plugin manager
and install the right plugins for it to work correctly.
Plug.vim This is the package manager. This is the main applications that we need to install manually, and then this will handle the rest.
To install it, just download the source and put it in the autoload
folder:
curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Plugins
Once Plug.vim
is set up, just run :PlugInstall
inside a nvim
instance and
everything should be mostly setup:
nvim -c PlugInstall
There are still a couple of extra additions that are nice to have:
TODO
This is C FFI extension for the lua implementation fzy
algorithm for faster
searching (used by Telescope
) which speeds up the fuzzy searching.
To install this:
git clone https://github.com/romgrk/fzy-lua-native
cd fzy-lua-native
make
This will create a compiled binary on static/<output>
(output depends on the platform).
You can now install it by copying it to /usr/local/lib
:
sudo cp static/libfzy-linux-x86_64.so /usr/local/lib/
sudo ldconfig
And it should be ready to go (I have not checked yet though).
The pretty icons for the LSP are provided by the lspkind plugin.
To show the icons, you need to install VSCode codeicon
font and setup your shell to use that font for non-ASCI glyphs.
To fully install tmux
and tmuxinator
, you need to install first the Tmux Plugin Manager
(TPM).
To do it, you just need to download the repository inside the ~/.tmux/plugins/tpm
directory:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
The rest is handled by the configuration.
The first time you open tmux
(and any time you install a new plugin), you need
to actually run the installtion of the plugins.
For that just run prefix + I
.
NOTE that this looks like it's doing nothing, but after a couple of seconds it should report something.