1- using System ;
2- using System . Collections . Generic ;
31using System . IO ;
4- using System . Linq ;
5- using System . Security ;
6- using System . Security . Cryptography ;
7- using System . Text ;
8- using System . Xml . Linq ;
92using UnityEditor ;
10- using UnityEditor . Compilation ;
11- using UnityEngine ;
12- using UnityEngine . Profiling ;
13- using SR = System . Reflection ;
143
154namespace VSCodeEditor
165{
176 public interface IConfigGenerator
187 {
198 string VSCodeSettings { get ; set ; }
209 string WorkspaceSettings { get ; set ; }
21- string OmniSharpSettings { get ; set ; }
2210 string EditorConfigSettings { get ; set ; }
2311 string ProjectDirectory { get ; }
2412 IFlagHandler FlagHandler { get ; }
@@ -82,10 +70,7 @@ public class ConfigGeneration : IConfigGenerator
8270 ""ProjectSettings/"":true,
8371 ""temp/"":true,
8472 ""Temp/"":true
85- },
86- ""omnisharp.useModernNet"": true,
87- ""omnisharp.sdkIncludePrereleases"": false,
88- ""omnisharp.organizeImportsOnFormat"": true
73+ }
8974}" ;
9075
9176 const string k_DefaultWorkspaceJson =
@@ -98,24 +83,6 @@ public class ConfigGeneration : IConfigGenerator
9883 ]
9984}" ;
10085
101- const string k_DefaultOmniSharpJson =
102- /*lang=json,strict*/
103- @"{
104- ""RoslynExtensionsOptions"": {
105- ""EnableAnalyzersSupport"": true,
106- ""AnalyzeOpenDocumentsOnly"": true,
107- ""DocumentAnalysisTimeoutMs"": 600000
108- },
109- ""FormattingOptions"": {
110- ""enableEditorConfigSupport"": true
111- },
112- ""RenameOptions"": {
113- ""RenameInComments"": true,
114- ""RenameOverloads"": true,
115- ""RenameInStrings"": true
116- }
117- }" ;
118-
11986 const string k_DefaultEditorConfig =
12087 @"# EditorConfig is awesome: http://EditorConfig.org
12188
@@ -139,7 +106,6 @@ public class ConfigGeneration : IConfigGenerator
139106
140107 string m_VSCodeSettings ;
141108 string m_WorkspaceSettings ;
142- string m_OmniSharpSettings ;
143109 string m_EditorConfigSettings ;
144110
145111 public string VSCodeSettings
@@ -176,23 +142,6 @@ public string WorkspaceSettings
176142 }
177143 }
178144
179- public string OmniSharpSettings
180- {
181- get =>
182- m_OmniSharpSettings ??= EditorPrefs . GetString (
183- "vscode_omnisharpSettings" ,
184- k_DefaultOmniSharpJson
185- ) ;
186- set
187- {
188- if ( value == "" )
189- value = k_DefaultOmniSharpJson ;
190-
191- m_OmniSharpSettings = value ;
192- EditorPrefs . SetString ( "vscode_omnisharpSettings" , value ) ;
193- }
194- }
195-
196145 public string EditorConfigSettings
197146 {
198147 get =>
@@ -232,7 +181,6 @@ public void Sync()
232181 {
233182 WriteVSCodeSettingsFiles ( ) ;
234183 WriteWorkspaceFile ( ) ;
235- WriteOmniSharpConfigFile ( ) ;
236184 WriteEditorConfigFile ( ) ;
237185 }
238186
@@ -264,16 +212,6 @@ void WriteWorkspaceFile()
264212 }
265213 }
266214
267- void WriteOmniSharpConfigFile ( )
268- {
269- if ( m_FlagHandler . ConfigFlag . HasFlag ( ConfigFlag . OmniSharp ) )
270- {
271- var omniSharpConfig = Path . Combine ( ProjectDirectory , "omnisharp.json" ) ;
272-
273- m_FileIOProvider . WriteAllText ( omniSharpConfig , OmniSharpSettings ) ;
274- }
275- }
276-
277215 void WriteEditorConfigFile ( )
278216 {
279217 if ( m_FlagHandler . ConfigFlag . HasFlag ( ConfigFlag . EditorConfig ) )
0 commit comments