fwcd / fwcd/kotlin-language-server

Add import from class body

Open
#253 2 comments 1 reaction 0 assignees View on GitHub
code completion enhancement
Dominant language
Kotlin
Stars
2k
Forks
252
PR merge metrics
No merged PRs in 30d

Description

The LS does privide autocomplete for un-imported classes in the import section. If I type `import java.time.Ins` I get a suggestion for `Instant` with som doc.

When I type just `Ins` somewhere else in the file, I get suggestions for already imported classes starting on `Ins`, but not eg. `java.time.Ins`. Even if i use the the full path `java.time.Ins`, I do not get the same completion as in the import section.

I could not find info on whether this is already included, and I've set up my editor wrong, or not. If it isn't, I would really like to get some pointers on the size of this task, and where I could start.

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file, test, or implementation entry point is named. Reproduce completion for an unimported class in the import section and for the same class name or fully qualified path in a Kotlin class body, then locate the existing completion paths and related tests. Done means both contexts provide comparable suggestions and documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.