fwcd / fwcd/kotlin-language-server

How to trigger language server to re-index

Open
#288 1 comment 0 reactions 0 assignees View on GitHub
enhancement index
Dominant language
Kotlin
Stars
2k
Forks
252
PR merge metrics
No merged PRs in 30d

Description

### Description
After adding packages to my `gradle.build.kts`, auto-imports for the new things weren't working for me. I was able to fix by restarting the language server from the command palette and waiting for the "kotlin: indexing..." status to finish.

I'm wondering if its possible to trigger a re-index without restarting the server?

Update: I notice from the extensions "Feature contributions", the only command exposed is `kotlin.languageServer.restart`

### Extension version
0.2.22

### Additional context
n/a

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the existing `kotlin.languageServer.restart` command shown in the extension's Feature contributions and trace the indexing status reported as `kotlin: indexing...`. Define a command that re-indexes after changes to `gradle.build.kts` without restarting the language server, and verify that auto-imports for newly added packages work afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.