Setting Up Visual Studio Code For Max Elixir/Phoenix Efficiency?

I like VSCode with the elixir-ls extension because it gives me fast incremental dialyzer, formatter integration, documentation tooltips on hover and decent Intellisense out of the box without much config tinkering. TBH I’d use vim if I could get it all there that easily.

My VSCode config with some comments:

{
  // Elixir:
  "elixirLS.fetchDeps": false,
  "elixirLS.dialyzerWarnOpts": [
    "error_handling",
    "underspecs",
    "unknown",
    "unmatched_returns",
    // "overspecs",
    // "specdiffs"  // disabled because ecto / phoenix produce too many warnings
  ],

  // Privacy:
  "telemetry.enableTelemetry": false,
  "telemetry.enableCrashReporter": false,
  "workbench.settings.enableNaturalLanguageSearch": false,

  // Editor:
  "editor.minimap.enabled": false,
  "editor.overviewRulerBorder": false,
  "editor.glyphMargin": false,
  "editor.tabSize": 2,
  "editor.folding": false,

  // UI & general behaviour
  "terminal.integrated.fontFamily": "Ubuntu mono", // fixes invisible underscores in terminal on Ubuntu
  "window.menuBarVisibility": "toggle", // show menu only after clicking Alt
  "git.autorefresh": false, // I don't use the integration anyway
  "workbench.editor.enablePreview": false,

  // Search:
  "search.exclude": {
    "**/node_modules": true,
    "**/.elixir_ls": true
  },
  "explorer.autoReveal": false, // Prevents the browser from jumping around when switching files
}
6 Likes