Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Commit

Permalink
added all the go tools
Browse files Browse the repository at this point in the history
* fix #3
* still troubleshooting delve derekparker/delve#15
  • Loading branch information
ctaggart committed Apr 26, 2016
1 parent 098d80d commit 63e40a4
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 12 deletions.
Empty file added .gitmodules
Empty file.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ ENV DEBIAN_FRONTEND noninteractive
RUN cd /root \
&& ./install-apt-packages.sh \
&& useradd -m vscode -s /bin/bash \
&& cp install-vscode-extension*.sh /home/vscode/ \
&& cp install-vscode-*.sh /home/vscode/ \
&& chown vscode:vscode /home/vscode/install-vscode-extension*.sh \
&& su vscode -c /home/vscode/install-vscode-extensions.sh
&& su - vscode -c /home/vscode/install-vscode-Go.sh

CMD su vscode -c "code -w /home/vscode"
CMD su - vscode -c "code -w /home/vscode"
46 changes: 44 additions & 2 deletions nut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,48 @@ mount:
- /home/vscode/golang-vscode
macros:
code:
usage: start vscode to edit this project
usage: open this project in vscode
actions:
- su vscode -c "code -w /home/vscode/golang-vscode"
- su - vscode -c "code -w /home/vscode/golang-vscode"
bash:
usage: start bash
actions:
- su - vscode

# macros to open vscode for the dependencies
gocode:
usage: open gocode in vscode
actions:
- su - vscode -c "code -w /home/vscode/go/src/github.com/nsf/gocode"
godef:
usage: open godef in vscode
actions:
- su - vscode -c "code -w /home/vscode/go/src/github.com/rogpeppe/godef"
golint:
usage: open golint in vscode
actions:
- su - vscode -c "code -w /home/vscode/go/src/github.com/golang/lint/golint"
go-outline:
usage: open go-outline in vscode
actions:
- su - vscode -c "code -w /home/vscode/go/src/github.com/lukehoban/go-outline"
goreturns:
usage: open goreturns in vscode
actions:
- su - vscode -c "code -w /home/vscode/go/src/sourcegraph.com/sqs/goreturns"
gorename:
usage: open gorename in vscode
actions:
- su - vscode -c "code -w /home/vscode/go/src/golang.org/x/tools/cmd/gorename"
gopkgs:
usage: open gopkgs in vscode
actions:
- su - vscode -c "code -w /home/vscode/go/src/github.com/tpng/gopkgs"
go-symbols:
usage: open go-symbols in vscode
actions:
- su - vscode -c "code -w /home/vscode/go/src/github.com/newhook/go-symbols"
guru:
usage: open guru in vscode
actions:
- su - vscode -c "code -w /home/vscode/go/src/golang.org/x/tools/cmd/guru"
22 changes: 22 additions & 0 deletions root/install-vscode-Go.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
dir=$(cd `dirname "$0"` && pwd)
# publisher extension version
$dir/install-vscode-extension.sh lukehoban Go 0.6.38

echo 'export GOPATH=$HOME/go' >> ~/.bash_profile
echo 'export PATH=$GOPATH/bin:/usr/local/go/bin:$PATH' >> ~/.bash_profile
. ~/.bash_profile

# https://github.com/Microsoft/vscode-go#tools
go get -u -v github.com/nsf/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/lukehoban/go-outline
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/newhook/go-symbols
go get -u -v golang.org/x/tools/cmd/guru

# https://github.com/derekparker/delve/blob/master/Documentation/installation/linux/install.md
go get github.com/derekparker/delve/cmd/dlv
7 changes: 0 additions & 7 deletions root/install-vscode-extensions.sh

This file was deleted.

0 comments on commit 63e40a4

Please sign in to comment.