fwcd / fwcd/kotlin-language-server
Incorrectly excluded directory
- Dominant language
- Kotlin
- Stars
- 2k
- Forks
- 252
- PR merge metrics
- No merged PRs in 30d
Description
A problem I had was that some references remained unresolved by the language server although they were correct.
The problem turned out to be that they were under a `target` directory, which is excluded by the language server, as seen in the following snippet.
https://github.com/fwcd/kotlin-language-server/blob/bc5309964d24053dd80aed193975629c3e8546ca/shared/src/main/kotlin/org/javacs/kt/SourceExclusions.kt#L13
# Solution
I think ideally, the language server should do something more sensible than using the hardcoded exclusion rules and allow customization of that behaviour via options.
But for now, a workaround is to symlink the incorrectly excluded directories to a non-excluded name.
E.g. in my case I used `ln -s target trgt`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with shared/src/main/kotlin/org/javacs/kt/SourceExclusions.kt at the referenced exclusion rule and examine how the language server handles directories such as target. The issue describes customization via options as the desired outcome; done should avoid incorrect exclusions without relying on the symlink workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100