-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplugin.py
More file actions
31 lines (23 loc) · 852 Bytes
/
Copy pathplugin.py
File metadata and controls
31 lines (23 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from __future__ import annotations
from LSP.plugin import LspPlugin
from LSP.plugin import OnPreStartContext
from lsp_utils import NodeManager
from pathlib import Path
from sublime_lib import ResourcePath
from typing_extensions import override
def plugin_loaded():
LspPrismaPlugin.register()
def plugin_unloaded():
LspPrismaPlugin.unregister()
class LspPrismaPlugin(LspPlugin):
@classmethod
@override
def on_pre_start_async(cls, context: OnPreStartContext) -> None:
package_name = cls.plugin_storage_path.name
NodeManager.on_pre_start_async(
context,
cls.plugin_storage_path,
ResourcePath("Packages", package_name, "language-server"),
Path("node_modules", "@prisma", "language-server", "dist", "bin.js"),
node_version_requirement=">=20",
)