{"id":380356,"date":"2023-08-16T03:00:00","date_gmt":"2023-08-16T02:00:00","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=platform&#038;p=380356"},"modified":"2023-08-16T03:00:01","modified_gmt":"2023-08-16T02:00:01","slug":"lsp-for-plugin-developers","status":"publish","type":"platform","link":"https:\/\/blog.jetbrains.com\/zh-hans\/platform\/2023\/08\/lsp-for-plugin-developers\/","title":{"rendered":"\u9762\u5411\u63d2\u4ef6\u5f00\u53d1\u8005\u7684\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae"},"content":{"rendered":"<p><a href=\"https:\/\/microsoft.github.io\/language-server-protocol\/\" target=\"_blank\" rel=\"noopener\">\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae<\/a> (LSP) \u662f Microsoft \u5f00\u53d1\u7684\u4e00\u9879\u5f00\u653e\u6807\u51c6\u534f\u8bae\uff0c\u7528\u4e8e\u5f00\u53d1\u5de5\u5177\u4e0e\u8bed\u8a00\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u901a\u4fe1\u3002 \u6211\u4eec\u5c06 LSP \u6574\u5408\u5230 IntelliJ \u5e73\u53f0\uff0c\u4f7f\u63d2\u4ef6\u5f00\u53d1\u8005\u80fd\u591f\u4f7f\u7528\u7279\u5b9a LSP \u670d\u52a1\u5668\u96c6\u6210\u5f15\u5165\u81ea\u5b9a\u4e49\u8bed\u8a00\u652f\u6301\u3002 \u8bed\u8a00\u670d\u52a1\u5668\u53ef\u4ee5\u63d0\u4f9b\u9488\u5bf9\u7279\u5b9a\u8bed\u8a00\u7684\u529f\u80fd\uff0c\u4f8b\u5982\u4ee3\u7801\u8865\u5168\u3001\u6587\u6863\u548c\u683c\u5f0f\u8bbe\u7f6e\uff0c\u8fd9\u6bd4\u4ece\u5934\u5f00\u59cb\u5b9e\u73b0\u8bed\u8a00\u652f\u6301\u8981\u5bb9\u6613\u5f97\u591a\uff0c\u7701\u65f6\u7701\u529b\u3002 \u5b83\u8fd8\u51cf\u5c11\u4e86\u6301\u7eed\u7ef4\u62a4\u548c\u8ddf\u8e2a\u76f8\u5173\u8bed\u8a00\u4e0e\u5de5\u5177\u66f4\u6539\u7684\u9700\u8981\uff0c\u4f7f\u4e0d\u540c\u5f00\u53d1\u73af\u5883\u66f4\u6613\u83b7\u5f97\u4e00\u81f4\u7684\u8bed\u8a00\u652f\u6301\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u4f46\u662f\uff0c\u8bf7\u8bb0\u4f4f\uff0c\u4e0e\u5904\u7406\u548c\u5448\u73b0\u8bed\u8a00\u670d\u52a1\u5668\u63d0\u4f9b\u7684\u6570\u636e\u76f8\u6bd4\uff0cIntelliJ \u5e73\u53f0\u63d0\u4f9b\u7684\u89c4\u8303<a href=\"https:\/\/plugins.jetbrains.com\/docs\/intellij\/custom-language-support.html\" target=\"_blank\" rel=\"noopener\">\u81ea\u5b9a\u4e49\u8bed\u8a00\u652f\u6301<\/a>\u4ecd\u7136\u63d0\u4f9b\u4e86\u4e0e IDE \u529f\u80fd\u66f4\u5e7f\u6cdb\u7684\u96c6\u6210\u3002 \u56e0\u6b64\uff0cLSP \u65b9\u5f0f\u4e0d\u5e94\u88ab\u89c6\u4e3a\u73b0\u6709\u8bed\u8a00 API \u7684\u66ff\u4ee3\u65b9\u6848\uff0c\u800c\u5e94\u88ab\u89c6\u4e3a\u9644\u52a0\u503c\u3002<\/p>\n<p>\u4ece 2023.2 \u53d1\u5e03\u5468\u671f\u5f00\u59cb\uff0cLSP API \u4f5c\u4e3a IntelliJ \u5e73\u53f0\u7684\u4e00\u90e8\u5206\u5728\u4ee5\u4e0b IDE \u4e2d\u516c\u5f00\u63d0\u4f9b\uff1a<\/p>\n<ul>\n<li>IntelliJ IDEA Ultimate<\/li>\n<li>WebStorm<\/li>\n<li>PhpStorm<\/li>\n<li>PyCharm Professional<\/li>\n<li>DataSpell<\/li>\n<li>RubyMine<\/li>\n<li>CLion<\/li>\n<li>Aqua<\/li>\n<li>DataGrip<\/li>\n<li>GoLand<\/li>\n<li>Rider<\/li>\n<\/ul>\n<p>\u4e0b\u9762\u51e0\u90e8\u5206\u5c06\u89e3\u91ca\u5982\u4f55\u6784\u5efa\u4e0e\u8bed\u8a00\u670d\u52a1\u5668\u7684\u7b80\u5355\u96c6\u6210\uff0c\u53d1\u73b0\u53ef\u7528\u7684\u529f\u80fd\u548c\u6587\u6863\uff0c\u4ee5\u53ca\u4e86\u89e3\u57fa\u4e8e IntelliJ \u7684 IDE \u4e2d LSP \u652f\u6301\u7684\u5f53\u524d\u72b6\u6001\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u63d2\u4ef6\u914d\u7f6e<\/h2>\n<p>\u4e3a\u4e86\u5728\u57fa\u4e8e Gradle \u6784\u5efa\u7cfb\u7edf\u7684\u7b2c\u4e09\u65b9\u63d2\u4ef6\u4e2d\u5145\u5206\u5229\u7528\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae API\uff0c\u6211\u4eec\u5efa\u8bae\u5c06 <a href=\"https:\/\/github.com\/JetBrains\/gradle-intellij-plugin\" target=\"_blank\" rel=\"noopener\">Gradle IntelliJ Plugin<\/a> \u5347\u7ea7\u5230 1.15.0 \u6216\u66f4\u9ad8\u7248\u672c\u3002 \u6b64\u63d2\u4ef6\u4f1a\u5c06 LSP API \u6e90\u548c\u4ee3\u7801\u6587\u6863\u9644\u52a0\u5230\u9879\u76ee\u4e2d\u3002<\/p>\n<p>LSP \u5728\u57fa\u4e8e IntelliJ \u7684 IDE \u7684 2023.2 EAP7 \u4e2d\u53ef\u7528\uff0c\u56e0\u6b64\u63d2\u4ef6\u5fc5\u987b\u4ee5 IntelliJ IDEA Ultimate <code>232-EAP-SNAPSHOT<\/code> \u6216\u66f4\u9ad8\u7248\u672c\u4e3a\u76ee\u6807\uff0c\u6216\u8005\u5728\u5168\u9762\u63a8\u51fa\u540e\u4ee5 v2023.2 \u4e3a\u76ee\u6807\u3002<\/p>\n<p>\u793a\u4f8b <code>build.gradle.kts<\/code> \u914d\u7f6e\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\">plugins {\n   \/\/ ...\n   id(\"org.jetbrains.intellij\") version \"1.15.0\"\n}   \n\n\nintellij {\n   version = \"232-EAP-SNAPSHOT\"\n   type = \"IU\"\n}<\/pre>\n<p>\u5bf9\u4e8e\u57fa\u4e8e <a href=\"https:\/\/jb.gg\/plugin-template\" target=\"_blank\" rel=\"noopener\">IntelliJ Platform Plugin Template<\/a> \u7684\u9879\u76ee\uff0c\u5c06 Gradle IntelliJ Plugin \u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\uff0c\u5e76\u6309\u5982\u4e0b\u6240\u793a\u4fee\u6539 <code>gradle.properties<\/code> \u6587\u4ef6\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\">platformType = IU\nplatformVersion = 232-EAP-SNAPSHOT\npluginSinceBuild = 232\npluginUntilBuild = 232.*<\/pre>\n<p><a href=\"https:\/\/plugins.jetbrains.com\/docs\/intellij\/plugin-configuration-file.html\" target=\"_blank\" rel=\"noopener\">plugin.xml \u914d\u7f6e\u6587\u4ef6<\/a>\u9700\u8981\u6307\u5b9a\u5bf9 IntelliJ IDEA Ultimate \u6a21\u5757\u7684\u4f9d\u8d56\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\">   <!-- ... -->\n\n\n   com.intellij.modules.platform\n   com.intellij.modules.ultimate\n<\/pre>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u66f4\u6539\uff0c\u6211\u4eec\u53ef\u4ee5\u8bbf\u95ee LSP API \u53ca\u5176\u6e90\u4ee3\u7801\u548c\u6587\u6863\u3002<\/p>\n<p>LSP API \u6e90\u6346\u7ed1\u5728 IntelliJ IDEA Ultimate \u4e2d\uff0c\u53ef\u4ee5\u5728 <code>[IDE]\/lib\/src\/src_lsp-openapi.zip<\/code> \u5f52\u6863\u4e2d\u627e\u5230\u3002 \u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f Gradle IntelliJ Plugin 1.15.0+\uff0c\u5b83\u4eec\u4f1a\u81ea\u52a8\u89e3\u6790\u548c\u6620\u5c04\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u652f\u6301\u7684\u529f\u80fd<\/h2>\n<p>IntelliJ \u5e73\u53f0\u5185\u7684\u521d\u59cb LSP \u652f\u6301\u6db5\u76d6\u4ee5\u4e0b\u529f\u80fd\uff1a<\/p>\n<ul>\n<li>\u9519\u8bef\/\u8b66\u544a\u9ad8\u4eae\u663e\u793a (<a href=\"https:\/\/microsoft.github.io\/language-server-protocol\/specification\/#textDocument_publishDiagnostics\" target=\"_blank\" rel=\"noopener\">textDocument\/publishDiagnostics<\/a>)<\/li>\n<li>\u8fd9\u4e9b\u9519\u8bef\/\u8b66\u544a\u7684\u5feb\u901f\u4fee\u590d (<a href=\"https:\/\/microsoft.github.io\/language-server-protocol\/specification\/#textDocument_codeAction\" target=\"_blank\" rel=\"noopener\">textDocument\/codeAction<\/a>)<\/li>\n<li>\u4ee3\u7801\u8865\u5168 (<a href=\"https:\/\/microsoft.github.io\/language-server-protocol\/specification\/#textDocument_completion\" target=\"_blank\" rel=\"noopener\">textDocument\/completion<\/a>)<\/li>\n<li>\u8f6c\u5230\u58f0\u660e (<a href=\"https:\/\/microsoft.github.io\/language-server-protocol\/specification\/#textDocument_definition\" target=\"_blank\" rel=\"noopener\">textDocument\/definition<\/a>)<\/li>\n<\/ul>\n<p>\u66f4\u591a\u529f\u80fd\u5373\u5c06\u516c\u5e03\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u57fa\u672c\u5b9e\u73b0<\/h2>\n<p>\u6700\u4f4e\u9650\u5ea6\u7684 LSP \u96c6\u6210\u5fc5\u987b\u5b9e\u73b0 <code>LspServerSupportProvider<\/code> \u4ee5\u53ca\u670d\u52a1\u63cf\u8ff0\u7b26\uff0c\u5e76\u5c06\u5176\u6ce8\u518c\u4e3a <code>com.intellij.platform.lsp.serverSupportProvider<\/code> <a href=\"https:\/\/plugins.jetbrains.com\/docs\/intellij\/plugin-extension-points.html\" target=\"_blank\" rel=\"noopener\">\u6269\u5c55\u70b9<\/a>\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\">import com.intellij.platform.lsp.api.LspServerSupportProvider\nimport com.intellij.platform.lsp.api.ProjectWideLspServerDescriptor\n\n\nclass FooLspServerSupportProvider : LspServerSupportProvider {\n   override fun fileOpened(project: Project, file: VirtualFile, serverStarter: LspServerStarter) {\n       if (file.extension == \"foo\") {\n           serverStarter.ensureServerStarted(FooLspServerDescriptor(project))\n       }\n   }\n}\n\n\nprivate class FooLspServerDescriptor(project: Project) : ProjectWideLspServerDescriptor(project, \"Foo\") {\n   override fun isSupportedFile(file: VirtualFile) = file.extension == \"foo\"\n   override fun createCommandLine() = GeneralCommandLine(\"foo\", \"--stdio\")\n}<\/pre>\n<p>\u63d0\u4f9b LSP \u670d\u52a1\u5668\u652f\u6301\u63d0\u4f9b\u7a0b\u5e8f\u6269\u5c55\u70b9\u7684\u5b9e\u73b0\u540e\uff0c\u5c06\u5176\u6ce8\u518c\u5230 <code>plugin.xml<\/code> \u6587\u4ef6\u4e2d\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\">   <!-- ... -->\n\n\n   com.intellij.modules.platform\n   com.intellij.modules.ultimate\n\n\n   \n       \n   \n<\/pre>\n<p>\u4f5c\u4e3a\u53c2\u8003\uff0c\u8bf7\u67e5\u770b <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/20686-prisma-orm\" target=\"_blank\" rel=\"noopener\">Prisma ORM<\/a> \u5f00\u6e90\u63d2\u4ef6\u5b9e\u73b0\uff1a<a href=\"https:\/\/github.com\/JetBrains\/intellij-plugins\/tree\/master\/prisma\/src\/org\/intellij\/prisma\/ide\/lsp\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/JetBrains\/intellij-plugins\/tree\/master\/prisma\/src\/org\/intellij\/prisma\/ide\/lsp<\/a><\/p>\n<h2 class=\"wp-block-heading\">\u8bed\u8a00\u670d\u52a1\u5668\u96c6\u6210<\/h2>\n<p>\u8bed\u8a00\u670d\u52a1\u5668\u662f\u4e00\u4e2a\u72ec\u7acb\u8fdb\u7a0b\uff0c\u7528\u4e8e\u5206\u6790\u6e90\u4ee3\u7801\u5e76\u5411\u5f00\u53d1\u5de5\u5177\u63d0\u4f9b\u9488\u5bf9\u7279\u5b9a\u8bed\u8a00\u7684\u529f\u80fd\u3002 \u5728 IDE \u4e2d\u521b\u5efa\u4f7f\u7528 LSP \u7684\u63d2\u4ef6\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u5411\u6700\u7ec8\u7528\u6237\u63d0\u4f9b\u8bed\u8a00\u670d\u52a1\u5668\uff1a<\/p>\n<ul>\n<li>\u5c06<a href=\"https:\/\/microsoft.github.io\/language-server-protocol\/implementors\/servers\/\" target=\"_blank\" rel=\"noopener\">\u8bed\u8a00\u670d\u52a1\u5668\u5b9e\u73b0<\/a>\u4e8c\u8fdb\u5236\u6587\u4ef6\u6346\u7ed1\u4e3a\u968f\u63d2\u4ef6\u4ea4\u4ed8\u7684\u8d44\u6e90\u3002<\/li>\n<li>\u4e3a\u7528\u6237\u63d0\u4f9b\u5b9a\u4e49\u8bed\u8a00\u670d\u52a1\u5668\u4e8c\u8fdb\u5236\u6587\u4ef6\u5728\u5176\u73af\u5883\u4e2d\u7684\u4f4d\u7f6e\u7684\u529f\u80fd\u3002<\/li>\n<\/ul>\n<p>Prisma ORM \u63d2\u4ef6\u91c7\u7528\u7b2c\u4e00\u79cd\u65b9\u5f0f\uff0c\u5206\u53d1 <code>prisma-language-server.js<\/code> \u811a\u672c\u5e76\u4f7f\u7528\u672c\u5730 Node.js \u89e3\u91ca\u5668\u6765\u8fd0\u884c\u3002<\/p>\n<p>\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u60c5\u51b5\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u5e26\u6709\u4e13\u5c5e<a href=\"https:\/\/plugins.jetbrains.com\/docs\/intellij\/settings-guide.html\" target=\"_blank\" rel=\"noopener\">\u8bbe\u7f6e<\/a>\u5b9e\u73b0\u7684\u8be6\u7ec6\u914d\u7f6e\u3002<\/p>\n<p>\u8981\u5b9e\u73b0\u6700\u4f4e\u9650\u5ea6\u4f46\u529f\u80fd\u9f50\u5168\u7684\u63d2\u4ef6\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ul>\n<li>\u5728 <code>LspServerSupportProvider.fileOpened()<\/code> \u65b9\u6cd5\u4e2d\uff0c\u542f\u52a8\u76f8\u5173 LSP \u670d\u52a1\u5668\u63cf\u8ff0\u7b26\uff0c\u5b83\u53ef\u4ee5\u4f7f\u7528 <code>LspServerDescriptor.isSupportedFile()<\/code> \u68c0\u67e5\u65b9\u6cd5\u6765\u786e\u5b9a\u7ed9\u5b9a\u6587\u4ef6\u662f\u5426\u53d7\u652f\u6301\u3002<\/li>\n<li>\u8bf4\u660e\u5982\u4f55\u901a\u8fc7\u5b9e\u73b0 <code>LspServerDescriptor.createCommandLine()<\/code> \u542f\u52a8\u670d\u52a1\u5668\u3002<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\">\u81ea\u5b9a\u4e49<\/h2>\n<ul>\n<li>\u4e3a\u4e86\u5fae\u8c03\u6216\u7981\u7528\u57fa\u4e8e LSP \u7684\u529f\u80fd\u7684\u5b9e\u73b0\uff0c\u63d2\u4ef6\u53ef\u4ee5\u91cd\u5199 <code>LspServerDescriptor<\/code> \u7c7b\u7684\u76f8\u5e94\u5c5e\u6027\u3002 \u8bf7\u53c2\u9605\u5c5e\u6027\u6587\u6863\uff0c\u4e86\u89e3\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff1a\n<ul>\n<li><code>lspGoToDefinitionSupport<\/code><\/li>\n<li><code>lspCompletionSupport<\/code><\/li>\n<li><code>lspDiagnosticsSupport<\/code><\/li>\n<li><code>lspCodeActionsSupport<\/code><\/li>\n<li><code>lspCommandsSupport<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u8981\u5904\u7406\u6765\u81ea LSP \u670d\u52a1\u5668\u7684\u81ea\u5b9a\u4e49\uff08\u672a\u8bb0\u5f55\uff09\u8bf7\u6c42\u548c\u901a\u77e5\uff0c\u8bf7\u91cd\u5199 <code>LspServerDescriptor.createLsp4jClient<\/code>\u3002<\/li>\n<li>\u8981\u5c06\u81ea\u5b9a\u4e49\uff08\u672a\u8bb0\u5f55\uff09\u8bf7\u6c42\u548c\u901a\u77e5\u53d1\u9001\u5230 LSP \u670d\u52a1\u5668\uff0c\u8bf7\u91cd\u5199 <code>LspServerDescriptor.lsp4jServerClass<\/code> \u5e76\u5b9e\u73b0 <code>LspClientNotification<\/code> \u548c\/\u6216 <code>LspRequest<\/code> \u7c7b\u3002<\/li>\n<\/ul>\n<p>\u5982\u9700\u4e86\u89e3\u8be6\u60c5\uff0c\u8bf7\u53c2\u89c1\u6346\u7ed1\u7684 LSP API \u6e90\u4ee3\u7801\u53ca\u5176\u4ee3\u7801\u6587\u6863\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u6d4b\u8bd5<\/h2>\n<p>\u7528\u4e8e\u6d4b\u8bd5\u7684\u5b9e\u7528\u7a0b\u5e8f\u7c7b\u5c1a\u672a\u63d0\u53d6\u4f9b\u516c\u4f17\u4f7f\u7528\uff0c\u4f46\u6211\u4eec\u5c06\u5c3d\u5feb\u63d0\u4f9b\u5408\u9002\u7684\u65b9\u6cd5\u6765\u6d4b\u8bd5\u57fa\u4e8e LSP \u7684\u7b2c\u4e09\u65b9\u63d2\u4ef6\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u6545\u969c\u6392\u9664<\/h2>\n<p>\u6240\u6709 IDE \u548c LSP \u670d\u52a1\u5668\u901a\u4fe1\u65e5\u5fd7\u5747\u4f20\u9012\u5230 IDE \u65e5\u5fd7\u6587\u4ef6\u3002<\/p>\n<p>\u8981\u5c06\u5176\u5305\u542b\u4ee5\u4f9b\u9884\u89c8\uff0c\u8bf7\u5c06\u4ee5\u4e0b\u6761\u76ee\u6dfb\u52a0\u5230 <em>Help | Diagnostic Tools | Debug Log Settings\u2026<\/em>\uff08\u5e2e\u52a9 | \u8bca\u65ad\u5de5\u5177 | \u8c03\u8bd5\u65e5\u5fd7\u8bbe\u7f6e\u2026\uff09\u914d\u7f6e\u5bf9\u8bdd\u6846\u4e2d\uff1a<\/p>\n<pre class=\"EnlighterJSRAW\">#com.intellij.platform.lsp<\/pre>\n<p>\u6709\u5173\u8be6\u60c5\uff0c\u8bf7\u53c2\u9605 IntelliJ \u5e73\u53f0 SDK \u6587\u6863\u4e2d\u7684 <a href=\"https:\/\/plugins.jetbrains.com\/docs\/intellij\/ide-infrastructure.html#logging\" target=\"_blank\" rel=\"noopener\">Logging<\/a> \u90e8\u5206\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u9650\u5236<\/h2>\n<ul>\n<li>\u5f53\u524d LSP API \u5b9e\u73b0\u5047\u8bbe IDE LSP \u670d\u52a1\u5668\u901a\u8baf\u6e20\u9053\u4e3a <code>stdio<\/code>\u3002<\/li>\n<li>IDE \u4e0d\u4f1a\u5411\u670d\u52a1\u5668\u53d1\u9001 <a href=\"https:\/\/microsoft.github.io\/language-server-protocol\/specification\/#workspace_didChangeWatchedFiles\" target=\"_blank\" rel=\"noopener\">workspace\/didChangeWatchedFiles<\/a> \u901a\u77e5\u3002<\/li>\n<\/ul>\n<h1 class=\"wp-block-heading\">\u7ed3\u8bba<\/h1>\n<p>\u5c06\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae (LSP) \u96c6\u6210\u5230\u57fa\u4e8e IntelliJ \u7684 IDE \u7684\u63d2\u4ef6\u4e2d\u65f6\uff0c\u9700\u8981\u5728\u7b80\u5355\u5feb\u901f\u7684\u8bed\u8a00\u652f\u6301\u548c\u5177\u6709 IDE \u529f\u80fd\u7684\u590d\u6742\u81ea\u5b9a\u4e49\u8bed\u8a00\u652f\u6301\u63d2\u4ef6\u4e4b\u95f4\u505a\u51fa\u6743\u8861\u3002<\/p>\n<p>\u8003\u8651\u57fa\u4e8e LSP \u7684\u65b9\u5f0f\u65f6\uff0c\u52a1\u5fc5\u6309\u4ee5\u4e0b\u6807\u51c6\u8bc4\u4f30\u5411\u6700\u7ec8\u7528\u6237\u63d0\u4f9b\u7684\u8bed\u8a00\u670d\u52a1\u5668\uff1a<\/p>\n<ul>\n<li>\u8bed\u8a00\u670d\u52a1\u5668\u7684\u64cd\u4f5c\u7cfb\u7edf\u4f9d\u8d56\u3002<\/li>\n<li>\u6700\u65b0\u7248\u672c\u5728\u7ebf\u53ef\u7528\u6027\u3002<\/li>\n<li>\u4e0e\u7248\u672c\u95f4\u91cd\u5927\u66f4\u6539\u7684\u517c\u5bb9\u6027\u3002<\/li>\n<li>\u8bf7\u6c42\u7528\u6237\u63d0\u4f9b\u8bed\u8a00\u670d\u52a1\u5668\u4e8c\u8fdb\u5236\u8def\u5f84\u7684\u53ef\u884c\u6027\u3002<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u4e0e\u8bed\u8a00\u670d\u52a1\u5668\u8fdb\u7a0b\u7684\u96c6\u6210\u95ee\u9898\u540e\uff0c\u67e5\u9605 <a href=\"https:\/\/plugins.jetbrains.com\/docs\/intellij\/\" target=\"_blank\" rel=\"noopener\">IntelliJ SDK \u6587\u6863<\/a>\u4ecd\u7136\u5f88\u91cd\u8981\u3002 \u8fd9\u5c06\u5168\u9762\u6982\u8ff0\u4e0e IntelliJ \u5e73\u53f0\u5185 LSP \u6807\u51c6\u65e0\u7f1d\u96c6\u6210\u7684\u53ef\u7528\u529f\u80fd\u3002<\/p>\n<p>\u8bf7\u6ce8\u610f\uff0c\u4e0e\u8bed\u8a00\u670d\u52a1\u5668\u534f\u8bae\u7684\u96c6\u6210\u4f5c\u4e3a\u57fa\u4e8e IntelliJ \u7684\u4ed8\u8d39 IDE \u7684\u6269\u5c55\u800c\u521b\u5efa\u3002 \u56e0\u6b64\uff0c\u4f7f\u7528\u8bed\u8a00\u670d\u52a1\u5668\u96c6\u6210\u7684\u63d2\u4ef6\u53ef\u80fd\u65e0\u6cd5\u5728 JetBrains \u4ea7\u54c1\u7684 Community \u7248\u672c\u548c Google \u7684 Android Studio \u4e2d\u4f7f\u7528\u3002<\/p>\n<p>\u5982\u679c\u60a8\u9047\u5230\u95ee\u9898\u6216\u9700\u8981\u5e2e\u52a9\uff0c\u8bf7\u901a\u8fc7 <a href=\"https:\/\/plugins.jetbrains.com\/slack\/\" target=\"_blank\" rel=\"noopener\">JetBrains Platform Slack<\/a> \u5de5\u4f5c\u533a\u4e2d\u7684 <code>#intellij-platform<\/code> \u9891\u9053\u8054\u7cfb\u6211\u4eec\u6216\u5728 <a href=\"https:\/\/youtrack.jetbrains.com\/newIssue?project=IDEA&amp;c=Subsystem%20Core.%20Platform%20API\" target=\"_blank\" rel=\"noopener\">YouTrack<\/a> \u4e2d\u63d0\u4ea4\u95ee\u9898\u3002<\/p>\n\n\n<p><\/p>\n\n\n\n<p>\u672c\u535a\u6587\u82f1\u6587\u539f\u4f5c\u8005\uff1a<\/p>\n\n\n    <div class=\"about-author \">\n        <div class=\"about-author__box\">\n            <div class=\"row\">\n                <div class=\"about-author__box-img\">\n                    <img decoding=\"async\" src=\"https:\/\/secure.gravatar.com\/avatar\/?s=200&#038;r=g\" width=\"200\" height=\"200\" alt=\"\" loading=\"lazy\"  class=\"avatar avatar-200 wp-user-avatar wp-user-avatar-200 photo avatar-default\">\n                <\/div>\n                <div class=\"about-author__box-text\">\n                                                        <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n","protected":false},"author":1297,"featured_media":370372,"comment_status":"closed","ping_status":"closed","template":"","categories":[6815,3989,4759,3903,1065],"tags":[915,600,246,76,3233,41],"cross-post-tag":[6284],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/platform\/380356"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/platform"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/platform"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/1297"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=380356"}],"version-history":[{"count":8,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/platform\/380356\/revisions"}],"predecessor-version":[{"id":380364,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/platform\/380356\/revisions\/380364"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media\/370372"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=380356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=380356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=380356"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=380356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}