dpelle / vim-LanguageTool

A vim plugin for the LanguageTool grammar checker
280 stars 28 forks source link

LanguageTool should honour ]s and [s mappings (feature request) #15

Open sim590 opened 5 years ago

sim590 commented 5 years ago

It would be very cool if LanguageTool would honour ]s and [s mappings so that one could iterate through the error locations. That would require either playing with the spell option its iteration tools or only overriding the ]s and [s mappings when LanguageTool is "on", so as long as the user doesn't issue LanguageToolClear as the current design.

vigoux commented 5 years ago

Hi, vim-LT uses the location list to store error informations, thus you can navigate them by using :lnext and :lprev to navigate it. That don't solve the problem, but can be a temporary solution. I think that also solves #16, because i think that you can see the error at point in location list.

sim590 commented 5 years ago

Hi, vim-LT uses the location list to store error informations, thus you can navigate them by using :lnext and :lprev to navigate it. That don't solve the problem, but can be a temporary solution.

Kind of, but it doesn't behave in the same way. It depends on the iterator in the location list while hitting ]s and [s only depends on the cursor location and the location of the previous and last error in the file relative to the cursor position.

I think that also solves #16, because i think that you can see the error at point in location list.

Not quite. Let us say that your cursor is on some word where there's an error but that you have not travelled there using neither :lprev nor :lnext, then you cannot access easily the error message.

Also, even when travelling using the l-commands, the full error message is not shown if what you're referring to is the one-line message at the bottom. Also, the location list doesn't contain the useful information. The more essential and verbose messages to understand the error is in the window opened by LT and that window doesn't scroll with neither :lnext nor :lprev.

vigoux commented 5 years ago

Hmmm, i see, i have a PR opened (#19) i'll try to implent this in the pr Navigating with ]s and [s should not be hard to implement, and maybe viewing error at point might be nice if we use the preview-window