|
25 | 25 | "metadata": { |
26 | 26 | "collapsed": true, |
27 | 27 | "ExecuteTime": { |
28 | | - "end_time": "2025-08-07T10:12:50.251411Z", |
29 | | - "start_time": "2025-08-07T10:12:49.710953Z" |
| 28 | + "end_time": "2025-08-07T11:30:51.291051Z", |
| 29 | + "start_time": "2025-08-07T11:30:50.984417Z" |
30 | 30 | } |
31 | 31 | }, |
32 | 32 | "cell_type": "code", |
|
59 | 59 | { |
60 | 60 | "metadata": { |
61 | 61 | "ExecuteTime": { |
62 | | - "end_time": "2025-08-07T10:12:53.789969Z", |
63 | | - "start_time": "2025-08-07T10:12:50.278977Z" |
| 62 | + "end_time": "2025-08-07T11:30:53.999294Z", |
| 63 | + "start_time": "2025-08-07T11:30:51.312917Z" |
64 | 64 | } |
65 | 65 | }, |
66 | 66 | "cell_type": "code", |
67 | | - "source": "loadBundledPlugins(\"com.intellij.modules.ultimate\")", |
| 67 | + "source": "loadBundledPlugins(\"com.intellij.platform.lsp\")", |
68 | 68 | "outputs": [], |
69 | 69 | "execution_count": 2 |
70 | 70 | }, |
|
88 | 88 | { |
89 | 89 | "metadata": { |
90 | 90 | "ExecuteTime": { |
91 | | - "end_time": "2025-08-07T10:12:54.024997Z", |
92 | | - "start_time": "2025-08-07T10:12:53.811874Z" |
| 91 | + "end_time": "2025-08-07T11:30:54.072521Z", |
| 92 | + "start_time": "2025-08-07T11:30:54.010960Z" |
93 | 93 | } |
94 | 94 | }, |
95 | 95 | "cell_type": "code", |
|
120 | 120 | { |
121 | 121 | "metadata": { |
122 | 122 | "ExecuteTime": { |
123 | | - "end_time": "2025-08-07T10:12:54.152886Z", |
124 | | - "start_time": "2025-08-07T10:12:54.074487Z" |
| 123 | + "end_time": "2025-08-07T11:30:54.104781Z", |
| 124 | + "start_time": "2025-08-07T11:30:54.075763Z" |
125 | 125 | } |
126 | 126 | }, |
127 | 127 | "cell_type": "code", |
|
163 | 163 | { |
164 | 164 | "metadata": { |
165 | 165 | "ExecuteTime": { |
166 | | - "end_time": "2025-08-07T10:12:54.382252Z", |
167 | | - "start_time": "2025-08-07T10:12:54.225026Z" |
| 166 | + "end_time": "2025-08-07T11:30:54.135358Z", |
| 167 | + "start_time": "2025-08-07T11:30:54.108830Z" |
168 | 168 | } |
169 | 169 | }, |
170 | 170 | "cell_type": "code", |
171 | 171 | "source": [ |
172 | 172 | "import com.intellij.platform.lsp.api.LspServerManager\n", |
173 | 173 | "import com.intellij.platform.lsp.api.LspServerSupportProvider\n", |
174 | 174 | "\n", |
175 | | - "runInEdt {\n", |
176 | | - " registerExtension(LspServerSupportProvider.EP_NAME, KotlinLspServerSupportProvider())\n", |
177 | | - "}" |
| 175 | + "registerExtension(LspServerSupportProvider.EP_NAME, KotlinLspServerSupportProvider())" |
| 176 | + ], |
| 177 | + "outputs": [ |
| 178 | + { |
| 179 | + "data": { |
| 180 | + "text/plain": [ |
| 181 | + "IntelliJ Platform integration is disposed" |
| 182 | + ] |
| 183 | + }, |
| 184 | + "metadata": {}, |
| 185 | + "output_type": "display_data", |
| 186 | + "jetTransient": { |
| 187 | + "display_id": null |
| 188 | + } |
| 189 | + } |
178 | 190 | ], |
179 | | - "outputs": [], |
180 | 191 | "execution_count": 5 |
181 | 192 | }, |
182 | 193 | { |
|
185 | 196 | "source": [ |
186 | 197 | "## Testing the Integration\n", |
187 | 198 | "\n", |
188 | | - "To test the integration, create a Kotlin file with some unnecessary constructs.\n", |
| 199 | + "To test the integration:\n", |
| 200 | + "1. Install [Kotlin LSP CLI tool](https://github.com/Kotlin/kotlin-lsp?tab=readme-ov-file#install-kotlin-lsp-cli).\n", |
| 201 | + "2. Run this Kotlin Notebook.\n", |
| 202 | + "3. Create a Kotlin file with some unnecessary constructs.\n", |
189 | 203 | "\n", |
190 | | - "```kotlin\n", |
191 | | - "import java.util.List\n", |
192 | | - "\n", |
193 | | - "class Hello {\n", |
194 | | - " fun sayHello() = \"Hello, world!\"\n", |
195 | | - "}\n", |
196 | | - "```\n", |
| 204 | + " ```kotlin\n", |
| 205 | + " import java.util.List\n", |
197 | 206 | "\n", |
198 | | - "Observe two warnings: an unnecessary import and an implicit return type for the `sayHello` function.\n", |
| 207 | + " class Hello {\n", |
| 208 | + " fun sayHello() = \"Hello, world!\"\n", |
| 209 | + " }\n", |
| 210 | + " ```\n", |
| 211 | + "4. Observe two warnings:\n", |
| 212 | + " - an unnecessary import,\n", |
| 213 | + " - an implicit return type for the `sayHello` function.\n", |
199 | 214 | "\n", |
200 | 215 | "Use [Intention Actions](https://www.jetbrains.com/help/idea/intention-actions.html) and note two actions provided by the LSP server:\n", |
201 | 216 | "\n", |
|
0 commit comments