Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diagnostics not work for v0.95.2 #333

Open
dongwa opened this issue Aug 8, 2023 · 1 comment
Open

diagnostics not work for v0.95.2 #333

dongwa opened this issue Aug 8, 2023 · 1 comment
Labels

Comments

@dongwa
Copy link
Contributor

dongwa commented Aug 8, 2023

Description:

update to 0.95.2, diagnostics not work

Affected Versions:
0.95.2
OS, DB, other environment details and versions:
macos

@dongwa dongwa added the Type/Bug label Aug 8, 2023
@brendanator
Copy link

I don't know if this is the source of your issue, but I've noticed that PreloadingActivity is no longer called in the latest versions of Intellij. In README.md, it suggests to use this but it has been replaced by StartupActivitiy (also deprecated) and ProjectActivity in later versions of Intellij. Here's how I approached it:

public class MyStartupActivity implements StartupActivity {
    private static boolean INITIALIZED_APPLICATION = false;

    /**
     * Called after each project is started
     */
    @Override
    public synchronized void runActivity(@NotNull Project project) {
        // Only initialize the application once
        if (!INITIALIZED_APPLICATION) {
            setupLsp();
            INITIALIZED_APPLICATION = true;
        }
    }

    private void setupLsp() {
        IntellijLanguageClient.addServerDefinition(new RawCommandServerDefinition("bal", new String[]{"path/to/launcher-script.sh"}));
    }

plugin.xml

        <postStartupActivity
                implementation="full.package.name.MyStartupActivity"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants