Code Monkey home page Code Monkey logo

nginx-intellij-plugin's Introduction

Nginx intellij plugin

JetBrains IntelliJ Plugins JetBrains IntelliJ plugins Twitter Follow

https://plugins.jetbrains.com/plugin/15461

https://meanmail.dev/plugin/7

Your ratings and feedback are very important. The feature will appear the faster the more people request it.

Supported versions of Intellij:

Supported Products

  • All intellij based IDEs 2021.1 — 2021.3

Features

  • Highlighting for nginx configuration files in IDE
  • Comment with Line Comment action
  • Structure view

nginx-intellij-plugin's People

Contributors

athorcis avatar meanmail 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

Watchers

 avatar  avatar  avatar  avatar  avatar

nginx-intellij-plugin's Issues

Error just editing nginx.

When I edit a file I get an "IDE Error" in the plugin with the following stack trace:

ava.lang.IllegalArgumentException: Invalid range specified: (85, 84); 
	at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:231)
	at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:226)
	at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:222)
	at com.intellij.openapi.util.TextRange.<init>(TextRange.java:41)
	at com.intellij.openapi.util.TextRange.<init>(TextRange.java:30)
	at dev.meanmail.folding.NginxFoldingBuilder.buildFoldRegions(NginxFoldingBuilder.kt:31)
	at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptorsNoPlaceholderCaching(LanguageFolding.java:88)
	at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:71)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:272)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:238)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.getUpdateResult(FoldingUpdate.java:88)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.lambda$updateFoldRegions$0(FoldingUpdate.java:77)
	at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:39)
	at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:227)
	at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:42)
	at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:227)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:114)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:44)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:228)
	at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:28)
	at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:72)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.updateFoldRegions(FoldingUpdate.java:74)
	at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegions(CodeFoldingManagerImpl.java:226)
	at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegionsAsync(CodeFoldingManagerImpl.java:212)
	at com.intellij.codeInsight.daemon.impl.CodeFoldingPass.doCollectInformation(CodeFoldingPass.java:42)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:181)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:184)
	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:183)

This was attempting to open a curly brace and preparing it to close it...

Where: Webstorm 2021.3 Build #WS-213.5744.224, built on November 27, 2021
OS: macOS Monterey 12.1
RAM: 64GB 39GB used
Processor i9

Possibly related to #5

Plugin breaks with latest Intellij version

I just updated to the latest Intellij Ultimate (2021.1) this morning and the plugin immediately broke on opening an nginx.conf file

java.lang.IllegalArgumentException: Invalid range specified: (612, 611); 
	at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:222)
	at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:217)
	at com.intellij.openapi.util.TextRange.assertProperRange(TextRange.java:213)
	at com.intellij.openapi.util.TextRange.<init>(TextRange.java:41)
	at com.intellij.openapi.util.TextRange.<init>(TextRange.java:30)
	at dev.meanmail.folding.NginxFoldingBuilder.buildFoldRegions(NginxFoldingBuilder.kt:29)
	at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptorsNoPlaceholderCaching(LanguageFolding.java:92)
	at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:75)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:267)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:233)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.getUpdateResult(FoldingUpdate.java:87)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.lambda$updateFoldRegions$0(FoldingUpdate.java:76)
	at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
	at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:227)
	at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:42)
	at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:227)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:43)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:228)
	at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
	at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:72)
	at com.intellij.codeInsight.folding.impl.FoldingUpdate.updateFoldRegions(FoldingUpdate.java:73)
	at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegions(CodeFoldingManagerImpl.java:222)
	at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegionsAsync(CodeFoldingManagerImpl.java:208)
	at com.intellij.codeInsight.daemon.impl.CodeFoldingPass.doCollectInformation(CodeFoldingPass.java:42)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:400)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:393)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:392)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:368)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:167)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:366)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
	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:183)

Current version of the plugin does not work in 2022.3.

Describe the bug
The plugin is enabled. Sporadically, there is an exception.

The exception makes it impossible to Amend Commit in a project that is not related to NGINX.

Couldn't check commit: java.util.concurrent.ExecutionException: com.intellij.diagnostic.PluginException: dev.meanmail.NginxParserDefinition PluginClassLoader(plugin=PluginDescriptor(name=Nginx Configuration, id=dev.meanmail.plugin.nginx-intellij-plugin, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.4345.14/IntelliJ IDEA.app.plugins/nginx-intellij-plugin, version=2021.3-2022.1, package=null, isBundled=false), packagePrefix=null, instanceId=327, state=active)


java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.intellij.diagnostic.PluginException: dev.meanmail.NginxParserDefinition PluginClassLoader(plugin=PluginDescriptor(name=Nginx Configuration, id=dev.meanmail.plugin.nginx-intellij-plugin, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.4345.14/IntelliJ IDEA.app.plugins/nginx-intellij-plugin, version=2021.3-2022.1, package=null, isBundled=false), packagePrefix=null, instanceId=327, state=active)
	at com.intellij.util.ExceptionUtil.rethrow(ExceptionUtil.java:132)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(ProgressIndicatorUtils.java:376)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(ProgressIndicatorUtils.java:354)
	at com.intellij.psi.stubs.StubIndexImpl.getAsyncState(StubIndexImpl.java:74)
	at com.intellij.psi.stubs.StubIndexImpl.getIndex(StubIndexImpl.java:186)
	at com.intellij.psi.stubs.StubIndexEx.getContainingIds(StubIndexEx.java:349)
	at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:157)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:99)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:87)
	at com.intellij.psi.impl.java.stubs.index.JavaFullClassNameIndex.get(JavaFullClassNameIndex.java:34)
	at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.doFindClasses(JavaFileManagerImpl.java:88)
	at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.findClass(JavaFileManagerImpl.java:111)
	at com.intellij.psi.impl.PsiElementFinderImpl.findClass(PsiElementFinderImpl.java:40)
	at com.intellij.psi.impl.JavaPsiFacadeImpl.doFindClass(JavaPsiFacadeImpl.java:93)
	at com.intellij.psi.impl.JavaPsiFacadeImpl.findClass(JavaPsiFacadeImpl.java:71)
	at com.intellij.jam.JavaLibraryUtils.lambda$getLibraryClassMap$0(JavaLibraryUtils.java:47)
	at com.intellij.util.containers.ConcurrentFactoryMap$2.create(ConcurrentFactoryMap.java:174)
	at com.intellij.util.containers.ConcurrentFactoryMap.get(ConcurrentFactoryMap.java:40)
	at java.base/java.util.concurrent.ConcurrentMap.getOrDefault(ConcurrentMap.java:88)
	at com.intellij.jam.JavaLibraryUtils.hasLibraryClass(JavaLibraryUtils.java:29)
	at com.intellij.micronaut.provider.http.MnHttpUtils.hasHttpServerLibrary(MnHttpUtils.kt:35)
	at com.intellij.micronaut.provider.http.MnPathVariableRegexInjector.isSupportedProject(MnPathVariableRegexInjector.kt:54)
	at com.intellij.microservices.jvm.pathvars.PathVariableRegexInjector.getLanguagesToInject(PathVariableRegexInjector.java:35)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.processInPlaceInjectorsFor(InjectedLanguageManagerImpl.java:442)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUp(InjectedLanguageUtilBase.java:246)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.enumerate(InjectedLanguageUtilBase.java:176)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.enumerateEx(InjectedLanguageManagerImpl.java:326)
	at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.lambda$getInjectedPsiFiles$3(InjectedGeneralHighlightingPass.java:183)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
	at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:215)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.util.concurrent.ExecutionException: com.intellij.diagnostic.PluginException: dev.meanmail.NginxParserDefinition PluginClassLoader(plugin=PluginDescriptor(name=Nginx Configuration, id=dev.meanmail.plugin.nginx-intellij-plugin, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.4345.14/IntelliJ IDEA.app.plugins/nginx-intellij-plugin, version=2021.3-2022.1, package=null, isBundled=false), packagePrefix=null, instanceId=327, state=active)
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(ProgressIndicatorUtils.java:361)
	... 48 more
Caused by: com.intellij.diagnostic.PluginException: dev.meanmail.NginxParserDefinition PluginClassLoader(plugin=PluginDescriptor(name=Nginx Configuration, id=dev.meanmail.plugin.nginx-intellij-plugin, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.4345.14/IntelliJ IDEA.app.plugins/nginx-intellij-plugin, version=2021.3-2022.1, package=null, isBundled=false), packagePrefix=null, instanceId=327, state=active)
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:908)
	at com.intellij.serviceContainer.LazyExtensionInstance.createInstance(LazyExtensionInstance.java:55)
	at com.intellij.serviceContainer.LazyExtensionInstance.getInstance(LazyExtensionInstance.java:44)
	at com.intellij.serviceContainer.BaseKeyedLazyInstance.getInstance(BaseKeyedLazyInstance.java:38)
	at com.intellij.psi.stubs.StubUpdatingIndex.getExtensions(StubUpdatingIndex.java:406)
	at com.intellij.psi.stubs.StubUpdatingIndex.instantiateElementTypesFromFields(StubUpdatingIndex.java:399)
	at com.intellij.psi.stubs.StubUpdatingIndex.lambda$ensureSerializationManagerInitialized$0(StubUpdatingIndex.java:389)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeNonCancelableSection$3(CoreProgressManager.java:223)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:238)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:222)
	at com.intellij.psi.stubs.StubUpdatingIndex.ensureSerializationManagerInitialized(StubUpdatingIndex.java:388)
	at com.intellij.psi.stubs.StubUpdatingIndex.getValueExternalizer(StubUpdatingIndex.java:301)
	at com.intellij.util.indexing.impl.storage.DefaultIndexStorageLayout.createIndexStorage(DefaultIndexStorageLayout.kt:74)
	at com.intellij.util.indexing.impl.storage.DefaultIndexStorageLayout$SingleEntryStorageLayout.openIndexStorage(DefaultIndexStorageLayout.kt:168)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.openIndexStorage(StubUpdatingIndex.java:348)
	at com.intellij.util.indexing.impl.storage.TransientFileContentIndex$1.openIndexStorage(TransientFileContentIndex.java:43)
	at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.lambda$new$0(VfsAwareMapReduceIndex.java:68)
	at com.intellij.util.indexing.impl.MapReduceIndex.<init>(MapReduceIndex.java:74)
	at com.intellij.util.indexing.storage.MapReduceIndexBase.<init>(MapReduceIndexBase.java:42)
	at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.<init>(VfsAwareMapReduceIndex.java:81)
	at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.<init>(VfsAwareMapReduceIndex.java:67)
	at com.intellij.util.indexing.impl.storage.TransientFileContentIndex.<init>(TransientFileContentIndex.java:39)
	at com.intellij.psi.stubs.StubUpdatingIndexStorage.<init>(StubUpdatingIndexStorage.java:34)
	at com.intellij.psi.stubs.StubUpdatableIndexFactoryImpl.createIndex(StubUpdatableIndexFactoryImpl.java:20)
	at com.intellij.psi.stubs.StubUpdatingIndex.createIndexImplementation(StubUpdatingIndex.java:340)
	at com.intellij.util.indexing.FileBasedIndexImpl.createIndex(FileBasedIndexImpl.java:575)
	at com.intellij.util.indexing.FileBasedIndexImpl.initIndexStorage(FileBasedIndexImpl.java:494)
	at com.intellij.util.indexing.FileBasedIndexImpl.registerIndexer(FileBasedIndexImpl.java:453)
	at com.intellij.util.indexing.FileBasedIndexDataInitialization.lambda$initAssociatedDataForExtensions$0(FileBasedIndexDataInitialization.java:84)
	at com.intellij.util.indexing.IndexDataInitializer.executeTask(IndexDataInitializer.kt:80)
	at com.intellij.util.indexing.IndexDataInitializer.access$executeTask(IndexDataInitializer.kt:15)
	at com.intellij.util.indexing.IndexDataInitializer$runParallelTasks$1$1.run(IndexDataInitializer.kt:52)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:241)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:214)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:203)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: dev.meanmail.NginxParserDefinition PluginClassLoader(plugin=PluginDescriptor(name=Nginx Configuration, id=dev.meanmail.plugin.nginx-intellij-plugin, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.4345.14/IntelliJ IDEA.app.plugins/nginx-intellij-plugin, version=2021.3-2022.1, package=null, isBundled=false), packagePrefix=null, instanceId=327, state=active)
	at com.intellij.serviceContainer.ComponentManagerImplKt.doLoadClass(ComponentManagerImpl.kt:1468)
	at com.intellij.serviceContainer.ComponentManagerImplKt.access$doLoadClass(ComponentManagerImpl.kt:1)
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:900)
	... 47 more

Expected behavior
Commit without exceptions

Screenshots
If applicable, add screenshots to help explain your problem.

IDE (please complete the following information. See Main Menu -> Help -> About):

  • OS: [e.g. Windows 10]
  • Product: Idea Ultimate
  • Version Build #IU-222.4345.14, built on October 5, 2022
  • JRE Version: 17.0.4.1+7-b469.62 aarch64
  • Project SDK: [RVM Ruby 2.7.4]

Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):

  • Version 2021.3-2022.1

Additional context
Add any other context about the problem here.

Code highlighting breaks when using return with text content

Describe the bug
Code highlighting breaks when using return with text content.

To Reproduce
Paste this config:

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    location / {
        add_header Content-Type "text/plain";
        return 200 "LB";
    }

    location ~ ^(.*)\.rss {
        resolver 127.0.0.11 ipv6=off;
        rewrite ^ $request_uri break;
        return 400;
        proxy_pass http://nginx_target$uri;
    }
}

Code highlighting breaks after the return 200 "LB" block:
image

Expected behavior
Code highlighting will continue to work further down in the config file.

IDE (please complete the following information. See Main Menu -> Help -> About):

  • OS: Windows 10 Pro 64bit
  • Product: WebStorm
  • Version: 2021.2.3
  • JRE Version: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  • Project SDK: -

Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):

  • Version: 2021.2-212

Additional Information
return code [text] is supported:
http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#return

Allow Language Injection

Is your feature request related to a problem? Please describe.
If one uses openresty, there is a possibility to include Lua-Scripts into the config file with access_by_lua_block {} (and others). Those parts are parsed as default nginx-config.

Describe the solution you'd like
It would be great if the plugin would realize a language injection (or allow them with a comment or similar) and would disable nginx-language checks and - ideally - highlight the injected language (with Lua-Plugin installed). Currently, the last line of a lua_block is always considered syntactically incorrect, because of the missing ;.

Describe alternatives you've considered
Always use _lua_by_file directives and external lua files that get correctly highlighted if the Lua-Plugin is installed.

Additional context
Full List of directives from lua-nginx-module:

  • string based (discouraged; I would not implement this, but if it does not take much additional work, it's a nive-to-have)

    • init_by_lua "<lua_string>"
    • init_worker_by_lua "<lua_string>"
    • set_by_lua "<lua_string>"
    • content_by_lua "<lua_string>"
    • rewrite_by_lua "<lua_string>"
    • access_by_lua "<lua_string>"
    • header_filter_by_lua "<lua_string>"
    • body_filter_by_lua "<lua_string>"
    • log_by_lua "<lua_string>"
  • block based

    • init_by_lua_block { <lua_string> }
    • init_worker_by_lua_block { <lua_string> }
    • exit_worker_by_lua_block { <lua_string> }
    • set_by_lua_block { <lua_string> }
    • content_by_lua_block { <lua_string> }
    • rewrite_by_lua_block { <lua_string> }
    • access_by_lua_block { <lua_string> }
    • header_filter_by_lua_block { <lua_string> }
    • body_filter_by_lua_block { <lua_string> }
    • log_by_lua_block { <lua_string> }
    • balancer_by_lua_block { <lua_string> }
    • ssl_certificate_by_lua_block { <lua_string> }
    • ssl_session_fetch_by_lua_block { <lua_string> }
    • ssl_session_store_by_lua_block { <lua_string> }

Reduced config example:

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name _;

    set $my_nginx_var "";

    location / {
        access_by_lua_block {
            local redis = require "resty.redis"
            local red = redis:new()
            red:set_timeout(200)
            local ok, err = red:connect("127.0.0.1", 6379)
            if not ok then
                return
            end

            local access_num, err = red:incr("access_" .. ngx.var.remote_addr)

            if (not access_num or access_num >= 10) then
                ngx.var.my_nginx_var = "deny"
                return
            end
            ngx.var.my_nginx_var = "allow"
            red:expire("access_" .. ngx.var.remote_addr, 16*3600)
        }
    }
}

Allow to Collapse Blocks

Is your feature request related to a problem? Please describe.
Long config files lack the possibility to get an easy overview of different config directives.

Describe the solution you'd like
In long(er) config files, it would be great to have the possibility to collapse blocks from { to }, so you could easily check all existing locations (for example)

Describe alternatives you've considered
The only alternative (I see) would be to migrate every block into a file that is included into the config.

Plugin doesn't work with EAP 2022.1

Good evening,

I looked for this issue but is not registered yet.

I'm working with the WebStorm EAP 2022.1 version and the plugin is not recognised, requires the IDE build 213 as this image below.

Captura de pantalla 2022-01-31 a las 16 21 48

Not working on PhpStorm 2021.1

Describe the bug
Not working on the newer 2021.1 version of PhpStorm

IDE (please complete the following information. See Main Menu -> Help -> About):

  • OS: Arch Linux
  • Product: PhpStorm
  • Version 2021.1
  • JRE Version: Built in version
  • Project SDK: -

Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):

  • Version 2020.2.1-203

Additional context
Not compatible with the current version of the IDE, because it requires build 203.* or older but the current build is PS-211.6693.120

Go to include files

Is your feature request related to a problem? Please describe.
I use plenty of include statements in my configuration files. Unfortunately it is very cumbersome to get to the corresponding files.

Describe the solution you'd like
I would like to be able to get to the included file via the Go To functionality (Ctrl + Click, Ctrl + B).

`ssl_certificate_by_lua_block` and `set_by_lua_block` directives not supported

Describe the bug
ssl_certificate_by_lua_block and set_by_lua_block directives are not supported

To Reproduce
Steps to reproduce the behavior:

  1. Use either of ssl_certificate_by_lua_block or set_by_lua_block and write lua.

Expected behavior
Lua injection should be supported for these directives as well.

Screenshots
Screenshot 2023-04-14 at 18 08 23

IDE (please complete the following information. See Main Menu -> Help -> About):

  • OS: Darwin 20.6.0
  • Product: GoLand
  • Version: 2021.2.3
  • JRE Version: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):

  • Version: 2022.1.1

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.