Skip to content

Incorrectly excluded directory #464

@fw623

Description

@fw623

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.

private val excludedPatterns = listOf(".*", "bazel-*", "bin", "build", "node_modules", "target").map { FileSystems.getDefault().getPathMatcher("glob:$it") }

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions