{"id":20214934,"url":"https://github.com/nikolai2038/bash-ide-from-vs-code","last_synced_at":"2026-05-09T16:35:52.671Z","repository":{"id":261213070,"uuid":"881529127","full_name":"Nikolai2038/bash-ide-from-vs-code","owner":"Nikolai2038","description":"Instructions and extra files on how to set up VS Code as Bash/Shell scripts IDE","archived":false,"fork":false,"pushed_at":"2024-11-11T19:05:22.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T21:44:40.549Z","etag":null,"topics":["bash","bash-ide","code","extensions","ide","scripts","shell","vscode"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nikolai2038.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-31T18:53:56.000Z","updated_at":"2024-11-11T18:59:29.000Z","dependencies_parsed_at":"2025-01-13T21:43:50.957Z","dependency_job_id":"f5ce768f-3857-4395-9950-9ffc02c8c12c","html_url":"https://github.com/Nikolai2038/bash-ide-from-vs-code","commit_stats":null,"previous_names":["nikolai2038/bash-ide-from-vs-code"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikolai2038%2Fbash-ide-from-vs-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikolai2038%2Fbash-ide-from-vs-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikolai2038%2Fbash-ide-from-vs-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikolai2038%2Fbash-ide-from-vs-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nikolai2038","download_url":"https://codeload.github.com/Nikolai2038/bash-ide-from-vs-code/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241652965,"owners_count":19997578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bash-ide","code","extensions","ide","scripts","shell","vscode"],"created_at":"2024-11-14T06:18:52.148Z","updated_at":"2025-10-12T04:39:21.488Z","avatar_url":"https://github.com/Nikolai2038.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bash-ide-from-vs-code\n\nInstructions and extra files on how to set up VS Code as Bash/Shell scripts IDE.\n\n## 1. Install VS Code\n\nYou know how to do it, right? Riiiight..?\n\nAnyway, after installing/already having one, I recommend you to create separate profile and call it something fancy, for example, `Bash IDE`.\nYou can still install all the extensions in any or even all of your profiles, but be aware that most of the time when you will work on some, for example, Java project, you don't want to decrease your VS Code performance by running extra 10+ extensions you don't need right now.\nDecide what is more comfy for you here.\nFor me - it is the separate profile.\n\n## 2. Install language server\n\n- Arch Linux:\n\n    ```sh\n    sudo pacman --sync --refresh --needed bash-language-server\n    ```\n\n## 3. Install and configure main extensions\n\nBelow you will see descriptions and reasons to install each extension.\nAlso, the JSON provided is the VS Code settings I used to configure each extension.\nIf some settings are not provided, that means I left them with default.\n\nAlso, if you have suggestions and advices, feel free to add them via [issues](https://github.com/Nikolai2038/bash-ide-from-vs-code/issues) or [pull requests](https://github.com/Nikolai2038/bash-ide-from-vs-code/pulls)!\n\n### 3.1. [Bash IDE](https://marketplace.visualstudio.com/items?itemName=mads-hartmann.bash-ide-vscode)\n\nThis is main extension which gives us language server.\n\n```json\n// Follow redirection operators with a space (more readable)\n\"bashIde.shfmt.spaceRedirects\": true,\n// Increase number of files to analyze (analyze them all to not miss any reference to show)\n\"bashIde.backgroundAnalysisMaxFiles\": 9999,\n// Decrease logging level\n\"bashIde.logLevel\": \"warning\",\n// Disable \"shellcheck\" from Bash IDE - it is not working properly for some reason - and to not download anything in system - use \"ShellCheck\" extension instead with bundled command\n\"bashIde.shellcheckPath\": \"\",\n// Disable \"shfmt\" from Bash IDE - to not download anything in system - use \"shell-format\" extension instead with bundled command\n\"bashIde.shfmt.path\": \"\",\n```\n\n### 3.2. [File Watcher](https://marketplace.visualstudio.com/items?itemName=appulate.filewatcher)\n\nThis extension allow us to execute custom scripts on file changes.\nWe use it to update all links to the file and from the file to other files.\n\n```json\n// Run custom script on file rename, which will update all links to this files from other files, and all links from this file to others\n\"filewatcher.commands\": [\n    {\n        \"event\": \"onFileRename\",\n        \"match\": \".*\\\\.sh\",\n        \"cmd\": \"/usr/bin/bash_ide_from_vs_code_update_sources \\\"${workspaceRoot}\\\" \\\"${fileOld}\\\" \\\"${file}\\\"\"\n    },\n    {\n        \"event\": \"onFileChange\",\n        \"match\": \".*\\\\.sh\",\n        \"cmd\": \"/usr/bin/bash_ide_from_vs_code_sort_sources \\\"${file}\\\"\"\n    }\n],\n```\n\nI wrote scripts, which will do all the renames, and put them in this repository.\nYou can install them by running:\n\n```sh\nsudo wget -O /usr/bin/bash_ide_from_vs_code_update_sources https://raw.githubusercontent.com/Nikolai2038/bash-ide-from-vs-code/refs/heads/main/bash_ide_from_vs_code_update_sources.sh \u0026\u0026 \\\nsudo chmod +x /usr/bin/bash_ide_from_vs_code_update_sources \u0026\u0026 \\\nsudo wget -O /usr/bin/bash_ide_from_vs_code_sort_sources https://raw.githubusercontent.com/Nikolai2038/bash-ide-from-vs-code/refs/heads/main/bash_ide_from_vs_code_sort_sources.sh \u0026\u0026 \\\nsudo chmod +x /usr/bin/bash_ide_from_vs_code_sort_sources\n```\n\nOn how the scripts works - you can check by yourself.\nThey:\n\n- Replace links in `source` commands both in moved file and in files, where moved file is referenced;\n- Sort `source` commands in changed files.\n\nIf you found a bug or have a suggestion on how to optimize it, you will be the awesome man to let me know something that will make it better!\n\n### 3.3. [Path Autocomplete](https://marketplace.visualstudio.com/items?itemName=ionutvmi.path-autocomplete)\n\nThis extension will autocomplete relative paths to scripts when you entering them in `source`, `find`, etc.\n\n### 3.4. [ShellCheck](https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck)\n\nThis extension will lint all the problems in your code.\nThis can be also done with `Bash IDE` extension, but when I used it, it was not working properly - in my case some shell variable was declared as not declared, but it was - in another file, and sourced. With the `ShellCheck` extension this problem does not replicate.\n\n```json\n// Decrease logging level\n\"shellcheck.logLevel\": \"warn\",\n// Parse external files in \"source\" command\n\"shellcheck.customArgs\": [\n    \"--external-sources\"\n],\n```\n\n### 3.5. [shell-format](https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format)\n\nThis extension will autoformat code.\nYou can play with flags as you want, I leave here the ones I use.\nYou can also disable format on save if you want or when you are working on already written scripts and don't want all file to change.\n\n```json\n// Flags for formatting:\n// -s,  --simplify  simplify the code\n// -i,  --indent uint       0 for tabs (default), \u003e0 for number of spaces\n// -bn, --binary-next-line  binary ops like \u0026\u0026 and | may start a line\n// -ci, --case-indent       switch cases will be indented\n// -sr, --space-redirects   redirect operators will be followed by a space\n// -kp, --keep-padding      keep column alignment paddings\n// -fn, --func-next-line    function opening braces are placed on a separate line\n\"shellformat.flag\": \"--simplify --indent 2 --binary-next-line --case-indent --space-redirects\",\n// Autoformat\n\"[shellscript]\": {\n    \"editor.formatOnSave\": true,\n    \"editor.defaultFormatter\": \"foxundermoon.shell-format\"\n},\n```\n\n### 3.6. [TypeLens](https://marketplace.visualstudio.com/items?itemName=kisstkondoros.typelens)\n\nThis will show useful links above function declarations.\nYou can localize them for your language.\nI use English:\n\n```json\n\"typelens.noreferences\": \"No references found\",\n\"typelens.plural\": \"{0} references\",\n\"typelens.singular\": \"{0} reference\",\n```\n\nOther customizations:\n\n```json\n// Do not include function itself in it's usages\n\"typelens.excludeself\": true,\n// Do not grey out unused functions\n\"typelens.unusedcolor\": \"\",\n```\n\n### 3.7. [Shell Script Command Completion](https://marketplace.visualstudio.com/items?itemName=tetradresearch.vscode-h2o)\n\nThis extension is awesome - it provides suggestions for shell commands when you write them in your script.\n\n### 3.7. [Bash Debug](https://marketplace.visualstudio.com/items?itemName=rogalmic.bash-debug)\n\nTo debug Bash scripts.\n\n### 3.8. [Code Runner](https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner)\n\nRun shell script with the button.\n\n### 3.9. [shellman](https://marketplace.visualstudio.com/items?itemName=Remisa.shellman)\n\nUseful shell snippets.\n\n### 3.10. [Shebang Snippets](https://marketplace.visualstudio.com/items?itemName=rpinski.shebang-snippets)\n\nMore snippets.\n\n### 3.11. [Error Lens](https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens)\n\nTo show error messages inline. I disable showing errors for all lines except current - found that more useful (otherwise, for example, after some missed quotation mark, errors will fill all the lines to the end of the file):\n\n```json\n\"errorLens.followCursor\": \"activeLine\",\n```\n\n## 4. (Optional) Install and configure extra extensions\n\n### 4.1. GIT\n\n- [GitLens — Git supercharged](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) - It will bring more views to play with. I don't use paid version. For git log use `Git Graph` extension below. Config:\n\n    ```json\n    \"gitlens.codeLens.enabled\": false,\n    \"gitlens.currentLine.enabled\": false,\n    \"gitlens.showWelcomeOnInstall\": false,\n    \"gitlens.statusBar.enabled\": false,\n    \"gitlens.telemetry.enabled\": false,\n    ```\n\n- [Git Graph](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph) - Git log. Config I use:\n\n    ```json\n    \"git-graph.commitDetailsView.location\": \"Docked to Bottom\",\n    \"git-graph.date.format\": \"ISO Date \u0026 Time\",\n    \"git-graph.dialog.addTag.pushToRemote\": true,\n    \"git-graph.dialog.addTag.type\": \"Lightweight\",\n    \"git-graph.dialog.cherryPick.recordOrigin\": true,\n    \"git-graph.referenceLabels.combineLocalAndRemoteBranchLabels\": false,\n    ```\n\n- [Gitignore Ultimate](https://marketplace.visualstudio.com/items?itemName=quentinguidee.gitignore-ultimate) - `.gitignore` file autocompletion;\n- [Git History](https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory) - Views with history of changes in line, file;\n- [git-autoconfig](https://marketplace.visualstudio.com/items?itemName=shyykoserhiy.git-autoconfig) - Useful, if you have several accounts to commit from (work, for example). Otherwise, not needed. Extra setting:\n\n    ```json\n    // Run only on workspace start, not in background every 5 seconds\n    \"git-autoconfig.queryInterval\": 999999999,\n    ```\n\nExtra git settings I use:\n\n```json\n\"git.confirmSync\": false,\n\"git.autofetch\": true,\n\"git.enableSmartCommit\": true,\n\"diffEditor.ignoreTrimWhitespace\": false,\n// Don't find repositories automatically (because it bother, when working not in repositories)\n\"git.autoRepositoryDetection\": false,\n// Always open GIT repository in parent folders\n\"git.openRepositoryInParentFolders\": \"always\",\n\"git.replaceTagsWhenPull\": true,\n```\n\n### 4.2. Markdown\n\n- [Markdown All in One](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one) - Autocompletion;\n- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) - Lint syntax errors in your Markdown file.\n\n### 4.3. Useful\n\n- [Format in context menus](https://marketplace.visualstudio.com/items?itemName=lacroixdavid1.vscode-format-context-menu) - To right click folder and format all files in it! For the first launch, I recommend disabling format on save, because it will double the commands executing;\n- [Open Folder Context Menus for VS Code](https://marketplace.visualstudio.com/items?itemName=chrisdias.vscode-opennewinstance);\n- [Presentation Mode](https://marketplace.visualstudio.com/items?itemName=jspolancor.presentationmode) - Switch to presentation mode to show-off for someone;\n- [Project Manager](https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager) - Huge help. I recommend storing all your repositories in one/several folders, and then define them in `projectManager.git.baseFolders` setting;\n- [Statusbar Debugger](https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-statusbar-debugger) - Add debugger controls in statusbar. Very useful. Also, I moved initial buttons just in front off launch button;\n- [TODO Highlight](https://marketplace.visualstudio.com/items?itemName=wayou.vscode-todo-highlight) - Custom highlight styles for todo's. You can play with it. Config I use:\n\n    ```json\n    \"todohighlight.isEnable\": true,\n    \"todohighlight.isCaseSensitive\": false,\n    // Do not highlight explicit words\n    \"todohighlight.keywordsPattern\": \"\",\n    \"todohighlight.exclude\": [\n        \"**/node_modules/**\",\n        \"**/bower_components/**\",\n        \"**/dist/**\",\n        \"**/build/**\",\n        \"**/.vscode/**\",\n        \"**/.github/**\",\n        \"**/_output/**\",\n        \"**/*.min.*\",\n        \"**/*.map\",\n        \"**/.next/**\"\n    ],\n    \"todohighlight.maxFilesForSearch\": 99999,\n    \"todohighlight.toggleURI\": false,\n    \"todohighlight.keywords\": [\n        {\n            \"text\": \"DEBUG:\",\n            \"color\": \"green\",\n            \"border\": \"1px solid green\",\n            \"backgroundColor\": \"rgba(0,0,0,.2)\",\n            \"isWholeLine\": true,\n            \"overviewRulerColor\": \"green\",\n        },\n        {\n            \"text\": \"TODO:\",\n            \"color\": \"orange\",\n            \"border\": \"1px solid orange\",\n            \"backgroundColor\": \"rgba(0,0,0,.2)\",\n            \"isWholeLine\": true,\n            \"overviewRulerColor\": \"orange\"\n        },\n        {\n            \"text\": \"BUG:\",\n            \"color\": \"orange\",\n            \"border\": \"1px solid orange\",\n            \"backgroundColor\": \"rgba(0,0,0,.2)\",\n            \"isWholeLine\": true,\n            \"overviewRulerColor\": \"orange\"\n        },\n        {\n            \"text\": \"FIXME:\",\n            \"color\": \"red\",\n            \"border\": \"1px solid red\",\n            \"backgroundColor\": \"rgba(0,0,0,.2)\",\n            \"isWholeLine\": true,\n            \"overviewRulerColor\": \"red\"\n        },\n    ],\n    ```\n\n- [Todo Tree](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree) - Show all todo's in your workspace. I find it quite useful in list mode - simple. Config I use:\n\n    ```json\n    // Disable highlight, because we do it via \"TODO HighLight\" extension\n    \"todo-tree.highlights.enabled\": false,\n    \"todo-tree.general.tags\": [\n        \"DEBUG\",\n        \"TODO\",\n        \"BUG\",\n        \"FIXME\",\n    ],\n    \"todo-tree.tree.flat\": true,\n    ```\n\n- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) - Check spelling in code. This one is for English. You can install extensions `... - Code Spell Checker` for other languages too.\n\n### 4.4. Syntax highlight for some configs\n\nSince I use created Bash profile as default when opening folders on Linux, it is quite useful to have it configured to highlight syntax in several config files - Nginx, Apache, Vim, etc.\nFor that reason, I also installed:\n\n- [DotENV](https://marketplace.visualstudio.com/items?itemName=mikestead.dotenv) - For `.env` files with environment variables.\n- [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) - For YAML (`docker-compose` configurations);\n- [Even Better TOML](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml) - For TOML (`gitlab-runner` configurations);\n- [XML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml), [Auto Close Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag), [Auto Rename Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag) - For XML;\n- [VimL](https://marketplace.visualstudio.com/items?itemName=XadillaX.viml) - For `vim` configuration in `.vimrc`;\n- [Systemd Helper](https://marketplace.visualstudio.com/items?itemName=hangxingliu.vscode-systemd-support) - For SystemD unit files configurations;\n- [Apache Conf](https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-apache) - For Apache web server configurations;\n- [nginx.conf hint](https://marketplace.visualstudio.com/items?itemName=hangxingliu.vscode-nginx-conf-hint) - For Nginx web server configurations;\n- [Lua](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) - For Lua language (used by some Linux windows managers);\n- [Rainbow CSV](https://marketplace.visualstudio.com/items?itemName=mechatroner.rainbow-csv) - For CSV and TSV files;\n- [hunspell](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.hunspell) - For `.aff` and `.dic` dictionary files.\n\n### 4.5. Fancy\n\n- [Coloured Status Bar Problems](https://marketplace.visualstudio.com/items?itemName=bradzacher.vscode-coloured-status-bar-problems) - Add colors to icons in statusbar when there are more than 0 warnings/errors;\n- [indent-rainbow](https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow) - Highlight wrong indentation:\n\n    ```json\n    \"indentRainbow.colors\": [\n        // Transparent color - to disable it completely.\n        // I done it this way, because empty array will disable all the colors.\n        // This way, it will show only errors - color for them defined below.\n        \"rgba(255,255,255,0)\"\n    ],\n    \"indentRainbow.errorColor\": \"rgba(128,32,32,0.5)\",\n    ```\n\n- [Trailing Spaces](https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces) - highlight trailing spaces:\n\n    ```json\n    \"trailing-spaces.backgroundColor\": \"rgba(128,32,32,0.5)\",\n    \"trailing-spaces.borderColor\": \"rgba(255,100,100,0)\",\n    \"trailing-spaces.includeEmptyLines\": true,\n    \"trailing-spaces.trimOnSave\": true,\n    ```\n\n- [Unfancy file icons](https://marketplace.visualstudio.com/items?itemName=alexesprit.vscode-unfancy-file-icons) - Icons pack I use.\n\n### 4.6. Remote\n\n- [Remote Explorer](https://marketplace.visualstudio.com/items?itemName=ms-vscode.remote-explorer);\n- [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh);\n- [Remote - SSH: Editing Configuration Files](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh-edit).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolai2038%2Fbash-ide-from-vs-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikolai2038%2Fbash-ide-from-vs-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolai2038%2Fbash-ide-from-vs-code/lists"}