GithubHelp home page GithubHelp logo

klazuka / intellij-elm Goto Github PK

View Code? Open in Web Editor NEW
391.0 17.0 70.0 25.56 MB

Elm plugin for IntelliJ Platform IDEs

License: MIT License

Lex 0.38% Kotlin 98.18% Elm 1.29% HTML 0.15%
intellij webstorm elm plugin jetbrains-ides elm-lang ide idea idea-plugin

intellij-elm's Introduction

Elm Plugin for JetBrains IDEs

Build Version Downloads

(build is failing, but 98.5% tests pass!)

Provides support for the Elm programming language.

Should work on most, if not all, IntelliJ Platform IDEs: IDEA (Community and Ultimate), WebStorm, PyCharm, RubyMine and more. If not please raise an issue.

Install

You may want to have some CLI tools --elm (the Elm compiler), elm-test, elm-format, elm-review and lamdera-- installed for certain features of this plugin to work.

Install the first three with:

sudo npm install -g elm elm-test elm-format elm-review

NOTE: if you have node installed using nvm, make sure to read our NVM setup guide.

To install Lamdera follow their instructions. Unlike this plugin and IntelliJ IDEA Community Edition, Lamdera is not open source software. By installing Lamdera you trust the vendor, as their software is only shipped as binary.

To install the plugin itself first make sure to uninstall all other Elm plugins you may have installed (this requires a restart of the IDE). Some have reported that having two Elm plugins installed results in the IDE not starting but showing a seemingly unrelated error (if you have this problem, there are ways to fix it).

From within a JetBrains IDE, go to Settings -> Plugins -> Marketplace and search for "Elm". After installing the plugin, restart the IDE and then open your existing Elm project or create a new project.

Alternatively you can install it manually by downloading a release (or downloading the source and building it yourself) and installing it with Settings -> Plugins -> ⚙️ (gear icon) -> Install plugin from disk...

Once the plugin is installed it is advised to double check all CLI tools are found by going to Settings -> Languages & Frameworks -> Elm and see the CLI tools.

Features

Want to see it in action? This 10 minute video demonstrates many of the features and how they work together.

Template ToDo list

  • Create a new [IntelliJ Platform Plugin Template][template] project.
  • Get familiar with the [template documentation][template].
  • Verify the pluginGroup, plugin ID and sources package.
  • Review the Legal Agreements.
  • Publish a plugin manually for the first time.
  • Set the Plugin ID in the above README badges.
  • Set the Deployment Token.
  • Click the Watch button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes.

License

MIT licensed.

Contributing

Yes, please! See our guide on this topic.

intellij-elm's People

Contributors

adamnfish avatar ajalt avatar aleksandrsl avatar alvinlindstam avatar benjamindebeerst avatar cies avatar clojj avatar dillonkearns avatar flowi avatar frawa avatar ishmum123 avatar jfmengels avatar julianpistorius avatar karvanit avatar kasma1990 avatar klazuka avatar martinsstewart avatar pravdomil avatar supermario avatar yonigibbs 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  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  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

intellij-elm's Issues

Smarter insertion of double-quotes

@jorgengranseth wrote in a separate issue:

I think ideally quotes would be handled as for e.g. Java:

helloWorld =
    |

On typing a quote ", a quote is inserted at the cursor's position and one immediately after it.

helloWorld =
    "|"

If you type a " while the cursor is immediately to the left of another quote, the cursor is moved to the right of the " rather than inserting an additional quote.

helloWorld =
    ""|

Your plugin also seems unusable

Thanks for the info that you provided for the issue I posted in the durkiewicz Elm plugin page. I especially thank you for your prompt response (I don't get that very often! :-( ).

I have just installed your rewrite using the method you suggested.

Unfortunately, I still have the problems I had with the previous plugin. No Elm project. No known way to create Elm files or otherwise engage the plugin. Worse, no documentation on how to use this plugin. Effectively, I still have a plugin that, aside from showing that it is installed and enabled, appears to not do anything.

So how do I engage this plugin? Are you planning to do any documentation on how to engage and use this plugin?

Record fields do not support completion/rename/go-to-declaration

Record fields do not currently support:

  • code completion
  • find usages
  • go-to-declaration

Implementing these features correctly requires that we resolve a record instance to its type definition, which means that we need static type inference in the general case.

I would like to implement the Elm type system in the plugin, but that's a big job.

As a stop-gap solution for code completion, we may want to provide code completion suggestions based on the Record types that are visible in expression scope, without worrying about whether it is or is not the type that the value actually resolves to.

Unresolved ref from base record in a type expression

The bug is in master, but it hasn't been released yet. Making note so I remember to fix it.

example:

type alias State record =
    { record | following : Bool, username : Username }

the record on line 2 should resolve to record on line 1 but it doesn't.

Unresolved reference for imported Module

import String.Extra as String -- All String.Extra functions are available in String

str : String
str = String.humanize "romario" -- This is marked as Unresolved reference `humanize`

It compiles without errors

Stop synthesizing VIRTUAL_END_DECL tokens within the module and import section of a file

The layout lexer synthesizes VIRTUAL_END_DECL and VIRTUAL_END_SECTION tokens to to delimit whitespace-sensitive grammar rules (value & functon declarations, let/in and case/of expressions).

We just need to insert a new initial lexer state and only transition into the NORMAL state once we enounter a token at the front of the line that's NOT module nor import nor comment. That's how the original Haskell lexer did it in the first place, but I foolishly simplified it during initial development.

Once this is done, we can simplify the grammar rules for module and import declarations, which also might help with #3.

Some multiline string literals can cause a crash

The plugin seems to have crashed:

java.util.NoSuchElementException
	at java.util.LinkedList.removeFirst(LinkedList.java:270)
	at java.util.LinkedList.pop(LinkedList.java:801)
	at org.elm.lang.core.lexer.ElmLayoutLexer.advance(ElmLayoutLexer.kt:160)
	at com.intellij.lang.impl.TokenSequence$Builder.performLexing(TokenSequence.java:86)
	at com.intellij.lang.impl.PsiBuilderImpl.a(PsiBuilderImpl.java:202)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:175)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:130)
	at com.intellij.lang.impl.PsiBuilderFactoryImpl.createBuilder(PsiBuilderFactoryImpl.java:52)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:86)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:49)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:192)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getLastChildNode(LazyParseableElement.java:246)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getLastChildNode(LazyParseableElement.java:39)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.a(DefaultStubBuilder.java:123)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.visitNode(DefaultStubBuilder.java:93)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.buildStubTree(DefaultStubBuilder.java:83)
	at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTreeFor(DefaultStubBuilder.java:58)
	at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTree(DefaultStubBuilder.java:39)
	at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:84)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.a(StubUpdatingIndex.java:232)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:907)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:214)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:197)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:273)
	at com.intellij.util.indexing.VfsAwareMapReduceIndex.calculateUpdateData(VfsAwareMapReduceIndex.java:98)
	at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:213)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1654)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1582)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:511)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1541)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1529)
	at com.intellij.util.indexing.FileBasedIndexImpl.processRefreshedFile(FileBasedIndexImpl.java:1508)
	at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1672)
	at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1669)
	at com.intellij.util.indexing.UpdateTask.a(UpdateTask.java:76)
	at com.intellij.util.indexing.UpdateTask.processAll(UpdateTask.java:46)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1691)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:722)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:688)
	at com.intellij.psi.stubs.StubIndexImpl.a(StubIndexImpl.java:342)
	at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:319)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:145)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:134)
	at org.elm.lang.core.stubs.index.ElmModulesIndex$Companion.get(ElmModulesIndex.kt:46)
	at org.elm.lang.core.resolve.scope.ImportScope$Companion.fromQualifierPrefixInModule(ImportScope.kt:37)
	at org.elm.lang.core.resolve.reference.QualifiedValueReference.getCandidates(QualifiedValueReference.kt:24)
	at org.elm.lang.core.resolve.reference.QualifiedValueReference.resolve(QualifiedValueReference.kt:20)
	at org.elm.lang.core.resolve.reference.QualifiedValueReference.resolve(QualifiedValueReference.kt:13)
	at org.elm.ide.annotator.ElmUnresolvedReferenceAnnotator.annotate(ElmUnresolvedReferenceAnnotator.kt:18)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:139)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:371)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:303)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:330)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:333)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:333)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:300)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:239)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:83)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:437)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1127)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:430)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:543)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:429)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:405)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:403)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:170)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)


java.util.NoSuchElementException
	at java.util.LinkedList.removeFirst(LinkedList.java:270)
	at java.util.LinkedList.pop(LinkedList.java:801)
	at org.elm.lang.core.lexer.ElmLayoutLexer.advance(ElmLayoutLexer.kt:160)
	at com.intellij.lang.impl.TokenSequence$Builder.performLexing(TokenSequence.java:86)
	at com.intellij.lang.impl.PsiBuilderImpl.a(PsiBuilderImpl.java:202)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:175)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:130)
	at com.intellij.lang.impl.PsiBuilderFactoryImpl.createBuilder(PsiBuilderFactoryImpl.java:52)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:86)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:49)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:192)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getLastChildNode(LazyParseableElement.java:246)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getLastChildNode(LazyParseableElement.java:39)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.a(DefaultStubBuilder.java:123)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.visitNode(DefaultStubBuilder.java:93)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.buildStubTree(DefaultStubBuilder.java:83)
	at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTreeFor(DefaultStubBuilder.java:58)
	at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTree(DefaultStubBuilder.java:39)
	at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:84)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.a(StubUpdatingIndex.java:232)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:907)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:214)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:197)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:273)
	at com.intellij.util.indexing.VfsAwareMapReduceIndex.calculateUpdateData(VfsAwareMapReduceIndex.java:98)
	at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:213)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1654)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1582)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:511)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1541)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1529)
	at com.intellij.util.indexing.FileBasedIndexImpl.processRefreshedFile(FileBasedIndexImpl.java:1508)
	at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1672)
	at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1669)
	at com.intellij.util.indexing.UpdateTask.a(UpdateTask.java:76)
	at com.intellij.util.indexing.UpdateTask.processAll(UpdateTask.java:46)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1691)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:722)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:688)
	at com.intellij.psi.stubs.StubIndexImpl.a(StubIndexImpl.java:342)
	at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:319)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:145)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:134)
	at org.elm.lang.core.stubs.index.ElmModulesIndex$Companion.get(ElmModulesIndex.kt:46)
	at org.elm.lang.core.resolve.scope.ImportScope$Companion.fromImportDecl(ImportScope.kt:26)
	at org.elm.lang.core.resolve.reference.ExposedTypeReferenceFromImport.getVariants(ExposedTypeReferenceFromImport.kt:19)
	at org.elm.lang.core.resolve.reference.ExposedTypeReferenceFromImport.getVariants(ExposedTypeReferenceFromImport.kt:13)
	at org.elm.lang.core.resolve.reference.ElmReferenceBase.resolve(ElmReferenceBase.kt:54)
	at org.elm.lang.core.resolve.reference.ElmReferenceBase.resolve(ElmReferenceBase.kt:14)
	at org.elm.ide.annotator.ElmUnresolvedReferenceAnnotator.annotate(ElmUnresolvedReferenceAnnotator.kt:18)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:139)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:371)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:309)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:330)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:333)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:333)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:300)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:239)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:83)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:437)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1127)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:430)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:543)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:429)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:405)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:403)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:170)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)


java.util.NoSuchElementException
	at java.util.LinkedList.removeFirst(LinkedList.java:270)
	at java.util.LinkedList.pop(LinkedList.java:801)
	at org.elm.lang.core.lexer.ElmLayoutLexer.advance(ElmLayoutLexer.kt:160)
	at com.intellij.lang.impl.TokenSequence$Builder.performLexing(TokenSequence.java:86)
	at com.intellij.lang.impl.PsiBuilderImpl.a(PsiBuilderImpl.java:202)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:175)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:130)
	at com.intellij.lang.impl.PsiBuilderFactoryImpl.createBuilder(PsiBuilderFactoryImpl.java:52)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:86)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:49)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:192)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getLastChildNode(LazyParseableElement.java:246)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getLastChildNode(LazyParseableElement.java:39)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.a(DefaultStubBuilder.java:123)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.visitNode(DefaultStubBuilder.java:93)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.buildStubTree(DefaultStubBuilder.java:83)
	at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTreeFor(DefaultStubBuilder.java:58)
	at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTree(DefaultStubBuilder.java:39)
	at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:84)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.a(StubUpdatingIndex.java:232)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:907)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:214)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:197)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:273)
	at com.intellij.util.indexing.VfsAwareMapReduceIndex.calculateUpdateData(VfsAwareMapReduceIndex.java:98)
	at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:213)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1654)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1582)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:511)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1541)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1529)
	at com.intellij.util.indexing.FileBasedIndexImpl.processRefreshedFile(FileBasedIndexImpl.java:1508)
	at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1672)
	at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1669)
	at com.intellij.util.indexing.UpdateTask.a(UpdateTask.java:76)
	at com.intellij.util.indexing.UpdateTask.processAll(UpdateTask.java:46)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1691)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:722)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:688)
	at com.intellij.psi.stubs.StubIndexImpl.a(StubIndexImpl.java:342)
	at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:319)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:145)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:134)
	at org.elm.lang.core.stubs.index.ElmModulesIndex$Companion.get(ElmModulesIndex.kt:46)
	at org.elm.lang.core.resolve.scope.GlobalScope$getVisibleValues$1.invoke(GlobalScope.kt:45)
	at org.elm.lang.core.resolve.scope.GlobalScope.getVisibleValues(GlobalScope.kt:50)
	at org.elm.lang.core.resolve.scope.ModuleScope.getVisibleValues(ModuleScope.kt:55)
	at org.elm.lang.core.resolve.scope.ExpressionScope$getVisibleValues$1.invoke(ExpressionScope.kt:21)
	at org.elm.lang.core.resolve.scope.ExpressionScope$getVisibleValues$1.invoke(ExpressionScope.kt:13)
	at org.elm.lang.core.resolve.scope.ExpressionScopeKt.treeWalkUp(ExpressionScope.kt:59)
	at org.elm.lang.core.resolve.scope.ExpressionScope.getVisibleValues(ExpressionScope.kt:19)
	at org.elm.lang.core.resolve.reference.LexicalValueReference.getCandidates(LexicalValueReference.kt:20)
	at org.elm.lang.core.resolve.reference.LexicalValueReference.resolve(LexicalValueReference.kt:17)
	at org.elm.lang.core.resolve.reference.LexicalValueReference.resolve(LexicalValueReference.kt:11)
	at com.intellij.codeInsight.TargetElementUtil.b(TargetElementUtil.java:389)
	at com.intellij.codeInsight.TargetElementUtil.a(TargetElementUtil.java:366)
	at com.intellij.codeInsight.TargetElementUtil.a(TargetElementUtil.java:236)
	at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:208)
	at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:92)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:437)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1127)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:430)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:543)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:429)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:405)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:403)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:170)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)


java.util.NoSuchElementException
	at java.util.LinkedList.removeFirst(LinkedList.java:270)
	at java.util.LinkedList.pop(LinkedList.java:801)
	at org.elm.lang.core.lexer.ElmLayoutLexer.advance(ElmLayoutLexer.kt:160)
	at com.intellij.lang.impl.TokenSequence$Builder.performLexing(TokenSequence.java:86)
	at com.intellij.lang.impl.PsiBuilderImpl.a(PsiBuilderImpl.java:202)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:175)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:130)
	at com.intellij.lang.impl.PsiBuilderFactoryImpl.createBuilder(PsiBuilderFactoryImpl.java:52)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:86)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:49)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:192)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getLastChildNode(LazyParseableElement.java:246)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getLastChildNode(LazyParseableElement.java:39)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.a(DefaultStubBuilder.java:123)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.visitNode(DefaultStubBuilder.java:93)
	at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.buildStubTree(DefaultStubBuilder.java:83)
	at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTreeFor(DefaultStubBuilder.java:58)
	at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTree(DefaultStubBuilder.java:39)
	at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:84)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.a(StubUpdatingIndex.java:232)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:907)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:214)
	at com.intellij.psi.stubs.StubUpdatingIndex$3.map(StubUpdatingIndex.java:197)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:273)
	at com.intellij.util.indexing.VfsAwareMapReduceIndex.calculateUpdateData(VfsAwareMapReduceIndex.java:98)
	at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:213)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1654)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1582)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:511)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1541)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1529)
	at com.intellij.util.indexing.FileBasedIndexImpl.processRefreshedFile(FileBasedIndexImpl.java:1508)
	at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1672)
	at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1669)
	at com.intellij.util.indexing.UpdateTask.a(UpdateTask.java:76)
	at com.intellij.util.indexing.UpdateTask.processAll(UpdateTask.java:46)
	at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1691)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:722)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:688)
	at com.intellij.psi.stubs.StubIndexImpl.a(StubIndexImpl.java:342)
	at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:319)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:145)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:134)
	at org.elm.lang.core.stubs.index.ElmModulesIndex$Companion.get(ElmModulesIndex.kt:46)
	at org.elm.lang.core.resolve.scope.GlobalScope$getVisibleValues$1.invoke(GlobalScope.kt:45)
	at org.elm.lang.core.resolve.scope.GlobalScope.getVisibleValues(GlobalScope.kt:50)
	at org.elm.lang.core.resolve.scope.ModuleScope.getVisibleValues(ModuleScope.kt:55)
	at org.elm.lang.core.resolve.scope.ExpressionScope$getVisibleValues$1.invoke(ExpressionScope.kt:21)
	at org.elm.lang.core.resolve.scope.ExpressionScope$getVisibleValues$1.invoke(ExpressionScope.kt:13)
	at org.elm.lang.core.resolve.scope.ExpressionScopeKt.treeWalkUp(ExpressionScope.kt:59)
	at org.elm.lang.core.resolve.scope.ExpressionScope.getVisibleValues(ExpressionScope.kt:19)
	at org.elm.lang.core.resolve.reference.LexicalValueReference.getCandidates(LexicalValueReference.kt:20)
	at org.elm.lang.core.resolve.reference.LexicalValueReference.resolve(LexicalValueReference.kt:17)
	at org.elm.lang.core.resolve.reference.LexicalValueReference.resolve(LexicalValueReference.kt:11)
	at com.intellij.codeInsight.TargetElementUtil.b(TargetElementUtil.java:389)
	at com.intellij.codeInsight.TargetElementUtil.a(TargetElementUtil.java:366)
	at com.intellij.codeInsight.TargetElementUtil.a(TargetElementUtil.java:236)
	at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:208)
	at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:92)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:437)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1127)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:430)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:543)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:429)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:405)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:403)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:170)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)


Improve error messages for invalid strings.

As mentioned in the comments for #84, error messages for invalid string and character literals could be improved. Currently, these errors are produced by the lexer and parser. To improve them, we could make the lexer and parser more lenient, and write an annotator with the messages we want.

Lexer/highlighter gets confused with string literals in some cases

The way the plugin handles strings often leads to error highlights when typing a string with a symbol in it:

helloWorld =
    "Hello, world!"
    ^             ^

This only seems to happen to the last string in a file (presumably because the string pattern matches across lines and uses the next " as the closing quote). Inserting any character before the first symbol resolves the highlighting for the string. There isn't actually any errors showing on the right bar, just error highlighting on the text (without a tooltip).

I think ideally quotes would be handled as for e.g. Java:

helloWorld =
    |

On typing a quote ", a quote is inserted at the cursor's position and one immediately after it.

helloWorld =
    "|"

If you type a " while the cursor is immediately to the left of another quote, the cursor is moved to the right of the " rather than inserting an additional quote.

helloWorld =
    ""|

Implement 'loose' code completion for Record Fields

As described in #1, resolving record fields accurately requires static type inference. Since it will probably be a long time before we can build that in the plugin, we should at least provide a quick-and-dirty solution for doing code completion on the fields of a record.

I believe that Kamil's plugin did something simple like providing field suggestions based on the Record types that are visible in expression scope, without worrying about whether it is or is not the type that the value actually resolves to.

Add an 'import module' quick-fix for unresolved references

When the plugin marks a reference as unresolved, the user should be able to press option-enter to get a quick-fix command that would automatically insert a new module declaration at the top of the file such that the reference will no longer be unresolved.

I implemented this for Kamil's Elm plugin, so it's just a matter of porting it over from Java and adapting to the slightly different Psi tree.

Resolved parameterized type variables

e.g. the a in the union type declaration type Maybe a = Just a | Nothing

The main use case for this would be to allow these type variables to be renamed easily.

Re-enable tests for implicit (global) imports of Elm stdlib from Core

I already wrote the tests (ElmStdlibImportResolveTest and ElmStdlibCompletionTest), but punted because it's a big job because we need to setup a test LightProjectDescriptor that includes the .elm files from Core. The Rust plugin does the equivalent of running elm-package install --yes elm/lang/core when the tests are initialized. We should do something similar (although it makes the tests dependent on an external, network-based resource). Or should we bundle Elm Core with the plugin?

Once we can setup a test project loaded with the files from Elm Core, we should re-enable the above-mentioned tests.

Crash on PyCharm and WebStorm

The last update of the plugin crashes on PyCharm 2018.1.2. the crash occurs as soon as you try to start typing, and then writing code is not possible at all.

com/intellij/psi/util/PsiTreeUtilKt
java.lang.NoClassDefFoundError: com/intellij/psi/util/PsiTreeUtilKt
	at org.elm.ide.typing.ElmOnEnterSmartIndentHandler.preprocessEnter(ElmOnEnterSmartIndentHandler.kt:137)
	at com.intellij.codeInsight.editorActions.EnterHandler.a(EnterHandler.java:128)
	at com.intellij.codeInsight.editorActions.EnterHandler.b(EnterHandler.java:81)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.lambda$disablePostprocessFormattingInside$1(PostprocessReformattingAspect.java:110)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:118)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:109)
	at com.intellij.codeInsight.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:80)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:64)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:210)
	at com.intellij.codeInsight.template.impl.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:49)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:64)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$null$2(EditorActionHandler.java:202)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:110)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$3(EditorActionHandler.java:201)
	at com.intellij.openapi.editor.impl.CaretModelImpl.a(CaretModelImpl.java:363)
	at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:452)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:355)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:346)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:201)
	at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:98)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:137)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:95)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:107)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:86)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:576)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.a(IdeKeyEventDispatcher.java:625)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:624)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.c(IdeKeyEventDispatcher.java:479)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:213)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:695)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:395)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.ClassNotFoundException: com.intellij.psi.util.PsiTreeUtilKt PluginClassLoader[org.elm.klazuka, 1.1.0] com.intellij.ide.plugins.cl.PluginClassLoader@5270f92e
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 44 more


java.lang.NoClassDefFoundError: com/intellij/psi/util/PsiTreeUtilKt
	at org.elm.ide.typing.ElmOnEnterSmartIndentHandler.preprocessEnter(ElmOnEnterSmartIndentHandler.kt:137)
	at com.intellij.codeInsight.editorActions.EnterHandler.a(EnterHandler.java:128)
	at com.intellij.codeInsight.editorActions.EnterHandler.b(EnterHandler.java:81)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.lambda$disablePostprocessFormattingInside$1(PostprocessReformattingAspect.java:110)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:118)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:109)
	at com.intellij.codeInsight.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:80)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:64)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:210)
	at com.intellij.codeInsight.template.impl.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:49)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:64)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$null$2(EditorActionHandler.java:202)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:110)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$3(EditorActionHandler.java:201)
	at com.intellij.openapi.editor.impl.CaretModelImpl.a(CaretModelImpl.java:363)
	at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:452)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:355)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:346)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:201)
	at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:98)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:137)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:95)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:107)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:86)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:576)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.a(IdeKeyEventDispatcher.java:625)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:624)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.c(IdeKeyEventDispatcher.java:479)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:213)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:695)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:395)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


java.lang.NoClassDefFoundError: com/intellij/psi/util/PsiTreeUtilKt
	at org.elm.ide.typing.ElmOnEnterSmartIndentHandler.preprocessEnter(ElmOnEnterSmartIndentHandler.kt:137)
	at com.intellij.codeInsight.editorActions.EnterHandler.a(EnterHandler.java:128)
	at com.intellij.codeInsight.editorActions.EnterHandler.b(EnterHandler.java:81)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.lambda$disablePostprocessFormattingInside$1(PostprocessReformattingAspect.java:110)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:118)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:109)
	at com.intellij.codeInsight.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:80)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:64)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:210)
	at com.intellij.codeInsight.template.impl.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:49)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
	at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:64)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$null$2(EditorActionHandler.java:202)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:110)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$3(EditorActionHandler.java:201)
	at com.intellij.openapi.editor.impl.CaretModelImpl.a(CaretModelImpl.java:363)
	at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:452)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:355)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:346)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:201)
	at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:98)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:137)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:95)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:107)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:86)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:576)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.a(IdeKeyEventDispatcher.java:625)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:624)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.c(IdeKeyEventDispatcher.java:479)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:213)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:695)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:395)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


    java.lang.NoClassDefFoundError: com/intellij/psi/util/PsiTreeUtilKt
            at org.elm.ide.typing.ElmOnEnterSmartIndentHandler.preprocessEnter(ElmOnEnterSmartIndentHandler.kt:137)
            at com.intellij.codeInsight.editorActions.EnterHandler.a(EnterHandler.java:128)
            at com.intellij.codeInsight.editorActions.EnterHandler.b(EnterHandler.java:81)
            at com.intellij.psi.impl.source.PostprocessReformattingAspect.lambda$disablePostprocessFormattingInside$1(PostprocessReformattingAspect.java:110)
            at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:118)
            at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:109)
            at com.intellij.codeInsight.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:80)
            at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
            at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
            at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:64)
            at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:210)
            at com.intellij.codeInsight.template.impl.editorActions.EnterHandler.executeWriteAction(EnterHandler.java:49)
            at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
            at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010)
            at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:64)
            at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$null$2(EditorActionHandler.java:202)
            at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:110)
            at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$3(EditorActionHandler.java:201)
            at com.intellij.openapi.editor.impl.CaretModelImpl.a(CaretModelImpl.java:363)
            at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:452)
            at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:355)
            at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:346)
            at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:201)
            at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:98)
            at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:137)
            at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:95)
            at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:107)
            at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:86)
            at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220)
            at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237)
            at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:576)
            at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.a(IdeKeyEventDispatcher.java:625)
            at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
            at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:624)
            at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.c(IdeKeyEventDispatcher.java:479)
            at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:213)
            at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:695)
            at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:395)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)



Elm 0.19 compatibility

Things that will need to be fixed:

  • packages are now installed in ~/.elm (by default). This will probably be the hardest thing to fix because we will now need to get in the business of parsing the elm.json file to determine which packages are actually in scope.
  • String and Char are no longer built-in types. Need to add them to implicit global scope
  • The (!) operator no longer exists in Platform.Cmd. Need to delete it from implicit global scope.
  • union constructors are either all exposed or only a single constructor is exposed (??? this appears to be in flux still)
  • the \x escape code in String and Char literals has been changed to \u{0000} (e.g. \xff => \u{00ff})
  • tuple constructor functions have been removed (e.g. (,) and (,,))
  • qualified imports of implicitly imported modules are broken
    - isCore check needs to accomodate the new path structure
    - packages becomes singular
    - e.g. /Users/keith/.elm/0.19.0/package/elm-lang/core/6.0.0/src/List.elm
  • infix operators are defined with new syntax (see elm-lang/core/Basics.elm) and they are not permitted in normal user programs
  • Native -> Elm.Kernel

Open Questions:

  • which kinds of packages are allowed to define infix operators?
  • can an infix operator be used as a function still (e.g. with List.map)? YES, it can

Code folding

It seems, your marvelous plugin doesn't support code folding (records, functions, ...) yet.
Is it planned?

Implement rename refactoring for modules/files

Given a module Foo in file Foo.elm, we should add support for renaming the module/file so that the module declaration, the filename and all references to that module are renamed.

The following locations need to be renamed during this refactoring:

  • module declaration (module Foo exposing (..) at the top of a file)
  • filename (Foo.elm)
  • imports (import Foo in a different module)
  • qualified references (f = Foo.bar 42 in a different module)

Do code completion for modules that are not imported

Let's say that I have not yet imported List.Extra. Now I start typing List.Extra. in an expression. We should provide code completions from that module.

As a bonus, it would be nice to automatically import the module when you select the completion.

Poor parse error recovery in module and import statements at the top of the file

When writing code near the module and import statements, the parser sometimes gets confused and marks too many things as errors. The cause is poor parse error recovery for module and import statements.

This makes it difficult to implement keyword completion in these statements because the Psi tree can be a mess during editing.

No support for multiple elm projects per intellij project.

I have to elm projects in the same web project: one for frontend and one for backend. Each project has its elm-package.json file that encloses each project's source code, but references are always searched within only one of the projects, instead of being searched in their own project.

Compiler errors/warnings in IDE

Hello
Do you plan to show compiler errors/warning inside IDE?

I love this plugin but it's disturbing when I need to switch to console in order to see compiler output and then back to IDE.

Add "Move file/module" refactoring

When moving an Elm file, all imports also need to be updated. This is like a file rename, but directory structure also plays a significant part in an Elm module's full name.

importing invalid module creates invalid import line

image

Creating the function on line 5 of the image and Alt+Enter to import will create line 3 import Module.Claims exposing (test) which is wrong.

This problem is much more confusing when trying to import a model with a typo, it seems correct but it imports itself instead.

Expected: It should say "No module/model of this name found" or something to signal that it's a user error.

Implement keyword completion

The plugin should complete language keywords. I started to work on this (see ElmKeywordSuggestions.kt), but ran into problems due to poor parse error recovery (#3).

Prior to doing this work, we should make sure that the parse error recovery is as good as possible (and covered by tests in ElmPartialParsingTestCase).

We might also want to consider using IntelliJ's "pattern" system for registering keyword completion providers instead of the ad-hoc code which I have now.

Both the Rust and the Kotlin plugins may be used for inspiration.

Retrieve compiler output color information

When compiling in webstorm ( via hotkeys ), the console's output is in one color (even though it supports colors). In elm 0.19, some error messages are only useful in color:
elm/error-message-catalog#269

Evan mentioned that the compiler colors can be found in the following package:
https://package.elm-lang.org/packages/elm/project-metadata-utils/latest/

It would be awesome if this plugin could relay this information to the console.

More info:
Webstorm allows you to configure colors and font for their console.
There are plugins for embedding a terminal, even a iTerm.
But you cannot link the output of a external tool to a terminal, and you cannot set the console to be colored like a terminal.

Cache PsiReferences to speed up unresolved ref annotator

Typing in the editor causes the UnresolvedReferenceAnnotator to run a lot, which can be computationally expensive when editing an Elm file that contains a lot of imports. We should cache the resolved PsiReferences. See intellij-rust plugin for how to do it.

Basic code formatting of let/in and case/of expressions

Most code formatting should be done by elm-format, but the plugin should do a limited amount of formatting/indenting for some common things such as let/in and case/of expressions. This is especially important since the parsing of those expressions depends on indentation, and elm-format will refuse to run when the indentation is bad.

Importing a constructor for a custom type should import all values

In 0.19 the compiler won't let you import a single constructor for a custom type.

import Time exposing (Weekday)


someWeekday : Weekday
someWeekday =
    Thu
    ^^^

importing Thu here with Alt + Enter gives you

import Time exposing (Weekday(Thu))

when it should give you

import Time exposing (Weekday(..))

It should probably also highlight this in case of manual imports and prompt to replace with (..):

import Time exposing (Weekday(Thu))
                              ^^^

Trailing paren on final case branch causes erroneous syntax error

foo =
    (\x ->
        case x of
            [] -> 0
            _ -> 1)
                --^ syntax error marked here, but should be ok

If the right paren is at the same indent as the case or the lambda's left-paren, everything is fine. I think the problem is that the synthetic delimiter token is coming after the right-paren, but it needs to come before the closing paren.

Renaming a shadowed function incorrectly renames the shadowed variable

-- this causes a 0.19 error about shadowing.
-- the function name shadows the destructured variable of the same name

medicareGivenNames : { a | medicareGivenNames : String } -> (String -> msg) -> Html msg
medicareGivenNames { medicareGivenNames } msg =
    View.Layout.paneField "Medicare Name" (View.Components.input medicareGivenNames msg)

-- a refactor rename yields the following
-- note that the variable used in the `View.Components.input` is incorrectly renamed as well

viewMedicareGivenNames : { a | medicareGivenNames : String } -> (String -> msg) -> Html msg
viewMedicareGivenNames { medicareGivenNames } msg =
    View.Layout.paneField "Medicare Name" (View.Components.input viewMedicareGivenNames msg)

This is a fairly trivial issue to fix up though. The usage of the function elsewhere are updated correctly and this is mostly a once off issue with 0.18 -> 0.19 upgrades.

Add 'Move Parameter Left/Right' Refactoring

One thing that commonly needs to be done when writing Elm code is to re-arrange the parameters of a function in order to facilitate currying. This is a cumbersome change to make by hand because you need to edit the list of parameters in the function declaration as well as the type annotation.

I'm not sure what the IntelliJ extension point is called, but I believe there should be a way to hook into the system to provide a keyboard shortcut that swaps adjacent parameters.

Add "Move module members" refactoring

You have no idea how happy I am to see fresh efforts on supporting elm in intellij!

THANK YOU!

So, what i'm asking for, here, is moving function/type alias/value from one file to another, while updating it's references throughout the project. With typescript, it looks like this:

screen shot 2018-02-10 at 14 27 53

screen shot 2018-02-10 at 14 30 19

NoSuchElementException when renaming function

When refactor renaming a function intellij-elm crashes. 😢

I was in the middle of renaming this function, by Shift + F6 with the cursor inside initTestTile in the top definition line. It crashes in the middle of me renaming it initTestTileWaiting

initTestTile : Reaction -> Color -> Int -> Int -> ( Int, Tile )
initTestTile reaction color x y =
    ( positionKey x y
    , TileWaiting
        (TileState
            reaction
            color
            (IVec2 x y)
        )
        (initView color (Vec2 (toFloat x) (toFloat y)))
    )

When it crashes the following code is replaced in my file.

initTestTileWaiting : Reaction -> Color -> Int -> Int -> ( Int, Tile )
in reaction color x y =
    ( positionKey x y
    , TileWaiting
        (TileState
            reaction
            color
            (IVec2 x y)
        )
        (initView color (Vec2 (toFloat x) (toFloat y)))
    )

Note in instead of initTestTileWaiting in the second line after the definition.
At this point the editor is broken and I must Cmd+Z to get back to an editable state.

null
java.util.NoSuchElementException
	at java.util.LinkedList.removeFirst(LinkedList.java:270)
	at java.util.LinkedList.pop(LinkedList.java:801)
	at org.elm.lang.core.lexer.ElmLayoutLexer.advance(ElmLayoutLexer.kt:160)
	at com.intellij.lang.impl.TokenSequence$Builder.performLexing(TokenSequence.java:86)
	at com.intellij.lang.impl.PsiBuilderImpl.a(PsiBuilderImpl.java:202)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:175)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:130)
	at com.intellij.lang.impl.PsiBuilderFactoryImpl.createBuilder(PsiBuilderFactoryImpl.java:52)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:86)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:49)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:192)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:240)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:39)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.isReplaceWholeNode(BlockSupportImpl.java:331)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.mergeTrees(BlockSupportImpl.java:277)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.makeFullParse(BlockSupportImpl.java:216)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.reparseRange(BlockSupportImpl.java:92)
	at com.intellij.psi.impl.DocumentCommitThread.doCommit(DocumentCommitThread.java:741)
	at com.intellij.psi.impl.DocumentCommitThread.lambda$commitUnderProgress$4(DocumentCommitThread.java:522)
	at com.intellij.psi.impl.DocumentCommitThread.commitUnderProgress(DocumentCommitThread.java:545)
	at com.intellij.psi.impl.DocumentCommitThread.commitSynchronously(DocumentCommitThread.java:441)
	at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$doCommit$0(PsiDocumentManagerBase.java:455)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1003)
	at com.intellij.psi.impl.PsiDocumentManagerBase.doCommit(PsiDocumentManagerBase.java:467)
	at com.intellij.psi.impl.PsiDocumentManagerBase.commitDocument(PsiDocumentManagerBase.java:308)
	at com.intellij.codeInsight.template.impl.TemplateState.b(TemplateState.java:829)
	at com.intellij.codeInsight.template.impl.TemplateState.a(TemplateState.java:726)
	at com.intellij.openapi.project.DumbService.withAlternativeResolveEnabled(DumbService.java:291)
	at com.intellij.codeInsight.template.impl.TemplateState.f(TemplateState.java:725)
	at com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandAction.java:252)
	at com.intellij.openapi.command.WriteCommandAction$Simple.run(WriteCommandAction.java:234)
	at com.intellij.openapi.application.RunResult.run(RunResult.java:35)
	at com.intellij.openapi.command.WriteCommandAction.lambda$null$1(WriteCommandAction.java:171)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1003)
	at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction$2(WriteCommandAction.java:170)
	at com.intellij.openapi.command.WriteCommandAction.lambda$doExecuteCommand$4(WriteCommandAction.java:210)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:141)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:119)
	at com.intellij.openapi.command.WriteCommandAction.doExecuteCommand(WriteCommandAction.java:212)
	at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:168)
	at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:151)
	at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:254)
	at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:241)
	at com.intellij.codeInsight.template.impl.TemplateState.calcResults(TemplateState.java:708)
	at com.intellij.codeInsight.template.impl.TemplateState.q(TemplateState.java:518)
	at com.intellij.codeInsight.template.impl.TemplateState.access$600(TemplateState.java:66)
	at com.intellij.codeInsight.template.impl.TemplateState$4.a(TemplateState.java:148)
	at com.intellij.codeInsight.template.impl.TemplateState$4.beforeCommandFinished(TemplateState.java:154)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.fireCommandFinished(CoreCommandProcessor.java:203)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.finishCommand(CoreCommandProcessor.java:187)
	at com.intellij.openapi.command.impl.CommandProcessorImpl.finishCommand(CommandProcessorImpl.java:53)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:155)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109)
	at com.intellij.openapi.editor.impl.EditorImpl$MyMouseAdapter.e(EditorImpl.java:3509)
	at com.intellij.openapi.editor.impl.EditorImpl$MyMouseAdapter.mousePressed(EditorImpl.java:3439)
	at java.awt.Component.processMouseEvent(Component.java:6538)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6306)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4897)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4523)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
	at java.awt.Container.dispatchEventImpl(Container.java:2281)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.j(IdeEventQueue.java:822)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:646)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


java.util.NoSuchElementException
	at java.util.LinkedList.removeFirst(LinkedList.java:270)
	at java.util.LinkedList.pop(LinkedList.java:801)
	at org.elm.lang.core.lexer.ElmLayoutLexer.advance(ElmLayoutLexer.kt:160)
	at com.intellij.lang.impl.TokenSequence$Builder.performLexing(TokenSequence.java:86)
	at com.intellij.lang.impl.PsiBuilderImpl.a(PsiBuilderImpl.java:202)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:175)
	at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:130)
	at com.intellij.lang.impl.PsiBuilderFactoryImpl.createBuilder(PsiBuilderFactoryImpl.java:52)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:86)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:49)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:192)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:240)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:39)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.isReplaceWholeNode(BlockSupportImpl.java:331)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.mergeTrees(BlockSupportImpl.java:277)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.makeFullParse(BlockSupportImpl.java:216)
	at com.intellij.psi.impl.source.text.BlockSupportImpl.reparseRange(BlockSupportImpl.java:92)
	at com.intellij.psi.impl.DocumentCommitThread.doCommit(DocumentCommitThread.java:741)
	at com.intellij.psi.impl.DocumentCommitThread.lambda$commitUnderProgress$4(DocumentCommitThread.java:522)
	at com.intellij.psi.impl.DocumentCommitThread.commitUnderProgress(DocumentCommitThread.java:545)
	at com.intellij.psi.impl.DocumentCommitThread.commitSynchronously(DocumentCommitThread.java:441)
	at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$doCommit$0(PsiDocumentManagerBase.java:455)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1003)
	at com.intellij.psi.impl.PsiDocumentManagerBase.doCommit(PsiDocumentManagerBase.java:467)
	at com.intellij.psi.impl.PsiDocumentManagerBase.commitDocument(PsiDocumentManagerBase.java:308)
	at com.intellij.psi.impl.PsiDocumentManagerBase.commitAllDocuments(PsiDocumentManagerBase.java:233)
	at com.intellij.refactoring.rename.inplace.InplaceRefactoring$MyTemplateListener.templateCancelled(InplaceRefactoring.java:928)
	at com.intellij.codeInsight.template.impl.TemplateState.k(TemplateState.java:404)
	at com.intellij.codeInsight.template.impl.TemplateState.q(TemplateState.java:515)
	at com.intellij.codeInsight.template.impl.TemplateState.access$600(TemplateState.java:66)
	at com.intellij.codeInsight.template.impl.TemplateState$4.a(TemplateState.java:148)
	at com.intellij.codeInsight.template.impl.TemplateState$4.beforeCommandFinished(TemplateState.java:154)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.fireCommandFinished(CoreCommandProcessor.java:203)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.finishCommand(CoreCommandProcessor.java:187)
	at com.intellij.openapi.command.impl.CommandProcessorImpl.finishCommand(CommandProcessorImpl.java:53)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:155)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109)
	at com.intellij.openapi.editor.impl.EditorImpl$MyMouseAdapter.c(EditorImpl.java:3555)
	at com.intellij.openapi.editor.impl.EditorImpl$MyMouseAdapter.mouseReleased(EditorImpl.java:3446)
	at java.awt.Component.processMouseEvent(Component.java:6541)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6306)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4897)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
	at java.awt.Container.dispatchEventImpl(Container.java:2281)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.j(IdeEventQueue.java:822)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:646)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

IntelliJ Ultimate 2017.3
Mac 10.13.3

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.