MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / resolveVSCodeSettingsPaths

Function resolveVSCodeSettingsPaths

cli/src/utils/theme-system.ts:208–234  ·  view source on GitHub ↗
(
  env: CliEnv = getCliEnv(),
)

Source from the content-addressed store, hash-verified

206}
207
208const resolveVSCodeSettingsPaths = (
209 env: CliEnv = getCliEnv(),
210): string[] => {
211 const settings: string[] = []
212 const home = homedir()
213
214 if (process.platform === 'darwin') {
215 const base = join(home, 'Library', 'Application Support')
216 for (const product of VS_CODE_PRODUCT_DIRS) {
217 settings.push(join(base, product, 'User', 'settings.json'))
218 }
219 } else if (process.platform === 'win32') {
220 const appData = env.APPDATA
221 if (appData) {
222 for (const product of VS_CODE_PRODUCT_DIRS) {
223 settings.push(join(appData, product, 'User', 'settings.json'))
224 }
225 }
226 } else {
227 const configDir = env.XDG_CONFIG_HOME ?? join(home, '.config')
228 for (const product of VS_CODE_PRODUCT_DIRS) {
229 settings.push(join(configDir, product, 'User', 'settings.json'))
230 }
231 }
232
233 return settings
234}
235
236const resolveJetBrainsLafPaths = (
237 env: CliEnv = getCliEnv(),

Callers 3

detectVSCodeThemeFunction · 0.85
getIDEThemeConfigPathsFunction · 0.85
setupFileWatchersFunction · 0.85

Calls 1

getCliEnvFunction · 0.90

Tested by

no test coverage detected