Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting ale_typescript_tsserver_config_path has no effect #4798

Open
Konstantin-Glukhov opened this issue Jun 24, 2024 · 0 comments
Open

Setting ale_typescript_tsserver_config_path has no effect #4798

Konstantin-Glukhov opened this issue Jun 24, 2024 · 0 comments
Labels

Comments

@Konstantin-Glukhov
Copy link

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"'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant