summarylogtreecommitdiffstats
path: root/languagetool.patch
blob: 60fe4c403543928d744a79d0a41a9e284cd5b8de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- plugin/LanguageTool.vim.orig	2016-02-02 14:30:03.889339778 +0100
+++ plugin/LanguageTool.vim	2016-02-02 14:31:03.478880279 +0100
@@ -163,22 +163,6 @@
     endif
   endif
 
-  let s:languagetool_jar = exists("g:languagetool_jar")
-  \ ? g:languagetool_jar
-  \ : $HOME . '/languagetool/languagetool-commandline.jar'
-
-  if !filereadable(s:languagetool_jar)
-    " Hmmm, can't find the jar file.  Try again with expand() in case user
-    " set it up as: let g:languagetool_jar = '$HOME/languagetool-commandline.jar'
-    let l:languagetool_jar = expand(s:languagetool_jar)
-    if !filereadable(expand(l:languagetool_jar))
-      echomsg "LanguageTool cannot be found at: " . s:languagetool_jar
-      echomsg "You need to install LanguageTool and/or set up g:languagetool_jar"
-      echomsg "to indicate the location of the languagetool-commandline.jar file."
-      return -1
-    endif
-    let s:languagetool_jar = l:languagetool_jar
-  endif
   return 0
 endfunction
 
@@ -242,8 +226,7 @@
   let l:range = a:line1 . ',' . a:line2
   silent exe l:range . 'w!' . l:tmpfilename
 
-  let l:languagetool_cmd = 'java'
-  \ . ' -jar '  . s:languagetool_jar
+  let l:languagetool_cmd = 'languagetool'
   \ . ' -c '    . s:languagetool_encoding
   \ . (empty(s:languagetool_disable_rules) ? '' : ' -d '.s:languagetool_disable_rules)
   \ . ' -l '    . s:languagetool_lang