Compiler vlty: support LanguageTool as installed by pacman#1821
Compiler vlty: support LanguageTool as installed by pacman#1821matze-dd wants to merge 5 commits intolervag:masterfrom matze-dd:master
Conversation
compiler/vlty.vim
Outdated
| let &l:makeprg = | ||
| \ s:python . ' -m yalafi.shell' | ||
| \ . ' --lt-directory ' . s:vlty.lt_directory | ||
| \ . ' --lt-command "' . s:vlty.lt_command . '"' |
There was a problem hiding this comment.
Does it make sense to always supply the --lt-command option, or should this only be supplied if lt_command is available?
There was a problem hiding this comment.
Yes, this is just the version with the least key strokes. I will change that.
|
|
||
| lt_directory~ | ||
| Path to the `LanguageTool` software. | ||
| lt_command~ |
There was a problem hiding this comment.
I like it better if there's an empty line between the descriptions. Also, I'm curious if lt_command perhaps should be the first entry here?
There was a problem hiding this comment.
I like it better if there's an empty line between the descriptions.
OK, I will insert a blank line.
Also, I'm curious if lt_command perhaps should be the first entry here?
Don't know, which key is more important. But I assume that most people will install LanguageTool "manually".
doc/vimtex.txt
Outdated
| instance the file `languagetool-server.jar`. A separated `:compiler vlty` will | ||
| raise an error message, if some component cannot be found. | ||
| instance the file `languagetool-server.jar`. | ||
| If `LanguageTool` has been installed via a packet manager as given above, |
There was a problem hiding this comment.
I prefer the paragraphs to be full "blocks" of text, so move If ... back to the previous line. If you meant to start a new paragraph, then add an empty line.
compiler/vlty.vim
Outdated
| finish | ||
| endif | ||
| else | ||
| if !filereadable(fnamemodify(s:vlty.lt_directory |
There was a problem hiding this comment.
I think it is better to use elseif here.
There was a problem hiding this comment.
My first version was this way, and it is in fact synonymous here. But then, I thought the current code would be more readable. I will change that back.
Great, thanks! I appreciate the update, I only had a few minor comments! |
My thanks go back for your great project :) I will incorporate the changes and make a new comment afterwards. |
|
The changes are included. Only for the order of lt_directory and lt_command, things are kept. I think, most people will use the manual LanguageTool installation, although this is only a guess. |
|
Thanks! I merging this now. |
Seems sensible. Again, thanks! :) |
|
Thank you for merging and the final adjustments! These are all improvements. |
|
My pleasure :) |
This PR addresses an issue raised in the discussion of vlty. Under Arch Linux, one now can use LanguageTool as installed with
The minimal vimrc is given in the documentation.
This requires YaLafi version 1.1.5. It has been uploaded to PyPI, such that it is available via pip.