Format document doesn't abide by existing newlines in active file
Open
Nobody has claimed this yet.
IDE-Formatter
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
Repro:
- Create new C# console app in VS
- Below editor scrollbar, set current newline settings in file to LF
- Inside main, add the following line indented improperly
var a = "test"; - Format document
Expected:
Line settings to remain LF
Actual:
Line settings changed to mixed
Image before format doc:
Image after format doc:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in a C# console app in Visual Studio, using the LF file setting and the indented line described in the report. Trace the Format Document behavior for the active file's newline setting; done means formatting preserves LF rather than changing the setting to mixed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100