Skip to content

horriblename/nixrun-nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nix run for your treesitter grammars and arbitrary plugins

Provides commands to easily install treesitter grammars and plugins temporarily.

Note

Check out the v2 branch

Setup

put this in your init.lua

require('nixrun').setup({})

Usage

These commands are provided

NixRunTSGrammar # installs a treesitter parser
NixRunPlugin    # installs a vim plugin
  • Treesitter parsers are taken from nixpkgs#vimPlugins.nvim-treesitter.builtGrammars

  • Plugins are taken from nixpkgs#vimPlugins, or a custom flake: yourFlake#some-plugin, or a flakeref URL: github:t-troebst/perfanno.nvim

  • Tab completion is available for the simple nixpkgs parsers/plugins

Example

" Installing treesitter grammars:
NixRunTSGrammar java    " please reload your buffer after install to use the treesitter grammar

" Installing a plugin
NixRunPlugin oil-nvim   " installs nixpkgs#vimPlugins.oil-nvim + dependencies
NixRunPlugin custom-flake#custom-plugin       " installs a custom packaged plugin
NixRunPlugin github:t-troebst/perfanno.nvim   " pull the plugin source from github (not a nix package)

Note

  • I recommend you pin your nixpkgs registry by adding this to your NixOS/home-manager config (mismatched neovim and grammar versions might cause unexpected errors):
    nix.registry.nixpkgs.flake = inputs.nixpkgs;