Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ pluginRepositoryUrl = https://github.com/nadlejs/intellij-plugin
pluginVersion = 0.0.2

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 242
pluginSinceBuild = 251
pluginUntilBuild = 253.*

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = IU
platformVersion = 2024.2.5
platformVersion = 2025.1.3

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"devDependencies": {
"@nadle/language-server": "0.0.2"
"@nadle/language-server": "https://pkg.pr.new/nadlejs/nadle/@nadle/language-server@bd64301"
}
}
11 changes: 6 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ import com.github.nadlejs.intellij.plugin.run.NadleTask
import com.github.nadlejs.intellij.plugin.run.NadleTaskRunner
import com.github.nadlejs.intellij.plugin.run.NadleTaskScanner
import com.github.nadlejs.intellij.plugin.util.NadleIcons
import com.intellij.ide.actions.searcheverywhere.FoundItemDescriptor
import com.intellij.ide.actions.searcheverywhere.WeightedSearchEverywhereContributor
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.ide.actions.searcheverywhere.SearchEverywhereContributor
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.project.Project
import com.intellij.psi.codeStyle.MinusculeMatcher
import com.intellij.psi.codeStyle.NameUtil
import com.intellij.util.Processor
import java.awt.Component
Expand All @@ -20,7 +17,7 @@ import javax.swing.ListCellRenderer

class NadleTaskSearchEverywhereContributor(
private val project: Project
) : WeightedSearchEverywhereContributor<NadleTask> {
) : SearchEverywhereContributor<NadleTask> {

override fun getSearchProviderId(): String = javaClass.name

Expand Down Expand Up @@ -55,10 +52,19 @@ class NadleTaskSearchEverywhereContributor(

override fun getDataForItem(element: NadleTask, dataId: String): Any? = null

override fun fetchWeightedElements(
override fun processSelectedItem(
selected: NadleTask,
modifiers: Int,
searchText: String
): Boolean {
NadleTaskRunner.run(project, selected)
return true
}

override fun fetchElements(
pattern: String,
progressIndicator: ProgressIndicator,
consumer: Processor<in FoundItemDescriptor<NadleTask>>
consumer: Processor<in NadleTask>
) {
val basePath = project.basePath ?: return
val tasks = NadleTaskScanner.scanTasksDetailed(Path.of(basePath))
Expand All @@ -72,28 +78,8 @@ class NadleTaskSearchEverywhereContributor(
for (task in tasks) {
progressIndicator.checkCanceled()
if (matcher == null || matcher.matches(task.name)) {
val weight = matcher?.matchingDegree(task.name) ?: 0
consumer.process(FoundItemDescriptor(task, weight))
consumer.process(task)
}
}
}

override fun processSelectedItem(
selected: NadleTask,
modifiers: Int,
searchText: String
): Boolean {
NadleTaskRunner.run(project, selected)
return true
}

override fun fetchElements(
pattern: String,
progressIndicator: ProgressIndicator,
consumer: Processor<in NadleTask>
) {
fetchWeightedElements(pattern, progressIndicator) { descriptor ->
consumer.process(descriptor.item)
}
}
}
5 changes: 1 addition & 4 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<description><![CDATA[
Integrates Nadle task execution into IntelliJ IDEA.<br/>
Adds run icons to <code>tasks.register("name", fn)</code> definitions and enables direct execution.<br/>
Provides language intelligence (diagnostics, completions, hover, go-to-definition) for <code>nadle.config.*</code> files via the Nadle Language Server.<br/>
Provides language intelligence (diagnostics, completions, hover, go-to-definition, find usages) for <code>nadle.config.*</code> files via the Nadle Language Server.<br/>
Works seamlessly with <code>nadle.config.ts</code>, <code>nadle.config.js</code>, and other supported extensions.
]]></description>

Expand All @@ -29,9 +29,6 @@
<postStartupActivity
implementation="com.github.nadlejs.intellij.plugin.run.NadleTaskExecutionListener"/>

<gotoDeclarationHandler
implementation="com.github.nadlejs.intellij.plugin.navigation.NadleTaskGotoDeclarationHandler"/>

<platform.lsp.serverSupportProvider
implementation="com.github.nadlejs.intellij.plugin.lsp.NadleLspServerSupportProvider"/>

Expand Down
Loading