-
-
Save MatthewCroughan/37ff1bbd3c06d379793c9c855ae96b19 to your computer and use it in GitHub Desktop.
Syntax highlighting for vim in a single file that can be imported.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following documents helped me understand this | |
# https://github.com/NixOS/nixpkgs/blob/ca4e26d1e662231d33831651c2e2ed83b1442cb7/doc/languages-frameworks/vim.section.md#managing-plugins-with-vim-plug | |
# https://nicknovitski.com/vim-nix-syntax | |
# name = "vim" makes the name of the executable 'vim'. If I set it to 'myVim' | |
# then I will have to run 'myVim' on the cli to access this custom version of | |
# Vim which is being created by vim_configurable.customize | |
{ config, pkgs, ... }: | |
{ | |
nixpkgs.config.vim.ftNix = false; | |
environment.systemPackages = with pkgs; [ | |
(vim_configurable.customize { | |
vimrcConfig.customRC = '' | |
syntax=on | |
set mouse-=a | |
''; | |
name = "vim"; | |
vimrcConfig.packages.vim = | |
with pkgs.vimPlugins; { | |
start = [ vim-nix ]; | |
}; | |
} | |
) | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment