dense-analysis / dense-analysis/ale

Support importModuleSpecifierPreference option in tsserver

Open
#3,064 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Vim Script
Stars
14k
Forks
1.5k
Avg merge
17h 49m
Merged PRs (30d)
1

Description

VSCode (and CoC) provide support for [`importModuleSpecifierPreference`](https://github.com/microsoft/TypeScript/blob/7e07a2b5d129a35c05107cb5f1d11347876a692b/src/server/protocol.ts#L3161). It allows customizing what kind of import autocomplete tsserver will provide.

Assuming the following in `tsconfig.json`:

```json
{
"compilerOptions": {
"baseUrl": "src",
"paths": {
"@/*": ["./*"]
}
}
}
```

I would like ALE to autocomplete the import as non-relative, e.g. `@/components/Button` instead of `../components/Button`.

I was hoping that perhaps I could use `g:ale_typescript_tsserver_config_path` to configure this but as pointed out in https://github.com/dense-analysis/ale/issues/2901 I couldn't find any information on the format of that file.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.