This is my personalized neovim configuration.
- ctags
- fzf
- git
- LSP-servers:
- Neovim (>0.5)
- tree-sitter + grammars + tree-sitter-cli
NOTE: I have not tested these steps yet as I already have everything installed. This should work though, I'm pretty sure. I will remove this note once I had the chance to actually test.
-
Clone this repo
-
Pull the submodules by running
git submodule update --init --recursive
this will install all plugins but not the dependencies.
-
In
.local/share/nvim/site/pack/functionality/opt/telescope-fzf-native.nvim/
compiletelescope-fzf-native.nvim
by runningcmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release cmake --build build --config Release cmake --install build --prefix build
-
symlink or copy the files to their appropriate locations. All the files are located relative to
$HOME
. The directory.config/nvim
thus needs to go to$HOME/.config/nvim
.You can do this manually or use stow using
stow --ignore="readme\.md|\.git.*|tags" --target=$HOME .
from the directory in which you cloned this repo.
-
Everything should be installed and at the right place now, so open Neovim and run
:helptags ALL :mkspell ~/.config/nvim/spell/*.add
to generate the helptags (
:help :helptags
) and compile the spell file (:help :mkspell
). This will enable you to look through the help pages of the plugins make spell suggestions faster.
Before using neovim make sure you have set the environmental variable
$XDG_CACHE_HOME
.
To update the submodules run
git submodule update --remote
Using the original dark color scheme with a hard contrast.
I've also set the sign and color column to be the background color, to have a unified layout in my buffers.
- cmp
- completion sources
- Devicons to add good looking icons
- Fugitive, a Git wrapper
- Goyo for distraction-less writing
- Gruvbox-Material
- Gutentags for improved tags support, like automatically incrementally (re)generating appropriate tag files.
- LSP:
- Lualine as my statusline
- Signify adds vcs signs to signcoloumn
- snap a fast finder system, I use for file navigation.
- snippy for snippets
- Tabular to align text like markdown tables
- tree-sitter for tree-sitter support
- Vimball (built-in) to create, extract and list the contents of vimball archives
- VimTeX for the best LaTeX experience there is. See below how I set up my LaTeX workflow.
<leader>
is mapped to the space key- small plugin to strip trailing whitespace on
<leader>x
- quicker saving on
<leader>w
- yanking to the system clipboard using
<C-c>
in normal and visual mode - quickly move between splits by replacing the
<C-W>
with just<Ctl>
Tree-sitter is a parser generator tool and an incremental parsing library. It allows you to do anything you want with the generated parsing tree, such as enhanced syntax highlighting but also refactoring into a function. Go check it out!
The Language Server Protocol (LSP) is used for communication between editors and language servers, which may provide a lot of functionality like auto complete items, go to definition, find all references and more. It's awesome and brings IDE-like code-editing to any texteditor supporting the protocol, as Neovim does. Go check it out!
Snippets are small pieces of code that can be inserted using a key combination. One might, for example, define a snippet
\begin{align*}
#
\end{align*}
(where #
is the cursor position after inserting the snippet) which gets
expanded using the key combination align<Tab>
. This makes writing LaTeX and
other code much faster as you can shorten everything that you type often down to
a few keystrokes.
I highly recommend writing your own snippets as to not lose track of the snippets and to more easily remember what capabilities are implemented in your setup, but feel free to get inspired by mine.
LaTeX writing can be cumbersome. This is my attempt to make it a lot better!
VimTeX is the best plugin to write LaTeX in Vim that I have found to this day.
It is highly configurable but adds very sane defaults, which I also mostly use
(see :help vimtex-default-mappings
).
I use it for the very good syntax highlighting it brings, for compiling my document asynchronously using latexmk, to open that compiled document in my preferred pdf-viewer Zathura, also enabling forward search, and for its provided text objects to navigate the LaTeX structure better. Go check it out!
I'm also trying out the texlab language server (see LSP), which might at one point replace vimtex.
I also use snippets to write my LaTeX code. As I have written my documents I
have incrementally added new snippets and updated existing ones the way I see
fits me best. This has drastically increased speed and decreased resistance
writing LaTeX documents! Feel free to check out my own snippets at
.config/nvim/snippets/tex/*
to get inspired and guide you in how to write your
own snippets! Also, if you are using snippy, read the documentation (:help snippy
)
- configure statusline
- add word count to statusbar in markdown and text documents
- test installation steps
- add LanguageTool support
- possibly with yalafi integration to strip away latex
- vimtex: vlty
- make java jdtls work again.
- unify jdtls and regular lsp config, or at least extract the mappings
- work on the jdtls setup - do we need to specify a workspace?
- fix workspace as it's currently generated as
$HOME/Documents/workspace$PROJECTNAME
and not as directory underworkspace/
- fix workspace as it's currently generated as
- replace vimtex with LSP?
- add (LSP) mappings to readme
- check out
:h fo-table