File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 1818 <PropertyGroup Condition =" '$(Configuration)'=='Release'" >
1919 <!-- 发布配置:不生成PDB文件 -->
2020 <DebugType >none</DebugType >
21+ <DebugSymbols >false</DebugSymbols >
2122 </PropertyGroup >
2223
2324 <ItemGroup >
Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ public class FormattingHandler(ServerContext context) : DocumentFormattingHandle
2727 var formattedCode = Builder . Format ( semanticModel . Document . Text , filePath ) ;
2828 if ( formattedCode . Length > 0 )
2929 {
30+ if ( ! context . IsVscode )
31+ {
32+ formattedCode = formattedCode . Replace ( "\r \n " , "\n " ) ;
33+ }
34+
3035 response = new DocumentFormattingResponse ( new TextEdit ( )
3136 {
3237 Range = new DocumentRange (
@@ -63,6 +68,11 @@ public class FormattingHandler(ServerContext context) : DocumentFormattingHandle
6368
6469 if ( formattedCode . Length > 0 )
6570 {
71+ if ( ! context . IsVscode )
72+ {
73+ formattedCode = formattedCode . Replace ( "\r \n " , "\n " ) ;
74+ }
75+
6676 response = new DocumentFormattingResponse ( new TextEdit ( )
6777 {
6878 Range = new DocumentRange (
You can’t perform that action at this time.
0 commit comments