Visual Studio Code (vscode) Configuration Tweaks: Difference between revisions

From UCSC Genomics Institute Computing Infrastructure Information

mNo edit summary
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
__TOC__
== Tuning VSCode ==
Visual Studio Code (vscode) is a popular IDE used for writing code, and many people use the remote functionality feature to edit code on a remote server, which is very cool.  But the issue with vscode is that it frequently opens way to many files on the remote server in an attempt to cache search databases and code  modifications, and that unnecessarily puts a large burden on the remote server kernel for caching filehandles an such, slow down the remote filesystem and server you are working on.   
Visual Studio Code (vscode) is a popular IDE used for writing code, and many people use the remote functionality feature to edit code on a remote server, which is very cool.  But the issue with vscode is that it frequently opens way to many files on the remote server in an attempt to cache search databases and code  modifications, and that unnecessarily puts a large burden on the remote server kernel for caching filehandles an such, slow down the remote filesystem and server you are working on.   


Line 7: Line 11:
Create that file if it does not already exist.  Then put the following text in it:
Create that file if it does not already exist.  Then put the following text in it:


{
  "search.exclude": {
    "**": true
  },
  "files.watcherExclude": {
    "**": true
  },
  "search.followSymlinks": false,
  "editor.quickSuggestions": {
    "other": false,
    "comments": false,
    "strings": false
  },
  "search.useIgnoreFiles": true,
  "search.useGlobalIgnoreFiles": true,
  "search.useRipgrep": false,
  "search.quickOpen.includeHistory": false,
  "search.quickOpen.includeSymbols": false,
  "remote.SSH.enableRemotePhpProxy": false
}
   
   
  "search.exclude": {
Then close vscode. The most reliable is to click on the bottom left where it usually says "SSH: mustard.prism" (or whatever server you are connected to).  That populates the dropdown from the search bar, and at the bottom there is an action: "Close Remote Connection".  Otherwise it seems to reconnect, stay connected in the background sometimes.  Then save any open files you have in vscode and close vscode on your laptop or workstation, then re-open it.
 
== Cursor / Positron / Antigravity==
 
Since these IDEs are a fork of VSCode, they works exactly the same way, except the path to the file is different:
 
~/.cursor-server/data/Machine/settings.json
~/.positron-server/data/Machine/settings.json
~/.antigravity-server/data/Machine/settings.json
 
 
The contents of the JSON file is exactly as above however:
 
{
  "search.exclude": {
     "**": true
     "**": true
},
  },
"files.watcherExclude": {
  "files.watcherExclude": {
     "**": true
     "**": true
}  
  },
"search.followSymlinks": false,
  "search.followSymlinks": false,
"editor.quickSuggestions": {
  "editor.quickSuggestions": {
     "other": false,
     "other": false,
     "comments": false,
     "comments": false,
     "strings": false
     "strings": false
},
  },
"search.useIgnoreFiles": true,
  "search.useIgnoreFiles": true,
"search.useGlobalIgnoreFiles": true,
  "search.useGlobalIgnoreFiles": true,
"search.useRipgrep": false,
  "search.useRipgrep": false,
"search.quickOpen.includeHistory": false,
  "search.quickOpen.includeHistory": false,
"search.quickOpen.includeSymbols": false,
  "search.quickOpen.includeSymbols": false,
"remote.SSH.enableRemotePhpProxy": false
  "remote.SSH.enableRemotePhpProxy": false
}
 
== Claude Code VSCode Extension ==


Then close vscodeThe most reliable is to click on the bottom left where it usually says "SSH: mustard.prism" (or whatever server you are connected to).  That populates the dropdown from the search bar, and at the bottom there is an action: "Close Remote Connection".  Otherwise it seems to reconnect, stay connected in the background sometimesThen save any open files you have in vscode and close vscode on your laptop or workstation, then re-open it.
Also - if you use the Claude Code extension, then make sure Claude is not doing the same thing!
 
Use '''.claudeignore'''. This is crucialConfigure it to explicitly ignore any large data directories (like /private/groups/brookslab/ or miniconda3) inside the project root.  The file may look something like this:
 
# --- Large Data Directories ---
  # Ignore the massive Nextflow or Snakemake work directories
work/
.nextflow/
results/
# --- Environment & Dependencies ---
# These are "metadata bombs" with thousands of tiny files
node_modules/
miniconda*/
miniforge*/
brookslab/
.venv/
venv/
__pycache__/
*.pyc
# --- Hidden System Files ---
  # Crucial for Ceph: ignore the Mac resource forks
**/__MACOSX/**
**/.DS_Store
  # --- Build & Logs ---
build/
dist/
*.log
.claude/  # Claude's own internal metadata.  Put that .claudeignore file in the root of any projects you have... Maybe even in your homedir or your lab’s top level directory.
 
Or literally just use ** and exclude everything if you don’t need it to index anything.

Latest revision as of 11:00, 11 April 2026

Tuning VSCode

Visual Studio Code (vscode) is a popular IDE used for writing code, and many people use the remote functionality feature to edit code on a remote server, which is very cool. But the issue with vscode is that it frequently opens way to many files on the remote server in an attempt to cache search databases and code modifications, and that unnecessarily puts a large burden on the remote server kernel for caching filehandles an such, slow down the remote filesystem and server you are working on.

The fix seems to be to edit this file on the remote server (NOT your laptop or local desktop):

 ~/.vscode-server/data/Machine/settings.json

Create that file if it does not already exist. Then put the following text in it:

{
 "search.exclude": {
   "**": true
 },
 "files.watcherExclude": {
   "**": true
 },
 "search.followSymlinks": false,
 "editor.quickSuggestions": {
   "other": false,
   "comments": false,
   "strings": false
 },
 "search.useIgnoreFiles": true,
 "search.useGlobalIgnoreFiles": true,
 "search.useRipgrep": false,
 "search.quickOpen.includeHistory": false,
 "search.quickOpen.includeSymbols": false,
 "remote.SSH.enableRemotePhpProxy": false
}

Then close vscode. The most reliable is to click on the bottom left where it usually says "SSH: mustard.prism" (or whatever server you are connected to). That populates the dropdown from the search bar, and at the bottom there is an action: "Close Remote Connection". Otherwise it seems to reconnect, stay connected in the background sometimes. Then save any open files you have in vscode and close vscode on your laptop or workstation, then re-open it.

Cursor / Positron / Antigravity

Since these IDEs are a fork of VSCode, they works exactly the same way, except the path to the file is different:

~/.cursor-server/data/Machine/settings.json
~/.positron-server/data/Machine/settings.json
~/.antigravity-server/data/Machine/settings.json


The contents of the JSON file is exactly as above however:

{
 "search.exclude": {
   "**": true
 },
 "files.watcherExclude": {
   "**": true
 },
 "search.followSymlinks": false,
 "editor.quickSuggestions": {
   "other": false,
   "comments": false,
   "strings": false
 },
 "search.useIgnoreFiles": true,
 "search.useGlobalIgnoreFiles": true,
 "search.useRipgrep": false,
 "search.quickOpen.includeHistory": false,
 "search.quickOpen.includeSymbols": false,
 "remote.SSH.enableRemotePhpProxy": false
}

Claude Code VSCode Extension

Also - if you use the Claude Code extension, then make sure Claude is not doing the same thing!

Use .claudeignore. This is crucial. Configure it to explicitly ignore any large data directories (like /private/groups/brookslab/ or miniconda3) inside the project root.  The file may look something like this:

# --- Large Data Directories ---
# Ignore the massive Nextflow or Snakemake work directories
work/
.nextflow/
results/

# --- Environment & Dependencies ---
# These are "metadata bombs" with thousands of tiny files
node_modules/
miniconda*/
miniforge*/
brookslab/
.venv/
venv/
__pycache__/
*.pyc

# --- Hidden System Files ---
# Crucial for Ceph: ignore the Mac resource forks
**/__MACOSX/**
**/.DS_Store

# --- Build & Logs ---
build/
dist/
*.log
.claude/  # Claude's own internal metadata.  Put that .claudeignore file in the root of any projects you have... Maybe even in your homedir or your lab’s top level directory.

Or literally just use ** and exclude everything if you don’t need it to index anything.