Giter VIP home page Giter VIP logo

jetbrains-just-plugin's Introduction

JetBrains Just plugin

JetBrains Just Command Runner Plugin is a plugin to integrate just commander in JetBrains IDEs.

Plugin features:

  • Just language and file types
  • Syntax high light
  • Run recipes
  • New justfile by project type, such as Maven/Gradle
  • Code completion: settings names, recipe dependencies, variables with dotenv support
  • Navigation for dependency name
  • Language injection for shell
  • Justfile structure view

How to use?

  • Download and install just command line from https://github.com/casey/just/releases
  • Install JetBrains Just plugin
  • Invoke 'Justfile' item from New file group, and a justfile file will be created with following code:
#!/usr/bin/env just --justfile
                    
hello:
  echo "hello world"
  • Click run button in Gutter and run a recipe/target!

Quick to understand justfile, please click Justfile cheat sheet

References

jetbrains-just-plugin's People

Contributors

hxhelm avatar linux-china avatar scottmmjackson avatar sebdotv avatar wyatt-herkamp 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

Watchers

 avatar  avatar  avatar

jetbrains-just-plugin's Issues

Only 80 columns used on Windows

When I run a recipe from within the editor, the output only uses 80 columns. I am not sure what the issue is, but I suspect it has to do with how the plugin launches the command. See screenshot.

image

IntelliJ plugin crash, no longer works

The plugin stopped working all of a sudden, possibly with the latest IntelliJ update:

java.lang.NullPointerException
	at org.mvnsearch.plugins.just.ide.action.NewJustfileAction.actionPerformed(NewJustfileAction.kt:114)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:339)
	at com.intellij.ide.actions.GotoActionAction.lambda$performActionImpl$4(GotoActionAction.java:90)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:362)
	at com.intellij.ide.actions.GotoActionAction.performActionImpl(GotoActionAction.java:89)
	at com.intellij.ide.actions.GotoActionAction.lambda$performAction$2(GotoActionAction.java:69)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:208)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:190)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
	at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:478)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:121)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:690)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:593)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:593)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:997)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:997)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Plugin doesn't understand escaped line breaks in dependencies

Escaping line breaks in recipe dependencies with \ works fine

default: hello\
world

hello:
  @ echo "hello"

world:
  @ echo "world"
$ just 
hello
world

However, if you copy the justfile snippet above into a new scratch buffer named justfile, it produces the following error located on the \ character:

JustToken.ATTRIBUTE, JustToken.COMMENT, JustToken.KEYWORD_ALIAS, JustToken.KEYWORD_EXPORT, JustToken.KEYWORD_MOD, JustToken.KEYWORD_SET, JustToken.NEW_LINE, JustToken.RECIPE_NAME, JustToken.SHEBANG or JustToken.VARIABLE expected, got '\'

New Justfile action overwrites existing file without prompt

When attempting to create a new Justfile via File > New > Justfile there is no check performed for an existing Justfile.

Ideally, there should be a prompt to choose an action ( cancel, rename, overwrite), or at the very least prefix the filename newfile.just.

Thanks.

Missing syntax support

Example:

export VAR_A := "a b c"
export VAR_AB := VAR_A + " d e f"

The parser gives an error here between VAR_A and +:

JustToken.COMMENT, JustToken.KEYWORD_ALIAS, JustToken.KEYWORD_EXPORT, JustToken.KEYWORD_SET, JustToken.NEW_LINE, JustToken.RECIPE_NAME, JustToken.SHEBANG or JustToken.VARIABLE expected

I'm using 0.2.1 with GoLand 2022.1.

If/Else blocks without spaces surrounding commands aren't highlighted correctly

I've noticed that missing spaces around if/else blocks cause the rest of the file to not be parsed correctly. I've done some experimenting with the line that breaks it and found a minimal setup that replicates, as shown in the image.

image

I'm on PyCharm 2023.1.3 and using plugin version 0.3.6.

Here's the above in text in case it helps to replicate

thingy := if `true` { `ls` } else { "ls" }
thingy := if `true` {`ls` } else { "ls" }
thingy := if `true` { `ls` } else { "ls"}
thingy := if `true` {`ls`} else {"ls"}
# also not highlighted until next valid block
thingy := if `true` {`ls` } else { "ls" }
# Is highlighted

expressions in recipe dependencies not supported

Hi, thanks for this awesome plugin.

I discovered if I add an expression on a recipe dependency, the plugin will flag it as an error, even though the just tool accepts it.

Example:

hello WHO='world': (echo 'Hello '+WHO)

echo MSG:
    echo '{{MSG}}'

The plugin will flag the + in the hello recipe as an error. I can execute just hello and it will be successfully executed.

Feature: Running just recipes as Run configuration

there's a review on your plugin that speaks from my heart:

Does what it says on the tin. The only thing that I wasn't able to find was a way to add the Justfile runs to my run/debug configurations. I'm used to being able to click the arrow in the file and then find it in my debug configs when I use npm. I also didn't see a configuration when I tried manually adding it. This would be a really appreciated feature.

i assume that is expressing what i'm missing: to use just recipes as configuration option in "Run(/Debug) Configurations", similar how the "Makefile Target" can be used there.

that'd just be a tailored way to invoke recipes than the "Run -> Available Just Recipes".

for me this has three advantages:

  • i can keep my beahviour to use the Run Configuration widgets in the main IDE window w/o using an extra menu
  • in this context i run just a few selected recipes, not every recipe from the Justfile
  • and of course, the Run Configurations let's you select from any kind of task / test / whatever runner; so one can invoke these from one widget

Feature request: syntax highlighting / inspection for inline shell scripts

The Jetbrains Makefile plugin uses the "Shell script" language syntax highlighting and inspections for inline shell scripts in recipes.

Would be neat if this plugin could do the same.

Unfortunately I have no clue about programming Jetbrains plugins, but some relevant piece of code in the Makefile plugin seems to be this:

https://github.com/JetBrains/intellij-plugins/blob/0f07ca63355d5530b441ca566c98f17c560e77f8/makefile/src/com/jetbrains/lang/makefile/MakefileShellLanguageInjector.kt#L11

Support 2024.1

IntelliJ's new EAP is live with the 2024.1 version.

Is it possible to support the new version? Can the plugin be built for newer versions like without an end version to overcome these small upgrades for newer versions if the plugin API does not change?

Document is locked by write PSI operations

Recently started getting exception from the Ruff plugin (0.0.29) when editing any file (not even justfile).

Don't really have any specific reproduction steps, I just edit any file in my jetbrains idea (Pycharm) and at some point exception occurs.

java.lang.RuntimeException: Document is locked by write PSI operations. Use PsiDocumentManager.doPostponedOperationsAndUnblockDocument() to commit PSI changes to the document.
Unprocessed elements: Py:IMPORT_ELEMENT(81,86), WHITE_SPACE(0,1), WHITE_SPACE(86,87), Py:COMMA(79,80), WHITE_SPACE(80,81)
	at com.intellij.psi.impl.source.PostprocessReformattingAspectImpl.assertDocumentChangeIsAllowed(PostprocessReformattingAspectImpl.java:333)
	at com.intellij.psi.impl.PsiDocumentManagerImpl.beforeDocumentChangeOnUnlockedDocument(PsiDocumentManagerImpl.java:125)
	at com.intellij.psi.impl.PsiDocumentManagerBase.beforeDocumentChange(PsiDocumentManagerBase.java:918)
	at jdk.internal.reflect.GeneratedMethodAccessor245.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:119)
	at com.intellij.util.EventDispatcher.lambda$createMulticaster$1(EventDispatcher.java:84)
	at jdk.proxy2/jdk.proxy2.$Proxy96.beforeDocumentChange(Unknown Source)
	at com.intellij.openapi.editor.impl.DocumentImpl.lambda$beforeChangedUpdate$0(DocumentImpl.java:872)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeNonCancelableSection$2(CoreProgressManager.java:228)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$computeInNonCancelableSection$3(CoreProgressManager.java:236)
	at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:57)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:236)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:227)
	at com.intellij.openapi.editor.impl.DocumentImpl.beforeChangedUpdate(DocumentImpl.java:869)
	at com.intellij.openapi.editor.impl.DocumentImpl.updateText(DocumentImpl.java:808)
	at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:654)
	at com.intellij.openapi.editor.impl.DocumentImpl.lambda$setText$3(DocumentImpl.java:1076)
	at com.intellij.openapi.editor.impl.DocumentImpl.setText(DocumentImpl.java:1078)
	at com.koxudaxi.ruff.RuffApplyService$write$1$1.invoke$lambda$0(RuffApplyService.kt:32)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.runUndoTransparentAction(CoreCommandProcessor.java:382)
	at com.koxudaxi.ruff.RuffApplyService$write$1$1.invoke(RuffApplyService.kt:30)
	at com.koxudaxi.ruff.RuffApplyService$write$1$1.invoke(RuffApplyService.kt:29)
	at com.intellij.openapi.application.ActionsKt.runWriteAction$lambda$0(actions.kt:16)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runWriteAction$8(ApplicationImpl.java:984)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:963)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
	at com.intellij.openapi.application.ActionsKt.runWriteAction(actions.kt:16)
	at com.koxudaxi.ruff.RuffApplyService$write$1.invoke(RuffApplyService.kt:29)
	at com.koxudaxi.ruff.RuffApplyService$write$1.invoke(RuffApplyService.kt:28)
	at com.intellij.openapi.application.ActionsKt.runInEdt(actions.kt:56)
	at com.intellij.openapi.application.ActionsKt.runInEdt$default(actions.kt:53)
	at com.koxudaxi.ruff.RuffApplyService.write(RuffApplyService.kt:28)
	at com.koxudaxi.ruff.RuffApplyService.apply(RuffApplyService.kt:48)
	at com.koxudaxi.ruff.RuffFileDocumentManagerListener.beforeDocumentSaving(RuffFileDocumentManagerListener.kt:20)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:700)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:660)
	at com.intellij.util.messages.impl.MessageBusImplKt.executeOrAddToQueue(MessageBusImpl.kt:492)
	at com.intellij.util.messages.impl.ToDirectChildrenMessagePublisher.publish$intellij_platform_core(CompositeMessageBus.kt:310)
	at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:449)
	at jdk.proxy2/jdk.proxy2.$Proxy25.beforeDocumentSaving(Unknown Source)
	at jdk.internal.reflect.GeneratedMethodAccessor389.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.multiCast(FileDocumentManagerImpl.java:174)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$new$0(FileDocumentManagerImpl.java:130)
	at jdk.proxy2/jdk.proxy2.$Proxy25.beforeDocumentSaving(Unknown Source)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$doSaveDocumentInWriteAction$3(FileDocumentManagerImpl.java:423)
	at com.intellij.pom.core.impl.PomModelImpl.guardPsiModificationsIn(PomModelImpl.java:321)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.doSaveDocumentInWriteAction(FileDocumentManagerImpl.java:422)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$doSaveDocument$2(FileDocumentManagerImpl.java:375)
	at com.intellij.openapi.application.WriteAction.lambda$run$1(WriteAction.java:85)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:963)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:989)
	at com.intellij.openapi.application.WriteAction.run(WriteAction.java:84)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.doSaveDocument(FileDocumentManagerImpl.java:375)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveDocument(FileDocumentManagerImpl.java:324)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveDocument(FileDocumentManagerImpl.java:313)
	at com.intellij.formatting.service.AsyncDocumentFormattingService$FormattingRequestImpl.<init>(AsyncDocumentFormattingService.java:180)
	at com.intellij.formatting.service.AsyncDocumentFormattingService.formatDocument(AsyncDocumentFormattingService.java:75)
	at com.intellij.formatting.service.AbstractDocumentFormattingService.formatElement(AbstractDocumentFormattingService.java:47)
	at com.intellij.formatting.service.AbstractDocumentFormattingService.formatElement(AbstractDocumentFormattingService.java:31)
	at com.intellij.formatting.service.FormattingServiceUtil.formatElement(FormattingServiceUtil.java:67)
	at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.reformat(CodeStyleManagerImpl.java:79)
	at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.reformat(CodeStyleManagerImpl.java:63)
	at com.jetbrains.python.codeInsight.imports.AddImportHelper.addNameToFromImportStatement(AddImportHelper.java:779)
	at com.jetbrains.python.codeInsight.imports.AddImportHelper.addOrUpdateFromImportStatement(AddImportHelper.java:711)
	at com.jetbrains.python.codeInsight.imports.ImportFromExistingAction.addImportStatement(ImportFromExistingAction.java:169)
	at com.jetbrains.python.codeInsight.imports.ImportFromExistingAction.doIt(ImportFromExistingAction.java:119)
	at com.jetbrains.python.codeInsight.imports.ImportFromExistingAction.lambda$doWriteAction$1(ImportFromExistingAction.java:199)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:144)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:975)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:142)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:225)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:187)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:151)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:118)
	at com.jetbrains.python.codeInsight.imports.ImportFromExistingAction.doWriteAction(ImportFromExistingAction.java:199)
	at com.jetbrains.python.codeInsight.imports.ImportFromExistingAction.lambda$selectSourceAndDo$0(ImportFromExistingAction.java:110)
	at org.jetbrains.concurrency.AsyncPromise.onSuccess$lambda$3(AsyncPromise.kt:87)
	at org.jetbrains.concurrency.AsyncPromise$whenComplete$1.invoke(AsyncPromise.kt:114)
	at org.jetbrains.concurrency.AsyncPromise$whenComplete$1.invoke(AsyncPromise.kt:112)
	at org.jetbrains.concurrency.AsyncPromise.whenComplete$lambda$6(AsyncPromise.kt:112)
	at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
	at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
	at org.jetbrains.concurrency.AsyncPromise.setResult(AsyncPromise.kt:188)
	at com.jetbrains.python.codeInsight.imports.PyImportChooser.lambda$selectImport$0(PyImportChooser.java:40)
	at com.intellij.ui.popup.PopupListAdapter.lambda$setItemChosenCallback$0(PopupListAdapter.java:57)
	at com.intellij.openapi.ui.popup.PopupChooserBuilder.lambda$setItemChosenCallback$0(PopupChooserBuilder.java:206)
	at com.intellij.ui.popup.AbstractPopup.lambda$dispose$18(AbstractPopup.java:1733)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.lambda$doWhenFocusSettlesDown$3(FocusManagerImpl.java:169)
	at com.intellij.util.ui.EdtInvocationManager.invokeLaterIfNeeded(EdtInvocationManager.java:33)
	at com.intellij.ide.IdeEventQueue.ifFocusEventsInTheQueue(IdeEventQueue.kt:220)
	at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.kt:186)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:165)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:159)
	at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1731)
	at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:130)
	at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:162)
	at com.intellij.openapi.util.Disposer.dispose(Disposer.java:250)
	at com.intellij.ui.popup.AbstractPopup.cancel(AbstractPopup.java:908)
	at com.intellij.ui.popup.AbstractPopup.closeOk(AbstractPopup.java:842)
	at com.intellij.openapi.ui.popup.PopupChooserBuilder.closePopup(PopupChooserBuilder.java:500)
	at com.intellij.openapi.ui.popup.PopupChooserBuilder$2.actionPerformed(PopupChooserBuilder.java:489)
	at java.desktop/javax.swing.JComponent$ActionStandin.actionPerformed(JComponent.java:3486)
	at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1810)
	at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2943)
	at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:3005)
	at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2905)
	at java.desktop/java.awt.Component.processEvent(Component.java:6434)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
	at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:886)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1166)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1023)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:849)
	at com.intellij.ide.IdeKeyboardFocusManager.access$dispatchEvent$s1569605750(IdeKeyboardFocusManager.kt:18)
	at com.intellij.ide.IdeKeyboardFocusManager$dispatchEvent$1.invoke(IdeKeyboardFocusManager.kt:25)
	at com.intellij.ide.IdeKeyboardFocusManager$dispatchEvent$1.invoke(IdeKeyboardFocusManager.kt:25)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
	at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.kt:25)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4904)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2809)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:794)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:766)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:764)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:763)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:695)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.kt:623)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$11(IdeEventQueue.kt:581)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:75)
	at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:67)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:581)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:72)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:355)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:354)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:354)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:349)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:848)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:391)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

[Feature Request] - Popup menu for executing Just recipes

With the Maven Helper plugin the IDEA is getting a cool feature, by pressing down the Ctrl+Alt+Shift+R (a bit long shortcut) a popup will appear with the available goals and if there is any Run configurations for the Root module it will be also shown.

Here is a picture:
image

Is there any way to have this noice feature in the Just plugin as well? I have a few bookmarks for my Just recipes to jump there but it would be nice to have a "quicker" way to execute those recipes.

No support for && syntax

Everything works fine with pre-recipe syntax.
Example:

rf: pre_recipe
    echo "rf"

pre_recipe:
    echo "pre"

But the Just plugin breaks when using "Running Recipes at the End of a Recipe" syntax.
For example:

rf: && open_result
    echo "rf"

open_result:
    echo "post"

At line 1 where && is used. With the error:

JustToken.COMMENT, JustToken.KEYWORD_ALIAS, JustToken.KEYWORD_EXPORT, JustToken.KEYWORD_SET, JustToken.NEW_LINE, JustToken.RECIPE_NAME, JustToken.SHEBANG or JustToken.VARIABLE expected, got '&'

Thanks for your work. I really appreciate having a just plugin in JetBrains IDEs

Syntax highlighting fails with double quotes inside triple quotes

JetBrains Just plugin version: 0.4.1

When using double quotes inside triple backticks, the syntax is incorrect. A picture is worth a thousand words.

image

Removing the double quotes in the first block makes the syntax highlighter happy!

image

Here's the text for testing.

set positional-arguments := true
set shell := ['nu', '-c']
set export := true

export SOME_DIR := "some/dir"

export NU_VAR := ```
		$nu
		print $"Hello World"
		let $something = "nothing"
		$nu
	```

# Require a command to be available
[private]
require-command command:
	#!/usr/bin/env nu
	print $" '{{ command }}' "

Some of the other issues mention the need for rewriting the lexer and/or token analyzer to fix parsing issues. I understand if that's the case for this issue as well.

Thanks for an awesome plugin!

执行报错了,怎么提前执行 conda activtate pythonenv 呢?

我在 pycharm 上写了这么一个脚本,安装 python 开发依赖的,但是 python 需要提前激活虚拟环境,否则点击绿色按钮全都报错了。

image

直接再命令行上执行 just dev 是可以的。但这绿色小按钮似乎成了鸡肋,全部执行报错。

类似的开发环境管理有:condapipnvmsdk 等等。

我是 windows 上的使用的。

Icon looks out of place

Thanks for the incredible plugin. I just wanted to point out that the icon for the Justfile (the black circle with 2 dots) looks out of place when compared with the other icons.

Screenshot 2022-04-29 at 5 02 36 AM

Can we use some icon from JetBrains' default set of icons? They have a lot of good ones that can meaningfully convey a task runner file. In fact, the icon for a plain file AllIcons.FileTypes.Any_type with a superimposed green run icon AllIcons.Nodes.RunnableMark would look pretty decent.

Justfile no longer works, but no errors are reported

All of my justfiles no longer work in IntelliJ 2023.2.4, even after the bug fix reported in #16 (just plugin 0.3.7). The justfile is shown in a regular gray text without highlighting, and no special features (like jumping to variables, etc).

There are no alerts of any sort being shown

Import statement causes syntax error

The following justfile contents are valid and work as expected, yet the plugin marks the import statement as an error and breaks the Plugin for the current file.

image

Justfile icon too small

The justfile icon is smaller than the regular icon size. File names are not aligning correctly.
Screenshot 2023-06-22 at 8 09 17 PM

Parse error for recipes with blank lines

When using the plugin, blank lines in recipes are marked as an error although just accepts them quite fine.

justfile to reproduce:

with-blank-line:
	echo this

	echo that

without-blank-line:
	echo this
	echo that

Both recipes execute, but the plugin marks the first echo that line with an error.

line breaks marked as error

The following justfile is valid and works fine for me, but it gets flagged with an error in the IDE:

VERSION := `git describe --tags --dirty 2> /dev/null || echo v0`
REVISION := `git rev-parse --short HEAD 2> /dev/null || echo 0`
BUILD_DATE := `date +'%FT%T%z'`

LDFLAGS := '-ldflags "-X gitlab.com/foo/random/global.Version=' + VERSION \
            + ' -X gitlab.com/foo/random/global.Revision=' + REVISION \
            + ' -X gitlab.com/foo/random/global.BuildDate=' + BUILD_DATE + ' -w -s"'

default:
    @just --list --justfile {{ justfile() }}

build:
    @echo {{ LDFLAGS }}
    GOARCH=arm64 GOOS=darwin go build -o build/random_{{ VERSION }}_darwin_arm64 {{ LDFLAGS }} main.go

image

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.