Skip to content

Commit

Permalink
Fix search of react-native module code in vscode (#11088)
Browse files Browse the repository at this point in the history
By default, vscode uses the `.gitignore` file to filter out files when
searching and for intellisense. This is usually good because of how many
dependencies RNW has that we don't ever look at.

However this limits our ability to easily browse, search, and jump into
code we *do* actually want to look at, especially all of the shared C++
in RN (which is only increasing in the new architecture).

This change updates our repo's settings file and adds a new `.ignore`
file where we can selectively allow certain folders under
`node_modules` to improve the dev experience in vscode.
  • Loading branch information
jonthysell authored Jan 14, 2023
1 parent cb8eff4 commit a1f9323
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file modifies how vscode uses .gitignore to filter search results

# Setup for individual module folders to be searchable
!node_modules
node_modules/*

# Enable individual module folders
!node_modules/.fmt
!node_modules/.folly
!node_modules/react-native
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"regex": "cpp"
},
"search.exclude": {
"**/node_modules": true,
"**/dist/**/*.js": true,
"**/lib/**/*.js": true,
"**/dist/**/*.js": true
"**/node_modules": false
},
"editor.formatOnSave": true,
"eslint.format.enable": true,
Expand Down

0 comments on commit a1f9323

Please sign in to comment.