From 9eeb2f73896e6316e097d99814d0efcd3fd89f70 Mon Sep 17 00:00:00 2001 From: Ryan Kes <> Date: Sun, 7 Jun 2020 20:17:21 +0200 Subject: [PATCH] Got rid of haskell & added Golang / Rust --- emacs/.config/doom/configuration.org | 2 +- emacs/.config/doom/init.el | 4 ++-- fish/.config/omf/init.fish | 17 ++++++++-------- install | 23 +++++++++++++--------- neovim/.config/coc/extensions/package.json | 5 +++-- neovim/.config/nvim/coc-settings.json | 15 +++++++++++++- neovim/.config/nvim/init.vim | 4 ++++ zsh/.zshenv | 11 ++++++++--- 8 files changed, 54 insertions(+), 27 deletions(-) diff --git a/emacs/.config/doom/configuration.org b/emacs/.config/doom/configuration.org index 37fb493..79f0134 100644 --- a/emacs/.config/doom/configuration.org +++ b/emacs/.config/doom/configuration.org @@ -107,7 +107,7 @@ - Show images in buffers as default #+BEGIN_SRC emacs-lisp (setq org-directory "~/Documents/org" - org-agenda-files '("~/Documents/org" "~/Documents/org/freelance") + org-agenda-files (directory-files-recursively "~/Documents/org/" "\.org$") org-log-done 'note org-startup-with-inline-images t) #+END_SRC diff --git a/emacs/.config/doom/init.el b/emacs/.config/doom/init.el index c0fe125..8c8316f 100644 --- a/emacs/.config/doom/init.el +++ b/emacs/.config/doom/init.el @@ -76,8 +76,6 @@ +lsp) ledger ; an accounting system in Emacs markdown ; writing docs for people to ignore - (haskell ; Haskell support - + lsp) (org ; organize your plain life in plain text +roam +dragndrop ; drag & drop files/images into org buffers @@ -87,6 +85,8 @@ +lsp) ; perl's insecure younger brother (python +lsp) ; beautiful is better than ugly + (rust + +lsp) ; rust support (sh +lsp) ; she sells {ba,z,fi}sh shells on the C xor (web diff --git a/fish/.config/omf/init.fish b/fish/.config/omf/init.fish index c2f0198..7ee0cc2 100644 --- a/fish/.config/omf/init.fish +++ b/fish/.config/omf/init.fish @@ -33,7 +33,8 @@ end path_if_exists ~/.config/yarn/global/node_modules/.bin path_if_exists ~/.local/bin path_if_exists ~/.emacs.d/bin -path_if_exists ~/go/bin +path_if_exists ~/.local/share/go/bin +path_if_exists ~/.local/share/cargo/bin # Set GPG TTY set GPG_TTY (tty) @@ -70,12 +71,6 @@ set -xg MU_HOME ~/.cache/mu # Load xinit from the proper directory set -xgg XINITRC ~/.config/X11/xinitrc -# Make sure rust uses the proper directory -set -xg RUSTUP_HOME ~/.local/share/rustup - -# Set custom nprmrc path -set -xg NPM_CONFIG_USERCONFIG ~/.config/npm/npmrc - # bobthefish set -xg theme_nerd_fonts yes set -xg theme_color_scheme gruvbox @@ -86,8 +81,12 @@ set -xg sudope_sequence \e\e # Set tmux tmpdir to proper directory set -xg TMUX_TMPDIR "$XDG_RUNTIME_DIR" -# Haskell -set -xg STACK_ROOT ~/.local/share/stack +# Rust +set -xg CARGO_HOME ~/.local/share/cargo +set -xg RUSTUP_HOME ~/.local/share/rustup + +# Golang +set -xg GOPATH ~/.local/share/go # nvim alias alias v="nvim" diff --git a/install b/install index b14173d..959e759 100755 --- a/install +++ b/install @@ -1,11 +1,12 @@ #!/usr/bin/env fish # Prerequisite & inistalled apps -set prerequisiteApps bat broot brave caffeine-ng exa fslint fzf go graphviz isync imagemagick lightdm-gtk-greeter mailcap deadd-notification-center-bin npm pamixer pfetch playerctl pulseaudio pulsemixer python pywal stack stow sxiv tldr trayer udisks2 xwallpaper yarn zathura +set prerequisiteApps bat broot brave caffeine-ng exa fslint fzf graphviz isync imagemagick lightdm-gtk-greeter mailcap deadd-notification-center-bin npm pamixer pfetch playerctl pulseaudio pulsemixer python pywal stow sxiv tldr trayer udisks2 xwallpaper yarn zathura set prerequisiteFonts otf-nerd-fonts-fira-code noto-fonts ttf-unifont -set prerequisiteLsp bash-language-server ccls haskell-ide-engine php-language-server python-language-server typescript-language-server vscode-css-languageserver vscode-html-languageserver nodejs-intelephense -set configuredApps alacritty bspwm castero emacs firejail git gnupg gtk lf deadd-notification-center-bin mpd mpv mpv-mpris ncmpcpp neomutt neovim picom redshift spotifyd-dbus-mpris sxhkd tmux tuir weechat xmobar xmonad xmonad-contrib +set prerequisiteLsp bash-language-server ccls php-language-server python-language-server typescript-language-server-bin vscode-css-languageserver-bin vscode-html-languageserver-bin nodejs-intelephense +set configuredApps alacritty bspwm castero emacs firejail git gnupg gtk lf deadd-notification-center-bin mpd mpv mpv-mpris ncmpcpp neomutt neovim picom redshift spotifyd-dbus-mpris sxhkd tmux tuir weechat set locales aspell-en hunspell-en_GB hunspell-en_US hunspell-nl +set golang go golangci-lint-bin function mkdir_if_not_exist if [ ! -d "$argv" ] @@ -21,10 +22,10 @@ function install_omf_package_if_not_exist end end -function install_npm_package_if_not_exist - if ! npm -g list --depth 1 lighthouse >/dev/null 2>&1 - echo "Installing npm package $argv" - sudo npm install -g "$argv" +function install_yarn_package_if_not_exist + if ! yarn global list lighthouse >/dev/null 2>&1 + echo "Installing yarn package $argv" + yarn global add "$argv" end end @@ -55,6 +56,10 @@ for locale in $locales install_app_if_not_exist "$locale" end +for go in $golang + install_app_if_not_exist "$go" +end + # Create directories that need to exist mkdir_if_not_exist ~/.cache/mpd mkdir_if_not_exist ~/.config/alacritty @@ -127,8 +132,8 @@ nvim +PlugInstall +qall # Install Neovim coc extensions yarn --cwd ~/.config/coc/extensions install -# Install npm packages -install_npm_package_if_not_exist lighthouse +# Install yarn packages +install_yarn_package_if_not_exist lighthouse # Setup broot if not done already if [ ! -d ~/.local/share/broot ] diff --git a/neovim/.config/coc/extensions/package.json b/neovim/.config/coc/extensions/package.json index 7e826d7..40b3bc2 100644 --- a/neovim/.config/coc/extensions/package.json +++ b/neovim/.config/coc/extensions/package.json @@ -1,14 +1,15 @@ { "dependencies": { "coc-css": ">=1.2.3", - "coc-eslint": ">=1.2.7", + "coc-eslint": "^1.2.7", "coc-html": ">=1.2.4", "coc-jest": ">=1.0.3", "coc-json": ">=1.2.6", "coc-pairs": ">=1.2.21", "coc-prettier": ">=1.1.14", "coc-python": ">=1.2.12", + "coc-rls": ">=1.1.6", "coc-tsserver": ">=1.5.1", "coc-yaml": ">=1.0.4" } -} \ No newline at end of file +} diff --git a/neovim/.config/nvim/coc-settings.json b/neovim/.config/nvim/coc-settings.json index 56d65ee..b4a0bab 100644 --- a/neovim/.config/nvim/coc-settings.json +++ b/neovim/.config/nvim/coc-settings.json @@ -1,3 +1,16 @@ { - "coc.preferences.formatOnSaveFiletypes": ["css", "markdown", "javascript", "javascriptreact", "typescript", "typescriptreact", "json", "yaml", "html", "graphql", "mdx"], + "coc.preferences.formatOnSaveFiletypes": [ + "css", + "markdown", + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "json", + "yaml", + "html", + "graphql", + "mdx", + "rust" + ] } diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index d7ff7a6..bbb5eee 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -179,5 +179,9 @@ " Init jest in current cwd, require global jest command exists command! JestInit :call CocAction('runCommand', 'jest.init') + + " use and to navigate completion list + inoremap pumvisible() ? "\" : "\" + inoremap pumvisible() ? "\" : "\" " } " } diff --git a/zsh/.zshenv b/zsh/.zshenv index 80d5727..da00a48 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -11,7 +11,8 @@ TERM="xterm-256color" path_if_exists ~/.config/yarn/global/node_modules/.bin path_if_exists ~/.local/bin path_if_exists ~/.emacs.d/bin -path_if_exists ~/go/bin +path_if_exists ~/.local/share/go/bin +path_if_exists ~/.local/share/cargo/bin # Set GPG TTY export GPG_TTY="$(tty)" @@ -51,8 +52,12 @@ export XINITRC=~/.config/X11/xinitrc # This needs to be set for bspwm to see config export XDG_CONFIG_HOME="$HOME/.config" -# Haskell -export STACK_ROOT=~/.local/share/stack +# Rust +export CARGO_HOME=~/.local/share/cargo +export RUSTUP_HOME=~/.local/share/rustup + +# Golang +export GOPATH=~/.local/share/go # Enable icons in lf export LF_ICONS="\