-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathlsp.xml
96 lines (88 loc) · 6.53 KB
/
lsp.xml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!--
~ Copyright (c) 2022, 2023 IBM Corporation.
~
~ This program and the accompanying materials are made available under the
~ terms of the Eclipse Public License v. 2.0 which is available at
~ http://www.eclipse.org/legal/epl-2.0.
~
~ SPDX-License-Identifier: EPL-2.0
-->
<idea-plugin>
<!-- Adapted from https://github.com/redhat-developer/intellij-quarkus/blob/2585eb422beeb69631076d2c39196d6eca2f5f2e/src/main/resources/META-INF/lsp.xml -->
<extensionPoints>
<extensionPoint name="server"
beanClass="io.openliberty.tools.intellij.lsp4mp.lsp4ij.ServerExtensionPointBean"/>
<extensionPoint name="languageMapping"
beanClass="io.openliberty.tools.intellij.lsp4mp.lsp4ij.LanguageMappingExtensionPointBean"/>
</extensionPoints>
<extensions defaultExtensionNs="open-liberty.intellij">
<!-- MicroProfile LS -->
<server id="lsp4mp" class="io.openliberty.tools.intellij.lsp4mp.lsp.MicroProfileServer"
clientImpl="io.openliberty.tools.intellij.lsp4mp.lsp.MicroProfileLanguageClient"
serverInterface="org.eclipse.lsp4mp.ls.api.MicroProfileLanguageServerAPI"/>
<languageMapping language="Properties" serverId="lsp4mp"
filePattern="**/{microprofile-config.properties,microprofile-config-?*.properties}"/>
<languageMapping language="JAVA" serverId="lsp4mp"/>
<!-- LemMinX LS with Liberty LemMinX ext -->
<!-- TODO changing the server interface to org.eclipse.lemminx.customservice.XMLLanguageClientAPI results in class cast exception -->
<server id="libertyXml" class="io.openliberty.tools.intellij.liberty.lsp.LibertyXmlServer"
clientImpl="io.openliberty.tools.intellij.liberty.lsp.LibertyXmlLanguageClient"
serverInterface="org.eclipse.lsp4mp.ls.api.MicroProfileLanguageServerAPI"/>
<languageMapping language="XML" serverId="libertyXml"/>
<!-- Liberty Config LS -->
<server id="libertyls" class="io.openliberty.tools.intellij.liberty.lsp.LibertyConfigLanguageServer"
clientImpl="io.openliberty.tools.intellij.liberty.lsp.LibertyConfigLanguageClient"
serverInterface="org.eclipse.lsp4mp.ls.api.MicroProfileLanguageServerAPI"/>
<languageMapping language="Properties" serverId="libertyls"
filePattern="**/{src/main/liberty/config,usr/servers/**}/{bootstrap.properties,server.env}"/>
<!-- Jakarta LS -->
<server id="jakartals" class="io.openliberty.tools.intellij.lsp4jakarta.lsp.JakartaLanguageServer"
clientImpl="io.openliberty.tools.intellij.lsp4jakarta.lsp.JakartaLanguageClient"
serverInterface="org.eclipse.lsp4mp.ls.api.MicroProfileLanguageServerAPI"/>
<languageMapping language="JAVA" serverId="jakartals"/>
</extensions>
<extensions defaultExtensionNs="com.intellij">
<fileType name="server.env" language="TEXT"
implementationClass="io.openliberty.tools.intellij.liberty.lsp.ServerEnvFileType"/>
<!-- Language substitutor for server.env files, treat server.env files as Properties files to get Liberty Config LS capabilities -->
<lang.substitutor language="TEXT"
implementationClass="io.openliberty.tools.intellij.liberty.lsp.ServerEnvSubstitutor"/>
<!-- Suppress certain Properties language inspections on server.env files -->
<lang.inspectionSuppressor language="Properties"
implementationClass="io.openliberty.tools.intellij.liberty.lsp.ServerEnvInspectionSuppressor"/>
<!-- Completion support for all language servers -->
<completion.contributor id="LSPCompletionContributor" language="any"
implementationClass="io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.completion.LSContentAssistProcessor"
order="first"/>
<!-- Diagnostic support for all language servers -->
<inspectionToolProvider
implementation="io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.diagnostics.LSPInspectionToolProvider"/>
<projectService serviceImplementation="io.openliberty.tools.intellij.lsp4mp.lsp4ij.LanguageServiceAccessor"/>
<!-- TODO re-enable goto handler -->
<!-- <gotoDeclarationHandler
implementation="io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.navigation.LSPGotoDeclarationHandler"/> -->
<!-- Hover for LemMinX + Liberty LemMinX ext -->
<lang.documentationProvider id="LSPTextHoverXML" language="XML"
implementationClass="io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.hover.LSPTextHover"
order="first"/>
<!-- Hover for Liberty Config LS bootstrap.properties and LSP4MP microprofile-config.properties -->
<lang.documentationProvider id="LSPTextHoverProperties" language="Properties"
implementationClass="io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.hover.LSPTextHover"
order="first"/>
<!-- Hover for Java files, LSP4MP and LSP4Jakarta -->
<lang.documentationProvider id="LSPTextHoverJAVA" language="JAVA"
implementationClass="io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.hover.LSPTextHover"
order="first"/>
<codeInsight.inlayProvider language="JAVA"
implementationClass="io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.codelens.LSPInlayProvider"/>
<externalAnnotator language="XML" implementationClass="io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.diagnostics.LSPDiagnosticAnnotator"/>
<externalAnnotator language="TEXT" implementationClass="io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.diagnostics.LSPDiagnosticAnnotator"/>
<externalAnnotator language="Properties" implementationClass="io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.diagnostics.LSPDiagnosticAnnotator"/>
<externalAnnotator language="JAVA" implementationClass="io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.diagnostics.LSPDiagnosticAnnotator"/>
</extensions>
<project-components>
<component>
<implementation-class>io.openliberty.tools.intellij.lsp4mp.lsp4ij.ConnectDocumentToLanguageServerSetupParticipant</implementation-class>
</component>
</project-components>
</idea-plugin>