dotfiles/vim
Dionisio E Alonso 8f7134b3bb feat(Neovim/Vim): Add context plugins for both editors
Added context plugins that keep block-starting lines at the top of the
editing window, to have some context of where is located the code one is
editing.
2024-04-16 16:05:57 -03:00
..
pack feat(Neovim/Vim): Add context plugins for both editors 2024-04-16 16:05:57 -03:00
README.rst feat: Move Neovim/Vim specific docs to their own README 2022-08-07 18:25:34 -03:00
coc-settings.json feat(Vim): Update diagnostics icons for CoC 2024-01-22 15:32:04 -03:00
gvimrc Add default font for GVim GTK versions in gvimrc 2018-10-03 17:19:28 -03:00
lsp.vim feat(Vim): Change LSP for Python in CoC 2024-01-22 15:56:09 -03:00
neovim.vim feat(Vim): Group all Neovim's defaults in a separate module 2024-04-04 23:07:56 -03:00
vimrc feat(Neovim/Vim): Add context plugins for both editors 2024-04-16 16:05:57 -03:00

README.rst

Tuning up Neovim/Vim

Neovim - Vim compatibility

The idea is to keep both projects set up to behave, as close as possible, one like the other. Sometimes that requires translating from Lua to Vimscript, and viceversa, in order to use the best possible solution for each editor.

Furthermore, when possible the same plugin is used for both editors. But sometimes it is necessary to use different solutions; that being either because one of the editors is not capable of achieving the pretended behavior, or because Neovim (being a more modern project) can achieve the expected behavior in a better way.

Fonts with icon glyphs

Some glyphs (icons) on Neovim/Vim might appear to be missing or broken!!! You may need to use a patched font with the NerdFonts project.

Neovim/Vim config here has some automatic code completion. Instead of using words or letters for representing the different kind of completion items, this config uses nice icons like popular IDEs to give some familiar look.

Easy fix

Choose your favourite programming font (already patched) from NerdFonts, install it on your system and set it as your terminal profile font.

Easier fix, yet (GNU/Linux only)

Just download from NerdFonts the Symbols Only variant (NerdFontsSymbolsOnly) and decompress it on your HOME in ~/.local/share/fonts/; then run fc-cache -frv to cache the new glyphs and restart your terminal (or app).

If you still have some mismatched symbols on your system, you can prioritize the whole font Symbols Nerd Font Mono by symlinking fontconfig/fonts.conf into ~/.config/fontconfig/ provided in this repo.

(Alternatively)

You may prefer not to have symbols at all. In that case, you have to:

  1. In nvim/lsp_client_settings.vim file comment-out/delete:
    • the entry line formatting = { format = cmp_format }
    • the 4 diagnostics lines starting with: sign define DiagnosticSign
  2. In vim/coc-settings.json delete the entry suggest.completionItemKindLabels.

Not so easy fix: Patch your own font

Install FontForge, for instance, on a Debian-based distro you can install this: :

$ sudo apt install python3-fontforge

Clone NerdFonts repository and inside that directory run the following commands (This example assumes you are patching Iosevka font, but you can patch one of your choice): :

./nerd-fonts$ ls -u ~/.local/share/fonts/Iosevka/v15.6.2/ttf-unhinted/iosevka-curly-slab-{regular,bold,italic,bolditalic,extended{,bold,italic,bolditalic}}.ttf |
                  while read file
                  do
                      fontforge -script ./font-patcher -c -out=$HOME/.local/share/fonts/"Iosevka Nerd Font"/ -ext=otf $file
                  done

For other uses of the font-patcher tool you can read the official documentation.

Optional: (some requirements)

For using Vim with coc.nvim plugin, or even some of the Neovim's native LSP servers, you need to install Node+npm. You can provide that on your system or, if you don't have administrative permissions, follow CoC's wiki instructions for requirements: :

$ curl -sL install-node.now.sh/lts | bash -s -- --prefix ~/.local

~ Made with ❤️ and 🧉 ~