microsoft / microsoft/TypeScript-Sublime-Plugin

TypeScriptFormat removes all indentation

Open
#246 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I am using the plugin v0.1.4 on Mac OS X with sublime build 3083 and all of a sudden the "typescript_format_document" command stopped working.

What it does now is remove the entire indentation (removing all leading spaces).

The rest of the plugin seems to work (syntax check and completion).

I have not installed any other plugin in the meantime, and I am quite positive I did not change my settings.

The weird thing is that while it does not affect all .ts document in my project, it start to affect them randomly. For example, I have document A open, I can format it OK, I close it reopen it, and now the plugin don't format it. It is not systematic, some documents still work, even after opening, modifying and closing them.

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

Reproduce the typescript_format_document command on affected .ts documents using the reported plugin v0.1.4 and Sublime build 3083 on Mac OS X. Trace the formatting path to determine why leading spaces are removed inconsistently; done means formatting preserves indentation reliably across reopened documents.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
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.