# Ensure that at least `curl` and `git` are installed
# `vim` is recommended
curl https://raw.githubusercontent.com/LuzianHahn/dotfiles/debian/.local/installer/dotfile_installer.sh | bash
# on work machines for alternative git authorship use
curl https://raw.githubusercontent.com/LuzianHahn/dotfiles/debian/.local/installer/dotfile_installer.sh | AUTHOR=work bash
# e.g. on alpine systems, `bash` is not included. Use `sh` in this case.
# curl https://raw.githubusercontent.com/LuzianHahn/dotfiles/debian/.local/installer/dotfile_installer.sh | sh
# Quick-Setup for LSP-Servers and programming language setups
# -i is necessary, as this scripts sources the ~/.bashrc file, which only works in interactive shells.
bash -i $HOME/.local/installer/extra_installer.sh
For a comprehensive script, see also
installer/extra_installer.sh
Right now the vim setup here works with different Servers, which implement the LSP (Language Server Protocol).
In order to receive features in vim like OpenDocumentation
or GoToDefinition
,
one needs to install the respective servers.
I listed how to do this for the languages I typically use:
This is ordinary achieved via rust-analyzer
. One can find a detailed documentation here.
In theory it should be enough to call rustup component add rust-src
I am currently using jedi-language-server
for this, which is a python package, which comes with an own entrypoint.
As I don't want to install this package for every python project I have, I am using my global uv
-virtualenv for this.
It is intended for user specific python packages.
Therefore it is necessary to have uv
set up before installing jedi-language-server
.
See here for this.
Afterwards one needs to create the global uv
-virtualenv. The easiest way is to call . $HOME/.bashrc
.
Now one needs to install jedi-language-server
via uv pip install jedi-language-server
.
Finally to circumvent the problem of the global uv
-virtualenv's binaries colliding,
one needs to create a link to the respective jedi-language-server
-binary via:
ln -sf $HOME/.local/lib/uv_base/bin/jedi-language-server $HOME/.local/bin/
.
- If you encounter the following error after opening a
*.py
-buffer:Error: jedi-vim failed to initialize Python: jedi-vim requires Vim with support for Python 3.
Your current version of vim does not come with python support. (You can check this with
:version
and looking for+python3
. If onlypython3-
is present, your vim version lacks support)- On debian you can install instead
vim-nox
viaapt
, which should provided+python3
support. - On MacOS you need to install
vim
viabrew install vim
. It might be necessary to override$PATH
here sincevim
is already present per default, butbrew
locates its installed version different from the base version ofvim
- On debian you can install instead
- I want to read
:help
-entries invim
, but the system claimsE149: Sorry, no help for <entryX>
. Apparently one needs to generate the helptags once on the respective system. See also https://stackoverflow.com/a/22355979. So just callvim -c "helptags <Path-to-doc-folder-in-extension>
.easiest solution would be
- After syncronizing a device with this repository, I receive errors, when opening vim like:
This means that the respective plugins in vim have not been installed properly yet. One can do so by calling:
Fehler beim Ausführen von "/home/XXX/.vimrc": Zeile 63: E31: Kein Mapping gefunden Zeile 64: E31: Kein Mapping gefunden Betätigen Sie die EINGABETASTE oder geben Sie einen Befehl ein
cfg submodule update --init --recursive
- If your installed vim version is
<9
you cannot usecoc-nvim
. Sometimes it can be a hustle to obtain such a version e.g. on debian < 12 or ubuntu LTS < 24. A potential solution here lies in two options:-
Using an appimage version of
vim
from here. Just download the appimage into$HOME/.local/lib/vim-appimage/
(after creating this directory) and link it via:ln -s $HOME/.local/lib/vim-appimage/gvim.appimage $HOME/.local/bin/vim
Unfortunately this version suffers from a small start-up delay, which might be annoying. Worse than this, on systems, where you don't have and cannot provide a fusermount utility (e.g. when this error occurs:
Error: No suitable fusermount binary found on the $PATH
), this solution is not an option. -
Compile vim from scratch:
cd $HOME/.local/lib/ git clone https://github.com/vim/vim.git --depth 1 cd vim/src/ # In case there is no `python3-config` (e.g. on a slurm cluster), consider activating a python3 module there. # Otherwise install a python3 version via your package manager. ./configure --with-features=huge \ --enable-multibyte \ --enable-python3interp=yes \ --with-python3-config-dir=$(python3-config --configdir) \ --enable-perlinterp=yes \ --enable-gui=gtk2 \ --enable-cscope \ --prefix=$HOME/.local/ make && make install
-
- I don't get ALE in combination with jedi-language-server properly to work. Most of the times it seems to work, but then seem situations don't work at all:
- e.g.
from pkg import
-statements are not autocompleted. It is not even possible to autocompletefrom pkg
. - when running e.g.
import pkg.
-completions, this works only if I don't enter a first letter here (e.g.import pathlib.P
forPath
) click
-completions are not working at all-
Seems like this is a general issue of completing modules. It is possible to use GoTo into these modules, when the venv is activated.
- e.g.
trying to use coc-nvim as completion library. seems to work much better than ALE.
- my venv has to be active to recognized respective third-party modules
- need to learn more about all the different commands