Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Ale's ale_completion_tsserver_autoimport inserts default when accepting autoimport suggestion for default import for typescript. #2899

@dephiros

Description

@dephiros

Information

VIM version
NVIM v0.4.2
Build type: Release

Operating System: Mac 10.14.6

What went wrong

Ale's ale_completion_tsserver_autoimport inserts default when accepting autoimport suggestion for default import for typescript.

Reproducing the bug

  1. Create file abcd.ts with a default export
  2. In file b.ts, type abc, ale will pop up default v Import default 'abcd' from module "abcd.ts
  3. accept the suggestion, you will see the import statement added import abcd from "abcd" but the inserted text is default`. Note: the import takes two times to be inserted in the first example below as well

This happens for both ts and tsx files.
Nov-15-2019 13-40-10
Nov-15-2019 13-30-08

:ALEInfo

 Current Filetype: typescript
Available Linters: ['eslint', 'standard', 'tslint', 'tsserver', 'typecheck', 'xo']
  Enabled Linters: ['eslint', 'standard', 'tslint', 'tsserver', 'typecheck', 'xo']
 Suggested Fixers: 
  'eslint' - Apply eslint --fix to a file.
  'prettier' - Apply prettier to a file.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
  'tslint' - Fix typescript files with tslint --fix.
  'xo' - Fix JavaScript/TypeScript files using xo --fix.
 Linter Variables:

let g:ale_typescript_standard_executable = 'standard'
let g:ale_typescript_standard_options = ''
let g:ale_typescript_standard_use_global = 0
let g:ale_typescript_tslint_config_path = ''
let g:ale_typescript_tslint_executable = 'tslint'
let g:ale_typescript_tslint_ignore_empty_files = 0
let g:ale_typescript_tslint_rules_dir = ''
let g:ale_typescript_tslint_use_global = 0
let g:ale_typescript_tsserver_config_path = ''
let g:ale_typescript_tsserver_executable = 'tsserver'

Metadata

Metadata

Assignees

No one assigned

    Labels

    LSPAny issue relating to LSP or tsserverbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions