Skip to content

Commit

Permalink
Rename packages, fix incorrect unpack for linux and macos, add suppor…
Browse files Browse the repository at this point in the history
…t unpack xz archives

Signed-off-by: Konstantin Zaitsev <[email protected]>
  • Loading branch information
kosz78 committed Dec 17, 2024
1 parent 0be8fa7 commit ed86b9d
Show file tree
Hide file tree
Showing 20 changed files with 279 additions and 195 deletions.
2 changes: 1 addition & 1 deletion .idea/modules.xml

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

2 changes: 1 addition & 1 deletion intellij.idea.community.main.iml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,6 @@
<orderEntry type="module" module-name="intellij.java.byteCodeViewer" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.vcs.github.json" scope="RUNTIME" />
<orderEntry type="module" module-name="redhat.lsp4ij" scope="RUNTIME" />
<orderEntry type="module" module-name="hulylabs.hulycode.lang-configurator" scope="RUNTIME" />
<orderEntry type="module" module-name="hulylabs.langconfigurator" scope="RUNTIME" />
</component>
</module>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,38 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="intellij.platform.lang" />
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
<orderEntry type="module" module-name="intellij.platform.ide.util.io" />
<orderEntry type="module" module-name="intellij.platform.execution.impl" />
<orderEntry type="module" module-name="intellij.platform.analysis.impl" />
<orderEntry type="module" module-name="intellij.platform.util" />
<orderEntry type="module" module-name="redhat.lsp4ij" />
<orderEntry type="library" name="slf4j-api" level="project" />
<orderEntry type="module-library">
<library name="tukaani.xz" type="repository">
<properties include-transitive-deps="false" maven-id="org.tukaani:xz:1.10">
<verification>
<artifact url="file://$MAVEN_REPOSITORY$/org/tukaani/xz/1.10/xz-1.10.jar">
<sha256sum>95c63c1a55b22dd6453890a419cc1a640f790bbf7d8ae82db1e30aefefb08888</sha256sum>
</artifact>
</verification>
</properties>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/tukaani/xz/1.10/xz-1.10.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/tukaani/xz/1.10/xz-1.10-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/tukaani/xz/1.10/xz-1.10-sources.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="esotericsoftware.yamlbeans" type="repository">
<properties include-transitive-deps="false" maven-id="com.esotericsoftware.yamlbeans:yamlbeans:1.17">
Expand All @@ -34,7 +55,5 @@
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module" module-name="intellij.platform.util" />
<orderEntry type="module" module-name="intellij.platform.analysis.impl" />
</component>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<name>Huly Code Lang Configurator</name>
<category>Other Tools</category>
<id>hulylabs.hulycode.plugins.hulylangconfigurator</id>
<vendor>JetBrains</vendor>
<vendor>Huly Labs</vendor>
<description>
Configures languages support for opened files.
</description>
Expand All @@ -14,10 +14,10 @@

<extensions defaultExtensionNs="com.intellij">
<applicationService
id="hulylabs.hulycode.plugins.hulylangconfigurator.templates.HulyLanguageServerTemplateManager"
serviceImplementation="hulylabs.hulycode.plugins.hulylangconfigurator.templates.HulyLanguageServerTemplateManager"/>
id="com.hulylabs.intellij.plugins.langconfigurator.templates.HulyLanguageServerTemplateManager"
serviceImplementation="com.hulylabs.intellij.plugins.langconfigurator.templates.HulyLanguageServerTemplateManager"/>

<editorNotificationProvider implementation="hulylabs.hulycode.plugins.hulylangconfigurator.LanguageServerConfigSetupNotificationProvider"/>
<editorNotificationProvider implementation="com.hulylabs.intellij.plugins.langconfigurator.LanguageServerConfigSetupNotificationProvider"/>
<notificationGroup id="Language Server Configuration" displayType="BALLOON"/>
</extensions>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ programArgs:
binaryUrls:
windows-x86_64: "https://github.com/rust-lang/rust-analyzer/releases/download/2024-12-09/rust-analyzer-x86_64-pc-windows-msvc.zip"
windows-aarch64: "https://github.com/rust-lang/rust-analyzer/releases/download/2024-12-09/rust-analyzer-aarch64-pc-windows-msvc.zip"
unix-x86_64: "https://github.com/rust-lang/rust-analyzer/releases/download/2024-12-09/rust-analyzer-x86_64-unknown-linux-gnu.gz"
unix-aarch64: "https://github.com/rust-lang/rust-analyzer/releases/download/2024-12-09/rust-analyzer-aarch64-unknown-linux-gnu.gz"
linux-x86_64: "https://github.com/rust-lang/rust-analyzer/releases/download/2024-12-09/rust-analyzer-x86_64-unknown-linux-gnu.gz"
linux-aarch64: "https://github.com/rust-lang/rust-analyzer/releases/download/2024-12-09/rust-analyzer-aarch64-unknown-linux-gnu.gz"
mac-x86_64: "https://github.com/rust-lang/rust-analyzer/releases/download/2024-12-09/rust-analyzer-x86_64-apple-darwin.gz"
mac-aarch64: "https://github.com/rust-lang/rust-analyzer/releases/download/2024-12-09/rust-analyzer-aarch64-apple-darwin.gz"

binaryExecutable: "rust-analyzer"

mappingSettings:
- languageId: "rust"
fileType:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ mappingSettings:
patterns: ["*.ts"]
- languageId: typescriptreact
fileType:
name: ypeScript-React
name: TypeScript-React
patterns: ["*.tsx"]
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ programArgs:

binaryUrls:
windows-x86_64: "https://github.com/zigtools/zls/releases/download/0.13.0/zls-x86_64-windows.zip"
unix-x86_64: "https://github.com/zigtools/zls/releases/download/0.13.0/zls-x86_64-linux.tar.xz"
unix-aarch64: "https://github.com/zigtools/zls/releases/download/0.13.0/zls-aarch64-linux.tar.xz"
linux-x86_64: "https://github.com/zigtools/zls/releases/download/0.13.0/zls-x86_64-linux.tar.xz"
lunix-aarch64: "https://github.com/zigtools/zls/releases/download/0.13.0/zls-aarch64-linux.tar.xz"
mac-x86_64: "https://github.com/zigtools/zls/releases/download/0.13.0/zls-x86_64-macos.tar.xz"
mac-aarch64: "https://github.com/zigtools/zls/releases/download/0.13.0/zls-aarch64-macos.tar.xz"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
// Copyright © 2024 HulyLabs. Use of this source code is governed by the Apache 2.0 license.
package hulylabs.hulycode.plugins.hulylangconfigurator;
package com.hulylabs.intellij.plugins.langconfigurator;

import com.hulylabs.intellij.plugins.langconfigurator.templates.HulyLanguageServerTemplate;
import com.hulylabs.intellij.plugins.langconfigurator.templates.HulyLanguageServerTemplateManager;
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
import com.intellij.ide.util.PropertiesComponent;
import com.intellij.notification.NotificationGroup;
import com.intellij.notification.NotificationGroupManager;
import com.intellij.notification.NotificationType;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.fileEditor.FileEditor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
Expand All @@ -15,16 +18,14 @@
import com.intellij.ui.EditorNotificationProvider;
import com.intellij.ui.EditorNotifications;
import com.redhat.devtools.lsp4ij.LanguageServersRegistry;
import hulylabs.hulycode.plugins.hulylangconfigurator.templates.HulyLanguageServerTemplate;
import hulylabs.hulycode.plugins.hulylangconfigurator.templates.HulyLanguageServerTemplateManager;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.util.Locale;
import java.util.function.Function;

import static hulylabs.hulycode.plugins.hulylangconfigurator.messages.HulyLangConfiguratorBundle.message;
import static com.hulylabs.intellij.plugins.langconfigurator.messages.HulyLangConfiguratorBundle.message;


public class LanguageServerConfigSetupNotificationProvider implements EditorNotificationProvider {
Expand All @@ -35,7 +36,11 @@ public class LanguageServerConfigSetupNotificationProvider implements EditorNoti
@NotNull VirtualFile file) {
String ext = file.getExtension() != null ? file.getExtension().toLowerCase(Locale.ROOT) : "";
if (PropertiesComponent.getInstance(project).getBoolean(IGNORED_EXTS_KEY_PREFIX + ext)) return null;
HulyLanguageServerTemplate template = HulyLanguageServerTemplateManager.getInstance().getTemplate(project, file);

HulyLanguageServerTemplateManager manager = ApplicationManager.getApplication().getService(HulyLanguageServerTemplateManager.class);
if (manager == null) return null;

HulyLanguageServerTemplate template = manager.getTemplate(file);
if (template == null) return null;

if (LanguageServersRegistry.getInstance().isFileSupported(file, project)) return null;
Expand Down
Loading

0 comments on commit ed86b9d

Please sign in to comment.