git.iko.soy/typeable/nixpkgs
on master help sign in
vimPlugins.vim-grammarous: set languagetool path

Otherwise it try to install languagetool into nix store

commit2c705048927a893962e975eac77100107591fa1e authorJoerg Thalheim <joerg@thalheim.io> dateTue 21 Nov 2017, 16:40 (9 years ago) parent7374650
3 files changed+33−1
pkgs/misc/vim-plugins/default.nix+12−1 pkgs/misc/vim-plugins/patches/vim-grammarous/set_default_languagetool.patch+11 pkgs/misc/vim-plugins/vim2nix/additional-nix-code/vim-grammarous+10
pkgs/misc/vim-plugins/default.nix+12−1
@@ -5,6 +5,8 @@
55, python3, boost, icu
66, ycmd, makeWrapper, rake
77, pythonPackages, python3Packages
8+, substituteAll
9+, languagetool
810, Cocoa ? null, git
911}:
1012
@@ -1405,7 +1407,16 @@ rec {
14051407 sha256 = "1mm8hd39q2sl4hi83c4zvrl27a8djr1pv35ch0pivg84ad9p7qq5";
14061408 };
14071409 dependencies = [];
1408−
1410+ # use `:GrammarousCheck` to initialize checking
1411+ # In neovim, you also want to use set
1412+ # let g:grammarous#show_first_error = 1
1413+ # see https://github.com/rhysd/vim-grammarous/issues/39
1414+ patches = [
1415+ (substituteAll {
1416+ src = ./patches/vim-grammarous/set_default_languagetool.patch;
1417+ inherit languagetool;
1418+ })
1419+ ];
14091420 };
14101421
14111422 vim-puppet = buildVimPluginFrom2Nix { # created by nix#NixDerivation
pkgs/misc/vim-plugins/patches/vim-grammarous/set_default_languagetool.patchnew file+11
@@ -0,0 +1,11 @@
1+--- vim-grammarous-51ef519.org/autoload/grammarous.vim 1970-01-01 01:00:01.000000000 +0100
2++++ vim-grammarous-51ef519/autoload/grammarous.vim 2017-11-21 16:33:27.473403322 +0000
3+@@ -22,7 +22,7 @@
4+ let g:grammarous#enable_spell_check = get(g:, 'grammarous#enable_spell_check', 0)
5+ let g:grammarous#move_to_first_error = get(g:, 'grammarous#move_to_first_error', 1)
6+ let g:grammarous#hooks = get(g:, 'grammarous#hooks', {})
7+-let g:grammarous#languagetool_cmd = get(g:, 'grammarous#languagetool_cmd', '')
8++let g:grammarous#languagetool_cmd = get(g:, 'grammarous#languagetool_cmd', '@languagetool@/bin/languagetool-commandline')
9+ let g:grammarous#show_first_error = get(g:, 'grammarous#show_first_error', 0)
10+
11+ highlight default link GrammarousError SpellBad
pkgs/misc/vim-plugins/vim2nix/additional-nix-code/vim-grammarousnew file+10
@@ -0,0 +1,10 @@
1+ # use `:GrammarousCheck` to initialize checking
2+ # In neovim, you also want to use set
3+ # let g:grammarous#show_first_error = 1
4+ # see https://github.com/rhysd/vim-grammarous/issues/39
5+ patches = [
6+ (substituteAll {
7+ src = ./patches/vim-grammarous/set_default_languagetool.patch;
8+ inherit languagetool;
9+ })
10+ ];