Skip to content

Instantly share code, notes, and snippets.

@extremecoders-re
Last active June 26, 2025 16:07
Show Gist options
  • Save extremecoders-re/9e8e515aed82d95c205df45dffa8f5fd to your computer and use it in GitHub Desktop.
Save extremecoders-re/9e8e515aed82d95c205df45dffa8f5fd to your computer and use it in GitHub Desktop.

Revisions

  1. extremecoders-re revised this gist Apr 13, 2024. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,8 @@ Note the current goroot path

    Add the path to vscode *settings.json* (Workspace or Global)

    For workspace: config is saved in `.vscode/settings.json`

    ```
    {
    "go.goroot": "/home/ec/miniconda3/envs/go/go",
  2. extremecoders-re revised this gist Mar 30, 2023. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -30,4 +30,10 @@ However the installation of some tool will surely fail which needs to be install
    (goenv) $ go install -v golang.org/x/tools/gopls@latest
    ```

    The exact tools which failed and the corresponding command to install them can be found in the Output panel in VScode.
    The exact tools which failed and the corresponding command to install them can be found in the Output panel in VScode.

    ## References
    - https://github.com/golang/vscode-go/blob/master/docs/settings.md
    - https://github.com/golang/vscode-go/blob/master/docs/gopath.md
    - https://www.jetbrains.com/help/go/configuring-goroot-and-gopath.html
    - https://github.com/RcppCore/Rcpp/issues/770#issuecomment-346716808
  3. extremecoders-re created this gist Mar 30, 2023.
    33 changes: 33 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    ```
    $ conda create -n goenv go
    $ conda activate goenv
    (goenv) $ conda install -c conda-forge gxx_linux-64 # Required for the vscode go extension
    ```

    Note the current goroot path

    ```
    (goenv) $ go env GOROOT
    /home/ec/miniconda3/envs/go/go
    ```

    Add the path to vscode *settings.json* (Workspace or Global)

    ```
    {
    "go.goroot": "/home/ec/miniconda3/envs/go/go",
    }
    ```

    Next install the Go plugin for VScode. It will prompt to install a few tools. Click on "Install All".
    However the installation of some tool will surely fail which needs to be installed manually like.

    ```
    (goenv) $ go install -v github.com/cweill/gotests/[email protected]
    (goenv) $ go install -v github.com/haya14busa/goplay/cmd/[email protected]
    (goenv) $ go install -v github.com/go-delve/delve/cmd/dlv@latest
    (goenv) $ go install -v honnef.co/go/tools/cmd/staticcheck@latest
    (goenv) $ go install -v golang.org/x/tools/gopls@latest
    ```

    The exact tools which failed and the corresponding command to install them can be found in the Output panel in VScode.