WSL specific config

This commit is contained in:
Gabriel Simmer 2022-05-15 22:12:49 +01:00
parent d53903ccae
commit e5bb40e580
3 changed files with 35 additions and 8 deletions

View file

@ -14,8 +14,8 @@
org-src-preserve-indentation t) org-src-preserve-indentation t)
;; stupid hacks ;; stupid hacks
(setenv "PATH" (global-set-key (kbd "C-c y") 'clipboard-yank)
(concat "/usr/local/bin/go" "/home/gsimmer/projects/go/bin" (getenv "PATH"))) (global-set-key (kbd "C-c x") 'kill-ring-save)
;; straight.el bootstrapping ;; straight.el bootstrapping
(defvar bootstrap-version) (defvar bootstrap-version)
@ -63,9 +63,19 @@
("C-c p" . projectile-command-map))) ("C-c p" . projectile-command-map)))
(use-package dired-sidebar :straight t :commands (dired-sidebar-toggle-sidebar)) (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 ;; lsp-mode stuff
(use-package eglot :straight t (use-package eglot :straight t
:config (add-hook 'go-mode-hook 'eglot-ensure)) :config (add-hook 'go-mode-hook 'eglot-ensure))
(use-package company :straight t (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) (use-package go-mode :straight t)

2
.zshrc
View file

@ -8,7 +8,7 @@ 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 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. # Starship init.
#eval "$(starship init zsh)" #eval "$(starship init zsh)"

View file

@ -44,7 +44,7 @@ plugins=(git fzf zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh 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 CARGOPATH="/home/gsimmer/.cargo/bin"
export PATH="/home/gsimmer/.local/bin:$GOPATH/bin:$CARGOPATH:$PATH" export PATH="/home/gsimmer/.local/bin:$GOPATH/bin:$CARGOPATH:$PATH"
@ -61,6 +61,13 @@ fi
if [ $(which rg) != 'rg not found' ]; then if [ $(which rg) != 'rg not found' ]; then
alias grep=rg alias grep=rg
fi 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 #+end_src
*** wezterm *** wezterm
@ -204,8 +211,8 @@ WantedBy=timers.target
org-src-preserve-indentation t) org-src-preserve-indentation t)
;; stupid hacks ;; stupid hacks
(setenv "PATH" (global-set-key (kbd "C-c y") 'clipboard-yank)
(concat "/usr/local/bin/go" "/home/gsimmer/projects/go/bin" (getenv "PATH"))) (global-set-key (kbd "C-c x") 'kill-ring-save)
;; straight.el bootstrapping ;; straight.el bootstrapping
(defvar bootstrap-version) (defvar bootstrap-version)
@ -253,11 +260,21 @@ WantedBy=timers.target
("C-c p" . projectile-command-map))) ("C-c p" . projectile-command-map)))
(use-package dired-sidebar :straight t :commands (dired-sidebar-toggle-sidebar)) (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 ;; lsp-mode stuff
(use-package eglot :straight t (use-package eglot :straight t
:config (add-hook 'go-mode-hook 'eglot-ensure)) :config (add-hook 'go-mode-hook 'eglot-ensure))
(use-package company :straight t (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) (use-package go-mode :straight t)
#+end_src #+end_src