tv vim: split plugins into base and extra

This commit is contained in:
tv 2023-01-15 01:50:04 +01:00
parent 983b993e4c
commit 2c05d17476
2 changed files with 21 additions and 17 deletions

View File

@ -11,18 +11,31 @@ with import ./lib;
environment.variables.VIMINIT = ":so /etc/vimrc"; environment.variables.VIMINIT = ":so /etc/vimrc";
}; };
extra-runtimepath = pkgs.tv.vim.makeRuntimePath [ base-plugins = [
pkgs.tv.vimPlugins.elixir
pkgs.tv.vimPlugins.file-line pkgs.tv.vimPlugins.file-line
pkgs.tv.vimPlugins.fzf
pkgs.tv.vimPlugins.hack pkgs.tv.vimPlugins.hack
pkgs.vimPlugins.undotree
(pkgs.tv.vim.makePlugin (pkgs.write "vim-tv-base" {
"/ftplugin/haskell.vim".text = ''
if exists("g:vim_tv_ftplugin_haskell_loaded")
finish
endif
let g:vim_tv_ftplugin_haskell_loaded = 1
setlocal iskeyword+='
'';
}))
];
extra-plugins = [
pkgs.tv.vimPlugins.elixir
pkgs.tv.vimPlugins.fzf
pkgs.tv.vimPlugins.jq pkgs.tv.vimPlugins.jq
pkgs.tv.vimPlugins.nix pkgs.tv.vimPlugins.nix
pkgs.tv.vimPlugins.showsyntax pkgs.tv.vimPlugins.showsyntax
pkgs.tv.vimPlugins.tv pkgs.tv.vimPlugins.tv
pkgs.tv.vimPlugins.vim pkgs.tv.vimPlugins.vim
pkgs.vimPlugins.fzfWrapper pkgs.vimPlugins.fzfWrapper
pkgs.vimPlugins.undotree
pkgs.vimPlugins.vim-nftables pkgs.vimPlugins.vim-nftables
]; ];
@ -71,7 +84,7 @@ with import ./lib;
set mouse=a set mouse=a
set noruler set noruler
set pastetoggle=<INS> set pastetoggle=<INS>
set runtimepath=${extra-runtimepath},$VIMRUNTIME set runtimepath=${pkgs.tv.vim.makeRuntimePath base-plugins},$VIMRUNTIME
set shortmess+=I set shortmess+=I
set showcmd set showcmd
set showmatch set showmatch
@ -88,13 +101,15 @@ with import ./lib;
set wildmenu set wildmenu
set wildmode=longest,full set wildmode=longest,full
set runtimepath^=${pkgs.tv.vim.makeRuntimePath extra-plugins}
syntax on
set et ts=2 sts=2 sw=2 set et ts=2 sts=2 sw=2
filetype plugin indent on filetype plugin indent on
set t_Co=256 set t_Co=256
colorscheme hack colorscheme hack
syntax on
au Syntax * syn match Garbage containedin=ALL /\s\+$/ au Syntax * syn match Garbage containedin=ALL /\s\+$/
\ | syn match TabStop containedin=ALL /\t\+/ \ | syn match TabStop containedin=ALL /\t\+/

View File

@ -1,17 +1,6 @@
{ pkgs }: { pkgs }:
pkgs.tv.vim.makePlugin (pkgs.write "vim-tv" { pkgs.tv.vim.makePlugin (pkgs.write "vim-tv" {
#
# Haskell
#
"/ftplugin/haskell.vim".text = ''
if exists("g:vim_tv_ftplugin_haskell_loaded")
finish
endif
let g:vim_tv_ftplugin_haskell_loaded = 1
setlocal iskeyword+='
'';
# #
# TODO # TODO
# #