VS Code Setup: Difference between revisions

From bibbleWiki
Jump to navigation Jump to search
No edit summary
Line 48: Line 48:
     ]
     ]
}
}
</syntaxhighlight>
=Set up Prettier=
Install
<syntaxhighlight lang="json">
sudo npm -g i prettier
</syntaxhighlight>
Change vscode settings
<syntaxhighlight lang="json">
{
    "prettier.semi": false
}
</syntaxhighlight>
Change .vsocde/settings.json
<syntaxhighlight lang="json">
{
    "prettier.semi": false
}
</syntaxhighlight>
Change package settings in package.json. I think this is because it is broken
<syntaxhighlight lang="json">
  "prettier": {
    "singleQuote": true,
    "semi": false
  }
</syntaxhighlight>
Change package.json to run prettier
<syntaxhighlight lang="json">
  "scripts": {
...
    "format": "prettier --write '**/*.{ts,js,css,html}'"
  },
</syntaxhighlight>
</syntaxhighlight>

Revision as of 21:47, 18 October 2020

Set up Java

Install Java JDK

sudo apt install default-jdk

Install Gradle

sudo add-apt-repository ppa:cwchien/gradle
sudo apt update
sudo apt install gradle

In Visual Studio install the Maven for Java and Gradle Tasks

Typescript

Install usual code but add the following to the setting for typescript. Search typescript in settings and change to json in settings.json. Dont forget to restart

"typescript.tsserver.experimental.enableProjectDiagnostics": true,

Set up GO

Install the GO extension and tools
For Gitlab create directory

mkdir -p ${GOROOT}/src/gitlab.com/<username>


Make a config, the default with program changed to ${workspaceRoot}

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "remotePath": "",
            "port":2345,
            "host": "127.0.0.1",
            "program": "${workspaceRoot}",
            "env": {},
            "args": [],
            "showLog": true
        }
    ]
}

Set up Prettier

Install

sudo npm -g i prettier

Change vscode settings

{
    "prettier.semi": false
}

Change .vsocde/settings.json

{
    "prettier.semi": false
}

Change package settings in package.json. I think this is because it is broken

  "prettier": {
    "singleQuote": true,
    "semi": false
  }

Change package.json to run prettier

  "scripts": {
...
    "format": "prettier --write '**/*.{ts,js,css,html}'"
  },