# Improve logic for finding VSCode / Cursor settings files \(\#32721\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/a5ceef35fa478cd2f0e14277acd9babdb520a9d5)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: a5ceef35fa478cd2f0e14277acd9babdb520a9d5

Requested commit: a5ceef35fa478cd2f0e14277acd9babdb520a9d5

Commit: a5ceef35fa478cd2f0e14277acd9babdb520a9d5

Tree: bb1c9defe555205ebd3a716bca3f7e71717775a4

Author: Michael Sloan

Committer: GitHub

## Message

```
Improve logic for finding VSCode / Cursor settings files (#32721)

* Fixes a bug where for Cursor, `config_dir()` (Zed's config dir) was
being used instead of `dirs::config_dir` (`~/.config` /
`$XDG_CONFIG_HOME`).

* Adds support for windows, before it was using the user profile folder
+ `/.config` which is incorrect.

* Now looks using a variety of product names - `["Code", "Code - OSS",
"Code Dev", "Code - OSS Dev", "code-oss-dev", "VSCodium"]`.

* Now shows settings path that was read before confirming import.

Including this path in the confirmation modal is a bit ugly (making it
link-styled and clickable would be nice), but I think it's better to
include it now that it is selecting the first match of a list of
candidate paths:


![image](https://github.com/user-attachments/assets/ceada4c2-96a6-4a84-a188-a1d93521ab26)

Release Notes:

- Added more settings file locations to check for VS Code / Cursor
settings import.
```

## Parents

- [afa70034d594c618b0749967d1feeb61576ef0f1](https://git.cafe/gitcafe/zed/commit/afa70034d594c618b0749967d1feeb61576ef0f1?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/a5ceef35fa478cd2f0e14277acd9babdb520a9d5?format=markdown)
