Skip to content

Instantly share code, notes, and snippets.

@tiagofrancafernandes
Last active March 29, 2024 23:37
Show Gist options
  • Save tiagofrancafernandes/b1d48deae7ce5df21badd3f095cc1ca2 to your computer and use it in GitHub Desktop.
Save tiagofrancafernandes/b1d48deae7ce5df21badd3f095cc1ca2 to your computer and use it in GitHub Desktop.
dev-vscode extensions and configs

sleistner.vscode-fileutils jasonlhy.vscode-browser-sync jabacchetta.vscode-essentials SeyyedKhandon.fpack juninhosilva.package-plus-plus

/* echo '{"$schema": "http://json.schemastore.org/vsls","gitignore":"none","excludeFiles":[],"hideFiles": []}' > .vsls.json */
    // "liveshare.sharedTerminalHeight": 550,//Testar
    // ## START REQUIRED SETTINGS ##
    "git.autofetch": true, //Arvore de arquivos ou resumido (caso apenas 1 arquivo em diversas pastas vazias)
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": true,
    "files.eol": "\n",
    "files.autoSave": "off",
    "explorer.compactFolders": false,
    "files.trimTrailingWhitespace": true,
    "explorer.openEditors.visible": 9,
    "editor.inlineSuggest.enabled": true,
    "breadcrumbs.enabled": true,
    // ## END REQUIRED SETTINGS ##
    // ## START SUGEST SETTINGS ##
    //Segurança trust (modo restrito)
    "security.workspace.trust.untrustedFiles": "open",
    "security.workspace.trust.emptyWindow": false,
    "security.workspace.trust.enabled": false,
    "workbench.tree.expandMode": "singleClick",
    "workbench.tree.renderIndentGuides": "always",
    "workbench.commandPalette.preserveInput": true,
    "workbench.tree.indent": 30,
    "workbench.editor.highlightModifiedTabs": true,
    "editor.tabCompletion": "on",
    // "editor.folding": true, //se 'true', sempre encolherá o código baseado na 'strategy'
    "editor.folding": true,
    "editor.showFoldingControls": "always",
    "editor.foldingHighlight": true,
    "editor.foldingImportsByDefault": true,
    "notebook.showFoldingControls": "always",
    // "editor.foldingStrategy": "auto",/* auto = by language
    "editor.tabSize": 4,
    "editor.insertSpaces": true,
    // "editor.detectIndentation": true, //false=ignora os espaços que veio com o documento e pega o da config
    "editor.detectIndentation": false,
    "laravel-pint.enable": true,
    "laravel-pint.preset": "psr12",
    "laravel-pint.configPath": "/media/tiago/ext4_arquivos/home_disco2/tiago/pint.json",
    "laravel-pint.enableDebugLogs": true,
    "editor.minimap.showSlider": "always",
    // "editor.formatOnSaveMode": "modificationsIfAvailable",
    "editor.formatOnSaveMode": "modificationsIfAvailable",
    "editor.renderWhitespace": "all",
    "editor.foldingStrategy": "indentation", /**/
    /*PHP inteliphense*/
    "intelephense.diagnostics.enable": true,
    "intelephense.diagnostics.undefinedTypes": false,
    "intelephense.diagnostics.undefinedMethods": false,
    "intelephense.diagnostics.undefinedFunctions": false,
    "intelephense.maxMemory": 1024,
    "php.validate.enable": true,
    "php.validate.run": "onType",
    /*END PHP inteliphense*/
    // ## END SUGEST SETTINGS ##
    "[php]": {
        "editor.rulers": [
            120
        ], //vertical line
        "editor.defaultFormatter": "DEVSENSE.phptools-vscode",
        // "editor.defaultFormatter": "mhillmann.php-ide",
        // "editor.defaultFormatter": "DEVSENSE.phptools-vscode",
        "editor.formatOnSave": false, /**
        "editor.formatOnSave": true, /**/
        "editor.formatOnSaveMode": "modifications",
    },
    // @id:onecentlin.laravel-blade
    "emmet.triggerExpansionOnTab": true, // if you would like to enable blade format
    // "window.title": "${dirty}| PROJECT: ${rootName} | FILE: ${activeEditorLong}${separator}${appName} ",
    "window.dialogStyle": "custom",
    "window.titleBarStyle": "custom",
    "window.title": "${dirty}( 📂 ${rootName} ) (📝${activeEditorMedium})${separator}${appName} ${dirty",
    "editor.renderLineHighlight": "all",
    "editor.codeLens": true,
    "merge-conflict.decorators.enabled": true,
    "merge-conflict.diffViewPosition": "Below", // abre diff abaixo
    "scm.alwaysShowRepositories": true,
    "problems.decorations.enabled": true,
    "outline.problems.enabled": true,
    "outline.problems.colors": true,
    "outline.problems.badges": true,
    "markdown.preview.markEditorSelection": true,
    // "workbench.editor.pinnedTabSizing": "compact", //#tag pin pined
    // "workbench.editor.pinnedTabSizing": "compact",
    "workbench.editor.pinnedTabSizing": "shrink",
    "workbench.editor.untitled.labelFormat": "name",

    // @id:alefragnani.project-manager,
    "projectManager.confirmSwitchOnActiveWindow": "always",
    "projectManager.sortList": "Recent",
    "projectManager.supportSymlinksOnBaseFolders": true,
    "projectManager.removeCurrentProjectFromList": false,
    //

    //

Clonar o projeto direto no VSCode

  • Abra no navegador:
vscode://vscode.git/clone?url=REPO-URL

Exemplo:

## HTTPS
vscode://vscode.git/clone?url=https://github.com/tiagofrancafernandes/Demo-Laravel-CRUD.git
## SSH
vscode://vscode.git/clone?url=git@github.com:tiagofrancafernandes/Demo-Laravel-CRUD.git
## SSH URL parsed
vscode://vscode.git/clone?url=git%40github.com%3Atiagofrancafernandes%2FDemo-Laravel-CRUD.git

To run VSCode Server in Docker, you need to:

  1. Install Docker and SSH client.
  2. Add your user to the Docker group.
  3. Configure your SSH keys for the server.
  4. Edit ~/.config/Code/User/settings.json with "docker.host":"tcp://localhost:23750".
  5. Run the following command to create a container for VS Code Server that uses host network: docker run -d --name=vscode --restart=always --network=host -v /opt/vscode/workspace:/config/workspace -e PASSWORD=pwd123 -e SUDO_PASSWORD=pwd123 linuxserver/code-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment