Skip to content

Instantly share code, notes, and snippets.

@fkowal
Created January 30, 2019 20:22
Show Gist options
  • Save fkowal/85b183a36b9f4b508086dd7392acf500 to your computer and use it in GitHub Desktop.
Save fkowal/85b183a36b9f4b508086dd7392acf500 to your computer and use it in GitHub Desktop.
Some notes on VS Code for Scala programmers

VS Code Plugins and configuration tips

https://code.visualstudio.com/docs/setup/setup-overview

Plugins

Starting VS code from the command line

Open code with current directory

code .

Open the current directory in the most recently used code window

code -r .

Always create a new window

code -n

Configuration tips

Make project manager enumerating your git based projects:

"projectManager.git.baseFolders": ["/home/USERNAME/FOLDER","/home/USERNAME/ANOTHERFOLDER"]

Improving performance in the built in terminal (Tested on Ubuntu 18.04)

  • Change the terminal rendering (Terminal › Integrated: Renderer Type) to canvas
  • Start VS Code with code --ignore-gpu-blacklist

Toggle the terminal using a keybindings

{
    "key": "ctrl+[Backquote]",
    "command": "workbench.action.terminal.focus"
},
{
    "key": "ctrl+[Backquote]",
    "command": "workbench.action.focusActiveEditorGroup",
    "when": "terminalFocus"
},

Toggle maximized terminal

{
    "key": "ctrl+j",
    "command": "workbench.action.toggleMaximizedPanel"
},

Clear the terminal

{
    "key": "ctrl+l",
    "command": "workbench.debug.panel.action.clearReplAction"
}

Disable MS telemetry

"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,

Require Guest approvals for Live Share

"liveshare.guestApprovalRequired": true,

Remove the minimap to get some better performance:

"editor.minimap.enabled": false,

Always open up new Window maximized

"window.newWindowDimensions": "maximized"

Recommended search exclusion:

"search.exclude": {
    "**/.class": true,
    "**/.git": true,
    "**/.hg": true,
    "**/.idea": true,
    "**/.svn": true,
    "**/.vscode": true,
    "**/*.semanticdb": true,
    "**/bower_components": true,
    "**/node_modules": true,
    "**/project": true,
    "**/target": true,
    "**/.bloop": true,
    "**/.metals": true
},

Using latest Metals snapshot

"metals.serverVersion": "0.3.3+161-e6b9f172-SNAPSHOT",

https://scalameta.org/metals/docs/editors/vscode.html#using-latest-metals-snapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment