VSCodeVim / VSCodeVim/Vim

equalprg does not respect my lint options

Open
#3,076 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
Our TypeScript tsconfig.json makes me write functions with a space between name and brackets, e.g.: function foo (args) {...}. When I highlight some lines of code and press = to fix their indentation the space between foo and (args) is removed, which causes a linting error.

To Reproduce

  1. Write the following in a JS or TS file:
function foo (args) {
console.log(args);
}
  1. Highlight it
  2. Press =
  3. Notice that the space is removed between them

Expected behavior
I expect = to fix indentation only OR reformat code according to my lint options.

Environment:

  • Extension (VsCodeVim) version: 0.16.5
  • VSCode version: 1.27.2
  • OS: Windows 10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in a JavaScript or TypeScript file by selecting the function and pressing = in VSCodeVim. Start by tracing the equalprg handling and compare its behavior with the reported lint configuration. Done means indentation is fixed without removing the space, or formatting follows the configured lint options.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.