diff --git a/README.org b/README.org index 7580e85..25a79b6 100644 --- a/README.org +++ b/README.org @@ -493,16 +493,9 @@ I use Emacs as a Desktop Environment with the [[https://github.com/ch11ng/exwm][ exec dbus-launch --exit-with-session emacs -mm --debug-init #+end_src -When launching into a session, if the display server is not running then =startx= should be invoked, to run the window manager. Anything that needs to be included in the ~$PATH~ should occur before the end of this file. +When launching into a session, if the display server is not running then =startx= should be invoked, to run the window manager. #+begin_src sh :tangle ~/.local/source/dotfiles/config/profile -GOPATH="$HOME/.go/" -export GOPATH - -if [ -d "$GOPATH/bin" ]; then - PATH="$GOPATH/bin:$PATH" -fi - if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then exec startx fi @@ -1081,6 +1074,12 @@ Set the ~GOPATH~ environment variable prior to loading, this allows us to change Additionally, include the =bin= subdirectory of the ~$GOPATH~ in the ~$PATH~ variable, adding compiled golang programs. +#+begin_src emacs-lisp +(setenv "PATH" (concat (getenv "GOPATH") "bin:" (getenv "PATH"))) +#+end_src + +Finally we can include the =go-mode= package, integrating it with =lsp=. + #+begin_src emacs-lisp (use-package go-mode :hook (go-mode . lsp)) diff --git a/config/git b/config/git new file mode 100644 index 0000000..fbfdec5 --- /dev/null +++ b/config/git @@ -0,0 +1,5 @@ +[user] + email = chris@chrishayward.xyz + name = Christopher James Hayward +[github] + user = chayward1 diff --git a/config/profile b/config/profile index da4a491..2390b9d 100644 --- a/config/profile +++ b/config/profile @@ -1,10 +1,3 @@ -GOPATH="$HOME/.go/" -export GOPATH - -if [ -d "$GOPATH/bin" ]; then - PATH="$GOPATH/bin:$PATH" -fi - if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then exec startx fi diff --git a/modules/projects.el b/modules/projects.el index 96b89e1..cbfbb64 100644 --- a/modules/projects.el +++ b/modules/projects.el @@ -38,6 +38,8 @@ (setenv "GOPATH" (concat (getenv "HOME") "/.go/")) +(setenv "PATH" (concat (getenv "GOPATH") "bin:" (getenv "PATH"))) + (use-package go-mode :hook (go-mode . lsp))