From 8d7f4ce210b10249e9e3b9516e3de5ef35d9f806 Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 1 Mar 2024 10:07:10 +0100 Subject: nvim: Add README.md for configuration --- nvim/README.md | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 nvim/README.md diff --git a/nvim/README.md b/nvim/README.md new file mode 100644 index 0000000..e48c283 --- /dev/null +++ b/nvim/README.md @@ -0,0 +1,91 @@ +# Neovim configuration + +This folder contains a Neovim editor configuration. + +## Structure + +The configuration consists of a main Lua configuration file `init.lua`, this +`README.md` and a `pack` folder with Neovim packages from third parties. + +``` +. +├── init.lua +├── pack +│   ├── // can be selected arbitrarily +│   │   └── start +│   │   └── // Git submodule, could be one of many in this folder +└── README.md +``` + +All packages are Git submodules and contain third party code to extend the +editor. + +## Installation + +This configuration requires the following software to be installed: + +- Neovim in a recent version +- Ripgrep +- Language Server Protocol Servers + - clangd + - pyright + - gopls + +### Neovim + +This configuration requires a recent version of Neovim and was tested with +version `v0.9.5`. If only older versions are provided by the distribution a +newer version can be installed as AppImage. + +``` +mkdir -p ~/.local/bin +curl https://github.com/neovim/neovim/releases/download/v0.9.5/nvim.appimage \ + > ~/.local/bin/nvim +chmod 755 ~/.local/bin/nvim +PATH=~/.local/bin:$PATH # add this line to shell config (e.g. .bashrc) + # to be permanent +``` + +`which` can be used to validate that the current shell uses the just downloaded +AppImage. + +``` +$ which nvim +/home//.local/bin/nvim +``` + +The Neovim version can be checked with `nvim` itself. + +``` +$ nvim --version +NVIM v0.9.5 +Build type: Release +LuaJIT 2.1.1702233742 + + System-vimrc-Datei: "$VIM/sysinit.vim" + Voreinstellung für $VIM: "/usr/share/nvim" + +Run :checkhealth for more info +``` + +### Ripgrep + +The program Ripgrep or `rg` is required for this configuration to work. It can +be installed on most Linux distributions using the package manager: + +- Arch Linux: `pacman -S ripgrep` +- Debian Linux: `apt install ripgrep` + +Ripgrep is used for the package `telescope` to search for keywords with good +performance even in huge file trees. + +### LSP Servers + +The LSP servers can be installed with the package manager too: + +- Arch Linux: `pacman -S clang pyright gopls` +- Debian Linux: `apt install clangd gopls` + +**Note for Debian**: `pyright` is not available. But the Debian package +`python3-pylsp` works too. `pyright` has to be replaced by `pylsp` in +`init.lua`. -- cgit v1.2.3-70-g09d2