A command-line utility that displays files with Neovim's syntax highlighting in the terminal.
nvcat
(En-vee-cat) is a CLI tool similar to Unix's cat
but with syntax highlighting powered by Neovim's syntax and treesitter engines. It leverages Neovim's capabilities to provide accurate syntax highlighting for a wide range of file formats directly in your terminal.
- Syntax highlighting using Neovim's highlighting engine
- Support for treesitter-based highlighting
- Optional line numbers
- Can use your existing Neovim configuration or run with a clean instance
Prequisites:
- Neovim 0.10+ (must be accessible via
nvim
) - A terminal that supports true color
See the releases page for prebuilt binaries for Linux, macOS, and Windows.
go install github.com/brianhuster/nvimcat@latest
Or clone and build manually:
git clone https://github.com/brianhuster/nvcat.git
cd nvcat
sudo make install
nvcat [options] <file>
Run nvcat -h
for more information.
Nvcat configuration is basically the same as Neovim's configuration, you can put it in $XDG_CONFIG_HOME/nvim/init.lua
or $XDG_CONFIG_HOME/nvim/init.vim
. Unlike Neovim configuration, Nvcat configuration is always loaded by Nvcat no matter if you use flag -clean
or not.
nvcat
only supports legacy and Treesitter-based syntax highlighting engines. It does not support LSP-based highlighting.nvcat
doesn't change background colors, so you should use a color scheme that has a background color similar to your terminal's
Apache License 2.0 - See LICENSE for details.