tanvd / grazi Goto Github PK
View Code? Open in Web Editor NEWGrammar checking and more for IntelliJ IDEA
License: Apache License 2.0
Grammar checking and more for IntelliJ IDEA
License: Apache License 2.0
I tried to edit a very large text file and the UI frozen forever (at least I managed to brew tea and did not wait any longer). I took some thread dumps: jstack.zip. The most interesting part is here:
"JobScheduler FJ pool 0/3" #47 daemon prio=4 os_prio=0 cpu=433843,28ms elapsed=589,45s tid=0x00007fcae8109000 nid=0x3658 runnable [0x00007fcaddcd6000]
java.lang.Thread.State: RUNNABLE
at tanvd.grazi.utils.StringUtilsKt$splitWithRanges$1.invoke(StringUtils.kt:47)
at tanvd.grazi.utils.StringUtilsKt$splitWithRanges$1.invoke(StringUtils.kt)
at tanvd.grazi.utils.UtilsKt.buildList(Utils.kt:50)
at tanvd.grazi.utils.StringUtilsKt.splitWithRanges(StringUtils.kt:34)
at tanvd.grazi.utils.StringUtilsKt.splitWithRanges$default(StringUtils.kt:34)
at tanvd.grazi.utils.StringUtilsKt.splitWithRanges(StringUtils.kt:31)
at tanvd.grazi.utils.StringUtilsKt.splitWithRanges$default(StringUtils.kt:31)
at tanvd.grazi.grammar.GrammarEngine$getFixes$1.invoke(GrammarEngine.kt:33)
at tanvd.grazi.grammar.GrammarEngine$getFixes$1.invoke(GrammarEngine.kt:10)
at tanvd.grazi.utils.UtilsKt.buildSet(Utils.kt:56)
at tanvd.grazi.grammar.GrammarEngine.getFixes(GrammarEngine.kt:22)
at tanvd.grazi.grammar.GrammarEngine.getFixes$default(GrammarEngine.kt:22)
at tanvd.grazi.grammar.SanitizingGrammarChecker.check(SanitizingGrammarChecker.kt:65)
at tanvd.grazi.grammar.SanitizingGrammarChecker.check$default(SanitizingGrammarChecker.kt:25)
at tanvd.grazi.ide.language.plain.PlainTextSupport$check$1.invoke(PlainTextSupport.kt:17)
at tanvd.grazi.ide.language.plain.PlainTextSupport$check$1.invoke(PlainTextSupport.kt:11)
at tanvd.grazi.utils.UtilsKt.buildSet(Utils.kt:56)
at tanvd.grazi.ide.language.plain.PlainTextSupport.check(PlainTextSupport.kt:16)
at tanvd.grazi.ide.language.LanguageSupport.getFixes(LanguageSupport.kt:15)
at tanvd.grazi.ide.GraziInspection.checkFile(GraziInspection.kt:50)
at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:142)
at com.intellij.psi.PsiElementVisitor.visitPlainTextFile(PsiElementVisitor.java:42)
at com.intellij.psi.impl.source.PsiPlainTextFileImpl.accept(PsiPlainTextFileImpl.java:36)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:75)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$8(LocalInspectionsPass.java:321)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$$Lambda$3420/0x0000000102ba7c40.run(Unknown Source)
at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:169)
at com.intellij.util.AstLoadingFilter$$Lambda$1902/0x0000000101d7a840.compute(Unknown Source)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:127)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:116)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:111)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$9(LocalInspectionsPass.java:320)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$$Lambda$3419/0x0000000102ba7840.process(Unknown Source)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:133)
at com.intellij.concurrency.ApplierCompleter.tryToExecAllList(ApplierCompleter.java:231)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:159)
at com.intellij.concurrency.ApplierCompleter.tryToExecAllList(ApplierCompleter.java:231)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:159)
at com.intellij.concurrency.ApplierCompleter$$Lambda$3283/0x0000000102754840.run(Unknown Source)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1100)
This code holds the read lock, so when someone will try to acquire the write lock, UI will be frozen until the read lock will be released.
Consider using ProgressManager.checkCanceled()
in loops more often. If the problem is in code that you doesn't control, consider using BombedCharSequence
.
Right now users need to reopen files to apply new changes in configuration
Right now rule can be disabled, but it is not possible to enable it back.
We need to implement this functionality
Right now we are using Swing XMLs to describe configuration menu of plugin. This is the only part of Java code in project.
We need to move to Kotlin DSL from XML.
Need to introduce support of Go: comments, string literals, GoDoc
Seems it totally ignored strings in this formats.
But comments are checked well.
Right now we disable spellcheck in project settings, but should in workspace.xml.
After the last update to Version 2019.2-3 Grazi does not recognize German language and marks all correctly written words as wrong. It then suggests English words for correction instead of German. German language is enabled in the settings, tried with both versions (German and Austrian). Also tried on a new Phpstorm installation. OS is Windows 7.
Sometimes loose punctuation rule triggered unexpectedly.
For example: logger.info("Assigning token ${it.display} (${it.token}) to license ${license.ref}")
We should support properties format.
Grazi uses IDEA built-int spellcheck as a last chance speller, so it will always clash with built-in IDEA spellcheck. We better to provide checkbox to disable IDEA built-in spellcheck globally.
How to switch between languages?
My use-case:
What I expect:
Thanks in advance!
Need to support: Python literal strings, Python docs, Python constructs spellcheck (analogue with kotlin/java support)
Right now our test coverage is more than incomplete. Let's prepare fixture tests for highlighting of all languages
Commit messages (written with default IDEA git plugin) should be supported (as IDEA typo checker do)
The Readability: paragraph over 80 words
is always triggered inside a rust-doc comment as soon as the comment has more than 80 words, regardless of the amounts of empty lines between between the paragraphs inside the comment.
Example
/// Do something useful.
///
/// This must not be called if you want to ensure that the program itself
/// doesn't do something useful. In case you still feel like calling the
/// function, we wish you best luck but please ensure to encapsulate the
/// call with at least 5 empty lines in front and afterwards.
///
/// # Example
///
/// ```no_run
/// let _ = my_cool_function();
/// ```
///
/// # Safety
///
/// This function is going to trigger undefined behavior in any case, but hey
/// we don't care.
It seems like the leading ///
prefix is recognized as part of the content and therefore prevents the Grazi to recognize the paragraph split.
We implement a lot of updates, which may require users attention (like adding spellchecking, which should be enabled). So we need to notify user about updates with popup.
In case you have a suggestion at start of sentence (for example, Proxy is...
) you'll be suggested with A Proxy
. We need to lowercase next word in that case
I had submitted a bug and bug had been fixed. But I don't know how to build this project, because I am a Maven user. Is there any build instruction document or ready-made nightly build package?
Right now @param
, @return
and others considered as a part of sentence in KDoc. It should be ignored.
Right now built-in IDEA spellcheck is disabled only in Editor. Commit messages should also be taken into account
There is a great plugin for latex support in IntelliJ - TeXiFy IDEA.
Would it be hard to implement support for latex in Grazi?
For now, it's only working in comments.
Right now Grazi uses IntelliJ IDEA spellchecker for English words. We need to implement support of own Grazi dictionary.
"False friend" words not changed with native language choice
We need to support spellchecking of methods/classes/functions/variables names (basically, language constructs) as built-in IDEA spellchecker does
XML is widely used by technical writers (one of our key audiences). It looks like it will be not very hard to implement support of it.
In the readme.md:
New repository is https://github.com/JetBrains/intellij-plugins/tree/master/grazie
Which is a 404
Need to introduce support of Rust literals and documentation
In Python this is totally valid:
def my_check_func(key, value):
"""Description for my check function.
Performs the following checks:
- Describe what the first check is about.
- Describe what the second check is about. Perhaps some
more description.
- And so on.
"""
# Do something
Grazi
would complain about special characters at the end of paragraph. Although this would
be totally appropriate in .md
or .rst
(or any other text file), for code (.py
) things are slightly different. Agree?
Thus, it would be really great to be able to say "ignore the rule for .py
files" (or any other file type) option.
There are a lot of situations when we have sentences including some non-natural language parts (for example: You can take a look at class grazi.class
). We should suppress errors surrounding those parts, cause we cannot deduce what is the real mistakes, and what is not.
Underscore rule (word with underscore considered as an error) does not seem relevant for users of IntelliJ IDEA
JetBrains provides a shared settings service, which is capable of synchronizing settings of plugins between different installations of IDE.
We can use it to synchronize not only Grazi settings, but also user dictionary.
Support of strings may be needed, for example, to verify HTML written in kotlinx.html format
Casing rule should not be applied to markdown list items.
Example: * ~inputJars~: ....
. Word in ~
is considered as an error.
It looks like this: a UI thread wants to perform a modification, but can't acquire the write lock because a background thread is performing some long activity under a read lock.
"AWT-EventQueue-0 2019.3#IU-193.SNAPSHOT IDEA, eap:true, os:Linux 5.0.0-16-generic, java-version:JetBrains s.r.o 11.0.3+12-b304.2 2019.3#IU-193.SNAPSHOT IDEA, eap:true, os:Linux 5.0.0-16-generic, java-version:JetBrains s.r.o 11.0.3+12-b304.2" prio=0 tid=0x0 nid=0x0 waiting on condition
java.lang.Thread.State: TIMED_WAITING
on com.intellij.openapi.application.impl.ReadMostlyRWLock@6a13e25c
at [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
at [email protected]/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.writeLock(ReadMostlyRWLock.java:216)
at com.intellij.openapi.application.impl.ApplicationImpl.startWrite(ApplicationImpl.java:1170)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:994)
at com.intellij.codeInsight.actions.MultiCaretCodeInsightAction.lambda$actionPerformedImpl$1(MultiCaretCodeInsightAction.java:50)
at com.intellij.codeInsight.actions.MultiCaretCodeInsightAction$$Lambda$7733/0x0000000101f84c40.run(Unknown Source)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:168)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:154)
at com.intellij.codeInsight.actions.MultiCaretCodeInsightAction.actionPerformedImpl(MultiCaretCodeInsightAction.java:50)
at com.intellij.codeInsight.actions.MultiCaretCodeInsightAction.actionPerformed(MultiCaretCodeInsightAction.java:46)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:265)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:590)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:643)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$$Lambda$4092/0x0000000102d2f040.run(Unknown Source)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:192)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:642)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:508)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:463)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:212)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:705)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:396)
at com.intellij.ide.IdeEventQueue$$Lambda$813/0x0000000100dbdc40.compute(Unknown Source)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:395)
at [email protected]/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at [email protected]/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at [email protected]/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at [email protected]/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at [email protected]/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at [email protected]/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
"JobScheduler FJ pool 1/7" prio=0 tid=0x0 nid=0x0 runnable
java.lang.Thread.State: RUNNABLE
at [email protected]/java.lang.Class.getSuperclass(Native Method)
at [email protected]/java.util.EnumMap.isValidKey(EnumMap.java:316)
at [email protected]/java.util.EnumMap.get(EnumMap.java:243)
at morfologik.stemming.DictionaryMetadata.isConvertingCase(DictionaryMetadata.java:138)
at morfologik.speller.Speller.areEqual(Speller.java:601)
at morfologik.speller.Speller.ed(Speller.java:562)
at morfologik.speller.Speller.cuted(Speller.java:635)
at morfologik.speller.Speller.findRepl(Speller.java:517)
at morfologik.speller.Speller.findRepl(Speller.java:523)
at morfologik.speller.Speller.findRepl(Speller.java:523)
at morfologik.speller.Speller.findRepl(Speller.java:523)
at morfologik.speller.Speller.findRepl(Speller.java:523)
at morfologik.speller.Speller.findReplacementCandidates(Speller.java:430)
at morfologik.speller.Speller.findReplacements(Speller.java:357)
at org.languagetool.rules.spelling.morfologik.MorfologikSpeller.getSuggestions(MorfologikSpeller.java:103)
at org.languagetool.rules.spelling.morfologik.MorfologikMultiSpeller.getSuggestionsFromSpellers(MorfologikMultiSpeller.java:212)
at org.languagetool.rules.spelling.morfologik.MorfologikMultiSpeller.getSuggestionsFromDefaultDicts(MorfologikMultiSpeller.java:246)
at org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule.getRuleMatches(MorfologikSpellerRule.java:243)
at org.languagetool.rules.en.AbstractEnglishSpellerRule.getRuleMatches(AbstractEnglishSpellerRule.java:99)
at org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule.match(MorfologikSpellerRule.java:146)
at org.languagetool.JLanguageTool.checkAnalyzedSentence(JLanguageTool.java:814)
at org.languagetool.JLanguageTool$TextCheckCallable.getOtherRuleMatches(JLanguageTool.java:1255)
at org.languagetool.JLanguageTool$TextCheckCallable.call(JLanguageTool.java:1189)
at org.languagetool.JLanguageTool$TextCheckCallable.call(JLanguageTool.java:1152)
at org.languagetool.JLanguageTool.performCheck(JLanguageTool.java:782)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:726)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:702)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:693)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:652)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:636)
at tanvd.grazi.grammar.GrammarEngine$getFixesSmall$1$allFixes$1.invoke(GrammarEngine.kt:50)
at tanvd.grazi.grammar.GrammarEngine$getFixesSmall$1$allFixes$1.invoke(GrammarEngine.kt:10)
at tanvd.grazi.utils.UtilsKt.tryRun(Utils.kt:14)
at tanvd.grazi.grammar.GrammarEngine$getFixesSmall$1.invoke(GrammarEngine.kt:50)
at tanvd.grazi.grammar.GrammarEngine$getFixesSmall$1.invoke(GrammarEngine.kt:10)
at tanvd.grazi.utils.UtilsKt.buildSet(Utils.kt:56)
at tanvd.grazi.grammar.GrammarEngine.getFixesSmall(GrammarEngine.kt:45)
at tanvd.grazi.grammar.GrammarEngine.access$getFixesSmall(GrammarEngine.kt:10)
at tanvd.grazi.grammar.GrammarEngine$getFixes$1.invoke(GrammarEngine.kt:37)
at tanvd.grazi.grammar.GrammarEngine$getFixes$1.invoke(GrammarEngine.kt:10)
at tanvd.grazi.utils.UtilsKt.buildSet(Utils.kt:56)
at tanvd.grazi.grammar.GrammarEngine.getFixes(GrammarEngine.kt:22)
at tanvd.grazi.grammar.GrammarEngine.getFixes$default(GrammarEngine.kt:22)
at tanvd.grazi.grammar.SanitizingGrammarChecker.check(SanitizingGrammarChecker.kt:65)
at tanvd.grazi.grammar.SanitizingGrammarChecker.check$default(SanitizingGrammarChecker.kt:25)
at tanvd.grazi.grammar.SanitizingGrammarChecker.check(SanitizingGrammarChecker.kt:23)
at tanvd.grazi.grammar.SanitizingGrammarChecker.check$default(SanitizingGrammarChecker.kt:23)
at tanvd.grazi.ide.language.CommentsSupport$check$1.invoke(CommentsSupport.kt:19)
at tanvd.grazi.ide.language.CommentsSupport$check$1.invoke(CommentsSupport.kt:12)
at tanvd.grazi.utils.UtilsKt.buildSet(Utils.kt:56)
at tanvd.grazi.ide.language.CommentsSupport.check(CommentsSupport.kt:17)
at tanvd.grazi.ide.language.LanguageSupport.getFixes(LanguageSupport.kt:15)
at tanvd.grazi.ide.GraziInspection.checkFile(GraziInspection.kt:50)
at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:142)
at org.jetbrains.kotlin.psi.KtFile.accept(KtFile.kt:227)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:75)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$8(LocalInspectionsPass.java:321)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$$Lambda$3847/0x0000000102b54840.run(Unknown Source)
at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:169)
at com.intellij.util.AstLoadingFilter$$Lambda$3504/0x0000000102676440.compute(Unknown Source)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:127)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:116)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:111)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$9(LocalInspectionsPass.java:320)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$$Lambda$3846/0x0000000102b55440.process(Unknown Source)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:133)
at com.intellij.concurrency.ApplierCompleter.tryToExecAllList(ApplierCompleter.java:231)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:159)
at com.intellij.concurrency.ApplierCompleter.tryToExecAllList(ApplierCompleter.java:231)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:159)
at com.intellij.concurrency.ApplierCompleter$$Lambda$3429/0x0000000102616040.run(Unknown Source)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1103)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.concurrency.ApplierCompleter$$Lambda$3431/0x0000000102615840.run(Unknown Source)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116)
at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
at com.intellij.concurrency.ApplierCompleter$$Lambda$3428/0x0000000102616c40.run(Unknown Source)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:164)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:207)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at [email protected]/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
at [email protected]/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at [email protected]/java.util.concurrent.ForkJoinPool$WorkQueue.helpCC(ForkJoinPool.java:1115)
at [email protected]/java.util.concurrent.ForkJoinPool.awaitJoin(ForkJoinPool.java:1687)
at [email protected]/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1039)
at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:58)
at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:58)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.visitRestElementsAndCleanup(LocalInspectionsPass.java:333)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspect(LocalInspectionsPass.java:203)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:119)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:55)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:429)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$$Lambda$3004/0x000000010233a040.run(Unknown Source)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1108)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:422)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$$Lambda$2996/0x000000010233c040.run(Unknown Source)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:421)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:397)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$$Lambda$2994/0x000000010233c840.run(Unknown Source)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:164)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:207)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:395)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
at [email protected]/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at [email protected]/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at [email protected]/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at [email protected]/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at [email protected]/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
We can decrease total size of plugin moving additional languages (all except English) out of the plugin.
Instead of it we should provide user with possibility to Download
additional languages from menu, like it is done in DataGrip with DB drivers.
I have encountered the following exception when I use the latest Grazi in Pycharm 2019.3. Under this circumstance, the syntax parser will stop working. Hoping to solve it as soon as possible, thanks a lot.
java.lang.IllegalStateException: No tokens for range in typo
at com.intellij.grazie.grammar.GrammarChecker.findTokensInTypoPatternRange(GrammarChecker.kt:92)
at com.intellij.grazie.grammar.GrammarChecker.check(GrammarChecker.kt:105)
at com.intellij.grazie.grammar.GrammarChecker.check(GrammarChecker.kt:68)
at com.intellij.grazie.ide.GrazieInspection$buildVisitor$1.visitElement(GrazieInspection.kt:38)
at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:274)
at com.jetbrains.python.psi.impl.PyBaseElementImpl.accept(PyBaseElementImpl.java:75)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:77)
at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:64)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:306)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$3(LocalInspectionsPass.java:274)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:154)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:146)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$4(LocalInspectionsPass.java:271)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:125)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:114)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:271)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:148)
at com.intellij.concurrency.ApplierCompleter.tryToExecAllList(ApplierCompleter.java:227)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:155)
at com.intellij.concurrency.ApplierCompleter.tryToExecAllList(ApplierCompleter.java:227)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:155)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:997)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116)
at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:167)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:157)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Grazi is proofreader for programmers, so we need to add bundled dictionary with common used IT terms (like names of languages, common terms ("artifact", "jar", "CI"), etc.)
edit a 1.43mb file will freeze with high cpu 100% and memory
demo file
https://github.com/bluelovers/node-segment-dict/blob/master/dict/segment/dict.txt
Each inspection in Markdown file is shown twice
For example, PDF
abbreviation considered as a mistake and proposed to change to PDF
. I think the reason is lowercase
in Spellcheck
Currently, the inspection doesn't take into account injected language into string literals. That leads to false positive warnings on some syntax constructions.
For example, ..
is the special syntax for ranges in Rust language. And if you inject it into string literal and type ..
, the plugin produces Punctuation: Use of two consecutive dots or commas
warning although everything is fine
Right now GraziCommit inspection is added right into vcs.xml
, but it should be in a workspace.xml as a local preference
I had updated to the latest plugin, but something goes wrong. My syntax parser can't work anymore. When I disable the latest plugin, everything was back to normal.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.