Skip to content

VSCode Configurations

Python Environment

.vscode/extensions.json

json
{
  "recommendations": [
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode",
    "usernamehw.errorlens",
    "naumovs.color-highlight",
    "GitHub.copilot",
    "GitHub.github-vscode-theme",
    "olivierargentieri.tactac",
    "ms-python.black-formatter",
    "ms-python.python",
    "ms-python.vscode-pylance", // <-- For auto import and suggestions
    "ms-python.flake8",
    "PKief.material-icon-theme"
  ]
}

.vscode/settings.json

json
{
  "github.gitAuthentication": false,
  "editor.formatOnSave": true,
  "editor.detectIndentation": true,
  "editor.renderWhitespace": "boundary",
  "editor.suggestSelection": "recentlyUsed",
  "editor.suggest.showKeywords": false,
  "editor.insertSpaces": true,
  "editor.acceptSuggestionOnCommitCharacter": false,
  "editor.rulers": [80],
  "prettier.printWidth": 80,
  "window.zoomLevel": -2,
  "editor.tabSize": 2,
  "editor.wordWrap": "on",
  "workbench.editor.wrapTabs": true,
  "workbench.editor.doubleClickTabToToggleEditorGroupSizes": "off",
  "explorer.compactFolders": false,
  "editor.smoothScrolling": true,
  "editor.formatOnPaste": false,
  "editor.cursorSmoothCaretAnimation": "off",
  "explorer.confirmDragAndDrop": true,
  "explorer.confirmDelete": false,
  "material-icon-theme.activeIconPack": "angular",
  "files.exclude": {
    "**/._*": true,
    "**/__pycache__": true
  },
  "files.eol": "\n",
  "search.exclude": {
    "**/._*": true,
    "**/__pycache__": true,
    "**/venv": true,
    "**/.env": true
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": "always"
    },
    "editor.formatOnSave": true
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": "always"
    },
    "editor.formatOnSave": true
  },
  "[jsonl]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": "always"
    },
    "editor.formatOnSave": true
  },
  "python.envFile": "${workspaceFolder}/.env",
  // Pyllance auto import and suggestions
  "python.analysis.languageServerMode": "full",
  "python.analysis.extraPaths": [
    "${workspaceFolder}/venv/Lib/site-packages",
    "${workspaceFolder}/venv/lib/python3.13/site-packages"
  ],
  "flake8.args": ["--max-line-length=180"],
  "black-formatter.args": ["--line-length=180"],
  "[python]": {
    "editor.rulers": [180],
    "editor.tabSize": 4,
    "editor.defaultFormatter": "ms-python.black-formatter",
    "editor.codeActionsOnSave": {
      "source.organizeImports.ruff": "explicit"
    }
  },
  "terminal.integrated.enablePersistentSessions": false,
  "terminal.integrated.env.windows": {
    "PYTHONPATH": "${workspaceFolder}/venv/Lib/site-packages;",
    "PATH": "${env:PATH};${workspaceFolder}/venv/Scripts"
  }
}

Angular

.vscode/extensions.json

json
{
  "recommendations": [
    "angular.ng-template",
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode",
    "usernamehw.errorlens",
    "naumovs.color-highlight",
    "GitHub.copilot",
    "GitHub.github-vscode-theme",
    "olivierargentieri.tactac",
    "PKief.material-icon-theme"
  ]
}

.vscode/settings.json

json
{
  "github.gitAuthentication": false,
  "editor.formatOnSave": true,
  "editor.detectIndentation": true,
  "editor.renderWhitespace": "boundary",
  "editor.suggestSelection": "recentlyUsed",
  "editor.suggest.showKeywords": false,
  "editor.insertSpaces": true,
  "editor.acceptSuggestionOnCommitCharacter": false,
  "editor.rulers": [80],
  "window.zoomLevel": -2,
  "prettier.printWidth": 80,
  "editor.tabSize": 2,
  "editor.wordWrap": "on",
  "workbench.editor.wrapTabs": true,
  "workbench.editor.doubleClickTabToToggleEditorGroupSizes": "off",
  "explorer.compactFolders": false,
  "editor.smoothScrolling": true,
  "editor.formatOnPaste": false,
  "editor.cursorSmoothCaretAnimation": "off",
  "explorer.confirmDragAndDrop": true,
  "explorer.confirmDelete": false,
  "material-icon-theme.activeIconPack": "angular",
  "files.exclude": {
    "**/samplefile": true
  },
  "files.eol": "\n",
  "search.exclude": {
    "**/node_modules": true,
    "**/.env": true
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": "always"
    },
    "editor.formatOnSave": true
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": "always"
    },
    "editor.formatOnSave": true
  },
  "[jsonl]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": "always"
    },
    "editor.formatOnSave": true
  },
  "terminal.integrated.enablePersistentSessions": false,
  "terminal.integrated.env.windows": {
    "PATH": "${env:PATH};${workspaceFolder}"
  },
  "css.hover.references": false,
  "html.hover.references": false,
  "less.hover.references": false
}

C++ Setup

.vscode/settings.json

Don't forget to install clang-format from release

json
{
  "github.gitAuthentication": false,
  "editor.formatOnSave": true,
  "editor.detectIndentation": true,
  "editor.renderWhitespace": "boundary",
  "editor.suggestSelection": "recentlyUsed",
  "editor.suggest.showKeywords": false,
  "editor.insertSpaces": true,
  "editor.acceptSuggestionOnCommitCharacter": false,
  "editor.rulers": [80],
  "prettier.printWidth": 80,
  "window.zoomLevel": -2,
  "editor.tabSize": 2,
  "editor.wordWrap": "on",
  "workbench.editor.wrapTabs": true,
  "workbench.editor.doubleClickTabToToggleEditorGroupSizes": "off",
  "explorer.compactFolders": false,
  "editor.smoothScrolling": true,
  "editor.formatOnPaste": false,
  "editor.cursorSmoothCaretAnimation": "off",
  "explorer.confirmDragAndDrop": true,
  "explorer.confirmDelete": false,
  "material-icon-theme.activeIconPack": "angular",
  "clang-format.executable": "K:/Softwares/LLVM/bin/clang-format.exe",
  "clang-format.style": "file",
  "files.exclude": {
    "**/._*": true,
    "**/__pycache__": true
  },
  "files.eol": "\n",
  "search.exclude": {
    "**/._*": true,
    "**/__pycache__": true,
    "**/venv": true,
    "**/.env": true
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": "always"
    },
    "editor.formatOnSave": true
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": "always"
    },
    "editor.formatOnSave": true
  },
  "[jsonl]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": "always"
    },
    "editor.formatOnSave": true
  },
  "[c++]": {
    "editor.defaultFormatter": "xaver.clang-format",
    "editor.tabSize": 2,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": "always"
    },
    "editor.formatOnSave": true
  },
  "[cpp]": {
    "editor.defaultFormatter": "xaver.clang-format",
    "editor.formatOnSave": true
  },
  "terminal.integrated.enablePersistentSessions": false,
  "terminal.integrated.env.windows": {
    "PYTHONPATH": "${workspaceFolder}/venv/Lib/site-packages;",
    "PATH": "${env:PATH};${workspaceFolder}/venv/Scripts"
  }
}

.vscode/extensions.json

json
{
  "recommendations": [
    "ms-vscode.cpptools",
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode",
    "usernamehw.errorlens",
    "naumovs.color-highlight",
    "GitHub.copilot",
    "GitHub.github-vscode-theme",
    "olivierargentieri.tactac",
    "PKief.material-icon-theme",
    "xaver.clang-format"
  ]
}

And then place your .clang.format on the route of repos

.clang-format

yaml
---
Language: Cpp
Standard: Latest
IndentWidth: 4
UseTab: Never
TabWidth: 4
UseCRLF: false
MaxEmptyLinesToKeep: 2
AlignTrailingComments: true
ColumnLimit: 0

SortIncludes: CaseSensitive
IncludeBlocks: Preserve

PointerAlignment: Middle
SpaceBeforeCpp11BracedList: true
SpaceBeforeParens: Always
SpaceAfterCStyleCast: false
SpacesInCStyleCastParentheses: false

NamespaceIndentation: All
IndentCaseLabels: true
BinPackParameters: false
AlignAfterOpenBracket: Align

AlwaysBreakTemplateDeclarations: Yes

FixNamespaceComments: false

AccessModifierOffset: -4
BreakInheritanceList: AfterColon
BreakBeforeInheritanceComma: true
SpaceBeforeInheritanceColon: true

BreakConstructorInitializers: BeforeColon

AlignConsecutiveAssignments: Consecutive
AlignConsecutiveDeclarations: Consecutive

AllowShortIfStatementsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortLambdasOnASingleLine: None

BreakBeforeBraces: Allman
InsertBraces: true

ForEachMacros:
  - foreach
  - Q_FOREACH
  - BOOST_FOREACH
StatementMacros:
  - Q_UNUSED
  - QT_REQUIRE_VERSION
---