microsoft / microsoft/TypeScript-Sublime-Plugin

formatCodeOptions not respected

Open
#321 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
JavaScript
Stars
1.7k
Forks
236
Avg merge
21d 13h
Merged PRs (30d)
1

Description

I added the following to my tsconfig.json

"formatCodeOptions": {
    "placeOpenBraceOnNewLineForFunctions": true,
    "placeOpenBraceOnNewLineForControlBlocks": true
}

Looking in the tsserver.js that comes with the plugin, I see the compiler attempts to read these settings from somewhere (I assume its the tsconfig.json), however, it's simply not working. If also played with the casing, eventually literally copying it from the tsserver.js, but no game.

Is the server expecting a different file? Did I format it wrong? Or is it only partially implemented?

Contributor guide

No contributing guide indexed for this repository

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

Start by inspecting tsserver.js and how it reads settings from tsconfig.json. Reproduce the issue with the supplied formatCodeOptions, then trace whether the options are loaded and passed through; the issue is done when the configuration source and support for these formatting settings are established and the behavior is corrected or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.