Closed Kristinita closed 8 years ago
@Kristinita I added an option to display problems in a panel, can you check and let me know what do you think? The option is currently enabled by default.
@gtarawneh, many bugs for me.
LanguageTool: Check Text
in one file, there is this:Traceback (most recent call last):
File "E:\Sublime Text 3\sublime_plugin.py", line 574, in run_
return self.run(edit)
File "LanguageTool in E:\Sublime Text 3\Data\Installed Packages\languagetool-sublime.sublime-package", line 261, in run
File "LanguageTool in E:\Sublime Text 3\Data\Installed Packages\languagetool-sublime.sublime-package", line 48, in selectProblem
File "LanguageTool in E:\Sublime Text 3\Data\Installed Packages\languagetool-sublime.sublime-package", line 67, in showProblem
File "LanguageTool in E:\Sublime Text 3\Data\Installed Packages\languagetool-sublime.sublime-package", line 76, in showProblemPanel
File "LanguageTool in E:\Sublime Text 3\Data\Installed Packages\languagetool-sublime.sublime-package", line 90, in showPanelText
TypeError: begin_edit() missing 2 required positional arguments: 'edit_token' and 'cmd'
LanguageTool: Check Text
in other file, in Status Bar there a message:error, enable to connect via http, is languagetool running?
And LanguageTool not checking text.
LanguageTool: Clear Problems
for me.
@Kristinita Sorry there were apparently some compatibility issues with ST3, can you test again?
@gtarawneh , 1 and 3 solved, thanks!
Problem 2 I have stayed. I can not check my long texts 1100+ lines and more, I get error, enable to connect via http, is languagetool running?
in my Status Bar. Shorter texts, for example, in 400 lines are scanned normally. Perhaps there is some limit on the length of the text. If this is so, then, in my opinion, it must be specified in the documentation.
@Kristinita Thanks for letting me know. Problem 2 is caused by a limitation of the public LanguageTool server (I updated the readme file to stress this).
You can check larger texts if you download and run a local copy of LanguageTool (in the LanguageTool GUI, press Ctrl+s
to open the Options dialog then check Run as server on port 8081
. Afterwards add the line "languagetool_server": "http://localhost:8081/"
in your user settings file.)
Hope that helps.
@gtarawneh, I install and open Stand-Alone LanguageTool for Desktop:
E:\LanguageTool>java -jar e:/LanguageTool/languagetool.jar
Setting up thread pool with 10 threads
Starting LanguageTool 3.4 (build date: 2016-06-27 09:04) server on http://localhost:8081...
Server started
Text Checking
→ Options
→ check Run as server on port 8081
.
PackageResourceViewer: Open Resource
→ Language Tool
→ LanguageTool.sublime-settings
→ I commented out the first line and second line uncommented, my LanguageTool.sublime-settings
file looks like this:
{
// "languagetool_server": "https://languagetool.org:8081/" //limited to 20 calls per minute
"languagetool_server": "http://localhost:8081/" // local server
,"display_mode": "panel"
}
I run your plugin in my file to size 75 KB:
key evt: control+alt+l
command: language_tool
But in Status Bar still error, enable to connect via http, is languagetool running?
On my 27 KB file LanguageTool work is good.
What do I do incorrectly?
Thanks.
@Kristinita looks like one of the recent LanguageTool updates slightly changed their API causing the plugin to break. I made a slight change to fix this and it should work fine now.
@gtarawneh, yes, now all right!
e:\LanguageTool>java -jar e:/LanguageTool/languagetool.jar
Setting up thread pool with 10 threads
Starting LanguageTool 3.4 (build date: 2016-06-27 09:04) server on http://localhost:8081...
Server started
2016-08-09 11:54:52 Check done: 55907 chars, ru-RU[auto], null, handlers:1, 2409 matches, 16454ms, class: V1TextChecker, agent:-, sent
Whether and it is possible to make so that it wasn't necessary to start a terminal when I want to make spell check to the big file? For example, to add the LanguageTool command to Command Palette LanguageTool: Start Server
.
Thanks.
@Kristinita there's no easy way to start LanguageTool from Sublime without knowing where it's installed. I'll do some research and see if I can do something about it though (maybe enable users to specify the path manually). Thanks for the suggestion.
I offer an option that users of your plugin could receive output information on mistakes in the
Ctrl+'
console, but not in Status Bar. Not default, but option.Reasons:
Thanks.