Can't run Lua plugin in CLion (IntelliJ IDEA-based C++ IDE)

Issue #163 resolved
clion-support created an issue

It appears that for running files using Lua plugin in CLion ( you need to define Lua SDK. Originally Lua plugin was dedicated for Intellij IDEA and these settings were managed via File -> Project Structure -> Project -> Project SDK there. In CLion, where project configuration actually resides in CMakeLists file, there is no UI for that.

As a workaround one can modify project settings manually in “<project_folder>/.idea/misc.xml” file. Add project-jdk-name and project-jdk-type to the following line: <component name="ProjectRootManager" version="2" project-jdk-name="LuaJ" project-jdk-type="Lua SDK" />

However more convenient option is needed.

Comments (11)

  1. Niklas Voss

    With the RC of CLion you get the following error when enabling the lua plugin (newest version from this repository build with IntelliJ 14.1):

    Plugin 'Lua' failed to initialize and will be disabled.  Please restart CLion.
    java.lang.IllegalArgumentException: Argument for @NotNull parameter 'virtualFile' of com/intellij/openapi/projectRoots/impl/ProjectRootContainerImpl.addRoot must not be null
        at com.intellij.openapi.projectRoots.impl.ProjectRootContainerImpl.addRoot(
        at com.intellij.openapi.projectRoots.impl.ProjectJdkImpl.addRoot(
        at com.sylvanaar.idea.Lua.sdk.KahluaSdk.createMockSdk(
        at com.sylvanaar.idea.Lua.sdk.KahluaSdk.initComponent(
        at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(
        at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(
        at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(
        at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(
        at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponent(
        at com.intellij.openapi.application.impl.ApplicationImpl.createComponent(
        at com.intellij.openapi.components.impl.ComponentManagerImpl.a(
        at com.intellij.openapi.components.impl.ComponentManagerImpl.init(
        at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(
        at com.intellij.openapi.application.impl.ApplicationImpl.load(
        at com.intellij.openapi.application.impl.ApplicationImpl.load(
        at com.intellij.idea.MainImpl$1$1$
        at java.awt.event.InvocationEvent.dispatch(
        at java.awt.EventQueue.dispatchEventImpl(
        at java.awt.EventQueue.access$500(
        at java.awt.EventQueue$
        at java.awt.EventQueue$
        at Method)
        at java.awt.EventQueue.dispatchEvent(
        at com.intellij.ide.IdeEventQueue.dispatchEvent(
        at java.awt.EventDispatchThread.pumpOneEventForFilters(
        at java.awt.EventDispatchThread.pumpEventsForFilter(
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(
        at java.awt.EventDispatchThread.pumpEvents(
        at java.awt.EventDispatchThread.pumpEvents(

    EDIT: forgot to mention the workaround appears to not work anymore.

  2. Chip

    Would love to see this plugin working in CLion. If there is anything I can do to assist please let me know.

  3. clion-support reporter

    Could you please provide this alternative version of plugin? Otherwize it would be difficult to test it with IDE.


  4. JonA repo owner

    I have updated the plugin. You can update withing CLion to get the latest. Please report any issues, consider this an experimental feature.

  5. Marc Lehmkühler

    This issue reappeared in 1.0.97-145-163 when CLion 2016.2.3 is installed with an initial configuration. A workaround was to downgrade to 1.0.96-145-163 then configure a Lua interpreter and then updating the plugin.

  6. Log in to comment