Skip to content

Neovim config for Termux and typesetting LaTeX documents

Notifications You must be signed in to change notification settings

steguiosaur/nvole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nvole Vole in suit

⚙️ Features

  • Compatible configuration for Termux (Android terminal emulator)
  • Edit LaTeX files with the help of VimTex and Zathura document viewer
  • Custom LaTeX snippets for quick math mode
  • Code completion on Python, C, C++, LaTeX, etc. using nvim-cmp
  • Language servers, Linters, Formatters, Debuggers, Build Tools
    • ls:clangd lint:clang-tidy format:clang-format debug:gdb build:cmake for C and C++
    • ls:texlab & ltex-ls format:latexindent for typesetting LaTeX
    • ls:rust-analyzer build:cargo for Rust
    • ls:pyright format:black for Python
    • ls:jdtls build:gradle for Java
    • ls:zls for Zig
    • Et al.
  • Web development setup

Neovim with LaTeX

🛠️ Setup

Installation

To get started, install the following packages:

Debian based distribution

sudo apt install git neovim ripgrep nodejs

Arch based distribution

sudo pacman -S git neovim ripgrep nodejs

Clone the repository to $HOME/.config/nvim:

create backup of your config before installing

git clone https://github.com/steguiosaur/nvole.git ~/.config/nvim

Install plugins by running nvim in the terminal. It will automatically install the package manager on initial startup. Type Lazy install in command mode to install plugins. Restore repository default version of plugins with Lazy restore.

Plugins listed at ~/.config/nvim/lua/nvole/plugins/ folder.

:Lazy restore

Language Server Installation

This config uses nvim-lspconfig to manage language server protocol. To install language servers, type :Mason in command mode and look for the language server that suits your needs.

There will be several language servers which automatically install. Go to ~/.config/nvim/lua/nvole/plugins/mason.lua to view the listed servers.

Add new servers in ~/.config/nvim/lua/nvole/plugins/lspconfig.lua.

🔩 Troubleshoot

Mason ERROR Log: Current platform is unsupported in Termux

The config does not guarantee several Language Server or other tooling to work on ARM 64 architecture. Manual server installation is sometimes needed to make the LSP work. We'll take clangd and rust-analyzer as an example:

  • Install clangd using node package manager (requires nodejs): npm i -g clangd
  • Install rust-analyzer using the built-in package manager: sudo apt install rust-analyzer

In some cases, the executable is not available on any package managers. The alternative option for this is to clone the language server repository and compile the said server before adding it to $PATH.

latexindent formatter not working

Install libxcrypt-compat using the package manager. Termux compatibility not verified.