From e5bb40e580113843ccf3d6c8307bf325117e5033 Mon Sep 17 00:00:00 2001 From: Gabriel Simmer Date: Sun, 15 May 2022 22:12:49 +0100 Subject: [PATCH] WSL specific config --- .emacs.d/init.el | 16 +++++++++++++--- .zshrc | 2 +- Dots.org | 25 +++++++++++++++++++++---- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 206a459..a96ef61 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -14,8 +14,8 @@ org-src-preserve-indentation t) ;; stupid hacks -(setenv "PATH" - (concat "/usr/local/bin/go" "/home/gsimmer/projects/go/bin" (getenv "PATH"))) +(global-set-key (kbd "C-c y") 'clipboard-yank) +(global-set-key (kbd "C-c x") 'kill-ring-save) ;; straight.el bootstrapping (defvar bootstrap-version) @@ -63,9 +63,19 @@ ("C-c p" . projectile-command-map))) (use-package dired-sidebar :straight t :commands (dired-sidebar-toggle-sidebar)) +;; I hate that I need this, but WSL is /special/. +(when (and (eq system-type 'gnu/linux) + (getenv "WSLENV")) + (use-package exec-path-from-shell :straight t) + (exec-path-from-shell-initialize) +) + ;; lsp-mode stuff (use-package eglot :straight t :config (add-hook 'go-mode-hook 'eglot-ensure)) (use-package company :straight t - :config (add-hook 'after-init-hook 'global-company-mode) (setq company-idle-delay 0) (setq company-minimum-prefix-length 1)) + :config + (add-hook 'after-init-hook 'global-company-mode) + (setq company-idle-delay 0) + (setq company-minimum-prefix-length 1)) (use-package go-mode :straight t) diff --git a/.zshrc b/.zshrc index e0b06c2..ed79bdd 100644 --- a/.zshrc +++ b/.zshrc @@ -8,7 +8,7 @@ source $ZSH/oh-my-zsh.sh export GOPATH="/home/gsimmer/projects/go" export CARGOPATH="/home/gsimmer/.cargo/bin" -export PATH="/usr/local/go/bin:/home/gsimmer/.local/bin:$GOPATH/bin:$CARGOPATH:$PATH" +export PATH="/home/gsimmer/.local/bin:$GOPATH/bin:$CARGOPATH:$PATH" # Starship init. #eval "$(starship init zsh)" diff --git a/Dots.org b/Dots.org index 5780fca..d5cffeb 100644 --- a/Dots.org +++ b/Dots.org @@ -44,7 +44,7 @@ plugins=(git fzf zsh-autosuggestions) source $ZSH/oh-my-zsh.sh -export GOPATH="/home/gsimmer/Projects/go" +export GOPATH="/home/gsimmer/projects/go" export CARGOPATH="/home/gsimmer/.cargo/bin" export PATH="/home/gsimmer/.local/bin:$GOPATH/bin:$CARGOPATH:$PATH" @@ -61,6 +61,13 @@ fi if [ $(which rg) != 'rg not found' ]; then alias grep=rg fi + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +export FLYCTL_INSTALL="/home/gsimmer/.fly" +export PATH="$FLYCTL_INSTALL/bin:$PATH" #+end_src *** wezterm @@ -204,8 +211,8 @@ WantedBy=timers.target org-src-preserve-indentation t) ;; stupid hacks -(setenv "PATH" - (concat "/usr/local/bin/go" "/home/gsimmer/projects/go/bin" (getenv "PATH"))) +(global-set-key (kbd "C-c y") 'clipboard-yank) +(global-set-key (kbd "C-c x") 'kill-ring-save) ;; straight.el bootstrapping (defvar bootstrap-version) @@ -253,11 +260,21 @@ WantedBy=timers.target ("C-c p" . projectile-command-map))) (use-package dired-sidebar :straight t :commands (dired-sidebar-toggle-sidebar)) +;; I hate that I need this, but WSL is /special/. +(when (and (eq system-type 'gnu/linux) + (getenv "WSLENV")) + (use-package exec-path-from-shell :straight t) + (exec-path-from-shell-initialize) +) + ;; lsp-mode stuff (use-package eglot :straight t :config (add-hook 'go-mode-hook 'eglot-ensure)) (use-package company :straight t - :config (add-hook 'after-init-hook 'global-company-mode) (setq company-idle-delay 0) (setq company-minimum-prefix-length 1)) + :config + (add-hook 'after-init-hook 'global-company-mode) + (setq company-idle-delay 0) + (setq company-minimum-prefix-length 1)) (use-package go-mode :straight t) #+end_src