GithubHelp home page GithubHelp logo

languagetool.nvim's Introduction

Hey there !

I am Thomas, a CS student mainly interested in software security, low-level programming, and programing language theory !

As a low-level enthusiast, I tend to like minimalistic tools, and I happen to have a Gopher hole open at vigoux.giize.com, so grab your favorite gopher browser, and come to the dark side ! I happen to maintain some things on a self hosted git server too, which is over at vigoux.giize.com.

My neovim config is available here

Wanna chat ?

You can send me an email if you want to ask anything private, or in a secure manner.

Otherwise if you want to chat, I usually hang around my personnal channel ##vigoux_lair on libera.chat

I am almost always connected on nvim-treesitter's Zulip.

I am also hanging around in the #neovim:matrix.org channel.

Wanna help me a bit ?

First, thank you very much !

You can click on the little sponsor icon on the left, that'll help me a lot !

Also, if you are a Brave user, you can send me some BATs (I am a verified creator) !

My metrics

Metrics

languagetool.nvim's People

Contributors

beardhatcode avatar dpelle avatar konfekt avatar sh3rm4n avatar ultimatecoder avatar vigoux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

languagetool.nvim's Issues

Error : LanguageToolSupportedLanguages

I am trying to use this plugin with a document in French, but I cannot change the language and I cannot list the supported languages either. When I do :LanguageToolSupportedLanguages , I get the following (in French, because my system is in Fr):

Erreur détectée en traitant function LanguageTool#languages#supportedLanguages :                                                              
ligne    8 :
E714: Liste requise

And if I try :LanguageToolCheck! french, I get :

Erreur détectée en traitant function LanguageTool#check[9]..LanguageTool#languages#findLanguage[5]..<SNR>35_languageIsSupported :           
ligne    5 :
E714: Liste requise
Erreur détectée en traitant function LanguageTool#check[9]..LanguageTool#languages#findLanguage[11]..<SNR>35_languageIsSupported :
ligne    5 :
E714: Liste requise

Other commands seem to be working (but in English then).

I am using Languagetools 5.0

Thank you so much for this plugin, it would be so awesome if I was able to use it in other languages than English.

Error calling LanguageToolFixAtPoint

Describe the bug
asciicinema recording

Error detected while processing function LanguageTool#fixErrorAtPoint[1]..LanguageTool#errors#fix[1]..LanguageTool#errors#highlightRegex:
line    3:
E716: Key not present in Dictionary: "fromy == a:error.toy"
E15: Invalid expression: a:error.fromy == a:error.toy
line   17:
E121: Undefined variable: l:location_prefix
E15: Invalid expression: '\V' . l:location_prefix . '\<'     . LanguageTool#errors#getText(a:error)     . '\>\ze'
Error detected while processing function LanguageTool#fixErrorAtPoint[1]..LanguageTool#errors#fix:
line    2:
E716: Key not present in Dictionary: "replacements[a:sug_id].value"
E15: Invalid expression: a:error.replacements[a:sug_id].value
line    4:
E716: Key not present in Dictionary: "source_win)"
E116: Invalid arguments for function win_gotoid
line    7:
E716: Key not present in Dictionary: "fromy . ',' . a:error.toy . 's/' . l:location_regex . '/' . l:fix . '/'"

To Reproduce
Steps to reproduce the behavior:

  1. Start server and run check
  2. navigate to summary window
  3. go to last error and call :LanguageToolFixAtPoint

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
asciicinema above
Desktop (please complete the following information):

  • OS: MacOS

Additional context

NVIM v0.5.0-dev
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: 
Compiled by nixbld

using plugin commit 809e7d77fec834597f495fec737c59292a10025b

Does this plugin only support neovim?

Thanks for the work!
I installed in plugin with MacVim and experienced some problems. Since the name of the plugin is "LanguageTool.nvim", does it mean that it only supports neovim?

Have 'f' autofix the issue with the first recommended correction

vim-grammarous is a good plugin in theory, its features are fairly nice, but it just was littered with bugs when I tried to use it. Having the ability to autofix errors by pressing 'f' would bring this closer to feature parity with grammarous. Looking at my errors a lot of the time the fix I want is the first one, so having to just move to the error and pressing 'f' on either window would be nice.

This feature would ideally autorefresh with the fixed error then disappearing. Although with slow reading times i'm not sure how plausible this would be.

Error: LanguageTool server not started, please run :LanguageToolSetUp

I'm trying to get LanguageTool working with it installed locally on my system. which languagetool outputs /usr/bin/languagetool and so I put let g:languagetool_server_command='/usr/bin/languagetool' in my init.vim. After running :LanguageToolSetUp (which gave no response after running it btw), running :LanguageToolCheck I get a bunch of errors, including "LanguageTool server not started, please run :LanguageToolSetUp" which I'm guessing is the reason for the rest of the following errors:

Error detected while processing function LanguageTool#check[3]..LanguageTool#config#get[2]..LanguageTool#config#setup[10]..LanguageTool#languages#findLanguage
[5]..<SNR>235_languageIsSupported[2]..LanguageTool#server#get[1]..LanguageTool#server#send_sync:
line    2:
LanguageTool server not started, please run :LanguageToolSetUp
Error detected while processing function LanguageTool#check[3]..LanguageTool#config#get[2]..LanguageTool#config#setup[10]..LanguageTool#languages#findLanguage
[5]..<SNR>235_languageIsSupported:
line    5:
E714: List required
Error detected while processing function LanguageTool#check[3]..LanguageTool#config#get[2]..LanguageTool#config#setup[10]..LanguageTool#languages#findLanguage
[11]..<SNR>235_languageIsSupported:
line    5:
E714: List required
Error detected while processing function LanguageTool#check[3]..LanguageTool#config#get[2]..LanguageTool#config#setup[12]..LanguageTool#languages#findLanguage
[5]..<SNR>235_languageIsSupported:
line    5:
E714: List required
Error detected while processing function LanguageTool#check[3]..LanguageTool#config#get[2]..LanguageTool#config#setup[12]..LanguageTool#languages#findLanguage
[11]..<SNR>235_languageIsSupported:
line    5:
E714: List required
Error detected while processing function LanguageTool#check[3]..LanguageTool#config#get[2]..LanguageTool#config#setup:
line   14:
Failed to guess language from spelllang=[en] or from v:lang=[en_GB.UTF-8]. Defaulting to English (en-US). See ":help LanguageTool" regarding setting language
in g:languagetool.
Error detected while processing function LanguageTool#check[18]..LanguageTool#server#check[9]..LanguageTool#server#send:
line    2:
LanguageTool server not started, please run :LanguageToolSetUp
line   13:
E121: Undefined variable: s:lt_server_started
E15: Invalid expression: s:lt_server_started

What am I doing wrong?

works fine for tiny file, but very slow for longer text

Describe the bug

This plugin works fine for small toy text, such as the following:

just for an test.

But for real Markdown file, when I use :LanguageToolCheck, after several minutes, I get errors when I invoke the :LanguageToolSummary command. I guess it is because the previous command hasn't produced the result the latter command needs.

To Reproduce

Steps to reproduce the behavior:

  • Use the following minimal config:
set runtimepath+=/Users/jdhao/.local/share/nvim/plugged/LanguageTool.nvim
let g:languagetool_server_jar="/usr/local/opt/languagetool/libexec/languagetool-server.jar"
  • Use the following config to start Neovim, and open test.md containing text here.
  • Run :LanguageToolSetup, followed by :LanguageToolCheck
  • After a while, use :LanguageToolSummary command to check the output.

Expected behavior

A preview buffer is created to list all the found error for this file, but in
fact, I get the following error:

Error detected while processing function
LanguageTool#summary[1]
E121: Undefined variable: b:errors
E15: Invalid expression: b:errors
line   13:
E121: Undefined variable: l:errors
E116: Invalid arguments for function LanguageTool#ui#displayInWindow

I am not sure if this is an issue with languagetool or this plugin.

Desktop (please complete the following information):

  • OS: MacOS 10.15.6
  • nvim: v0.5.0-569e75799

LanguageTool triggers SwayLock

Describe the bug
Super weird. When I run :LanguageToolSetUp Neovim returns that the server started. Then when I run :LanguageToolCheck, swaylock activates with a white lock screen. When I log in back again, another blank window has been created and if I close it on Neovim I receive the message:

Error detected while processing function LanguageTool#server#sendCallback:
line    2:
E474: Unidentified byte: Error: Could not parse JSON from 'data' parameter

If I try to use this plugin on LaTeX files, I can get to start the server but it doesn't detected any errors when I run :LanguageToolCheck or :LanguageToolSummary.

To Reproduce
Steps to reproduce the behavior:

  1. Open a Mardown file in Neovim
  2. Run :LanguageToolSetUp
  3. Run :LanguageToolCheck
  4. See error

Expected behavior
The plugin to show the errors.

Desktop (please complete the following information):

  • OS: Gentoo
  • Browser: Firefox
  • Version: NVIM v0.8.0-dev+11-gd3121f1e6-dirty

Confused on how to make this work with arch linux's LanguageTool package.

Hello, I've been trying to migrate from https://github.com/dpelle/vim-LanguageTool to this, and to set it up with the arch package, I just had this.

let g:languagetool_cmd='/usr/bin/languagetool'
let g:languagetool_lang="en-US"

I tried to read the documentation for this plugin and thought it was a simple:

let g:languagetool_server_command='/usr/bin/languagetool'

and do :LanguagetoolSetUp, however this have given me the error that I haven't started the server. I'm a bit confused on this and would appropriate the help.

Rewrite this tool in lua

Hi everyone !

This issue will be tracking for the task of rewriting everything in lua. As this plugin focuses on Neovim, the rewrite will allow better performances and maybe more flexibility.

This may also allow us to leverage treesitter to simplify the markup/text extraction.

undefined variable l:fix

Describe the bug
asciicinema recording

when pressing f to fix on Summary window it returns an error as shown below

Error detected while processing function LanguageTool#errors#fix:
line    2:
E684: list index out of range: -21
E15: Invalid expression: a:error.replacements[a:sug_id].value
line    7:
E121: Undefined variable: l:fix

To Reproduce
Steps to reproduce the behavior:

  1. Start server and run check
  2. navigate to summary window
  3. press 'f'

Desktop (please complete the following information):

  • OS: macOS

Additional context

NVIM v0.5.0-dev
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: 
Compiled by nixbld

using plugin commit 809e7d77fec834597f495fec737c59292a10025b

Some suggestions

nice work, I am always waiting for a nice vim plugin for language-tool, but no one is perfect.

First suggestion is could you specify that languagetool-server.jar is needed, not languagetool-server? MacOS's brew offer a languagetool-server cli when you brew install languagetool. It will save time to config.

Second suggestion is that when you do LanguageToolCheck, a java app is started and a java docker icon appear. Could we avoid this?

Third suggestion is that could you do some test on other language, for example Japanese, due to some coding problem, not every languagetool vim plugin can show the result correctly. I try this plugin, and I can not highlight for some problem and I can not jump to problem text block correctly.

Spelling errors not found unless :LanguageToolCheck is called before :LanguageToolSetUp

Describe the bug

I have a weird issue with getting LanguageTool to point out spelling errors. The only way I can get it to highlight them is like this:

  1. > nvim test.md
  2. :LanguageToolCheck (throws an error)
  3. :LanguageToolSetUp
  4. :LanguageToolCheck

The test.md file contains the following:

This plugn can uses job feature on Vim 8.0.27 (or later) or Neovim. It's enable asynchronous comand executin so you dont need to be blcked untill the check have been done on Vim8+ or Neovim.

If I skip step 2 the spelling errors are not discovered LanguageTool, and it only points out the "dont" (which is a grammar error) and nothing else. They don't show up in :LanguageToolSummary either.

This is my init.vim:

call plug#begin('~/.vim/bundle')
  Plug 'vigoux/LanguageTool.nvim'
call plug#end()

let g:languagetool_server_command = '/usr/bin/languagetool --http'

To Reproduce

Follow the steps described above, but skip step 2.

Expected behavior

Spelling errors are highlighted without doing step 2.

Screenshots

When all four steps are followed:
Screenshot from 2021-03-23 17-06-55

When step 2 is skipped:
Screenshot from 2021-03-23 17-07-50

I'm on Arch Linux.

If there is a capitalisation error it doesn't record a misspelling error

Describe the bug
[asciinema recording](https://asciinema.org/a/UlOAZC57ACUlVAAXCm2RcaElw

When running check it first it correctly spots a capitalisation error, but it does not spot a misspelling error. When I run check again after fixing misspelling error it catches the error

)To Reproduce
Steps to reproduce the behavior:

  1. mispell the first word and make sure starts lowercase
  2. check the summary and it will only one error

Expected behavior
two errors to appear

Desktop (please complete the following information):

  • OS: MacOS

Additional context
Add any other context about the problem here.

NVIM v0.5.0-dev
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: 
Compiled by nixbld

using commit hash 809e7d77fec834597f495fec737c59292a10025b

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.