dense-analysis / dense-analysis/ale

Setting ale_typescript_tsserver_config_path has no effect

Open
#4,798 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Vim Script
Stars
14k
Forks
1.5k
Avg merge
17h 49m
Merged PRs (30d)
1

Description

## Information

**VIM version**

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled May 21 2024 22:55:41)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-429

## What went wrong

tsserver starts without config file when b:ale_typescript_tsserver_config_path is set

According to the ale-typescript.txt:

```
g:ale_typescript_tsserver_config_path *g:ale_typescript_tsserver_config_path*
*b:ale_typescript_tsserver_config_path*
Type: |String|
Default: `''`

ALE will first discover the tsserver.json path in an ancestor directory. If
no such path exists, this variable will be used instead.

```

I guess this feature is not implemented. Looking through the code I don't see any attempt to use the set env variable.
The only attempt to locate tsconfig.json is in

```
autoload\ale\handlers\tsserver.vim
5: let l:tsconfig_file = ale#path#FindNearestFile(a:buffer, 'tsconfig.json')

```
function ale#path#FindNearestFile() only searches the current tree upwords.
There is no code to look in ale_typescript_tsserver_config_path.

## Reproducing the bug

let b:ale_typescript_tsserver_config_path = 'E:\Config'
:ALELint

### :ALEInfo

Linter Variables:
let g:ale_javascript_tsserver_config_path = ''
let b:ale_javascript_tsserver_config_path = 'E:\Config'
let g:ale_javascript_tsserver_executable = 'tsserver'
let g:ale_javascript_tsserver_use_global = 0

Command History:

(executable check - success) tsserver
(started) 'cmd /s/c "tsserver"'

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.