meanmail-dev / nginx-intellij-plugin Goto Github PK
View Code? Open in Web Editor NEWIntellij Plugin for Nginx configuration file
Home Page: https://meanmail.dev/plugin/7
License: MIT License
Intellij Plugin for Nginx configuration file
Home Page: https://meanmail.dev/plugin/7
License: MIT License
Describe the bug
set_by_lua_block $foo
syntax is not supported
To Reproduce
Use a snippet like this:
set $foo "";
set_by_lua_block $foo {
-- potentially some interesting logic here instead of just the simple return below
return "bar"
}
Expected behavior
Lua injection should be detected for this set_by_lua_block
IDE:
Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):
Additional context
I lack know-how about nginx and Lua. I use set_by_lua_block $foo { … }
syntax, because it is already present in files I have to work on. I might just not know about some alternative idiomatic approach of setting nginx vars out of Lua blocks.
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)
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
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)
block based
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)
}
}
}
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):
Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):
Additional context
Add any other context about the problem here.
如题, 编写配置的时候有代码提示不?
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:
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):
Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):
Additional Information
return code [text]
is supported:
http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#return
Describe the bug
ssl_certificate_by_lua_block
and set_by_lua_block
directives are not supported
To Reproduce
Steps to reproduce the behavior:
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.
IDE (please complete the following information. See Main Menu -> Help -> About):
Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):
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).
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.
Describe the bug
Not working on the newer 2021.1 version of PhpStorm
IDE (please complete the following information. See Main Menu -> Help -> About):
Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):
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
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.