~idmyn/dotfiles

ref: a1c52448bbe80a564a2bb1619ec4b940b4a73ee2 dotfiles/shell/elvish/rc.elv -rw-r--r-- 930 bytes
a1c52448 — David Mynors Replace lsp-mode with eglot a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# inspo: https://github.com/muesli/dotfiles/blob/master/shell/rc.elv

use epm
epm:install &silent-if-installed=$true \
    github.com/zzamboni/elvish-modules

use github.com/zzamboni/elvish-modules/terminal-title

E:EDITOR="emacs -nw"

E:ANDROID_HOME=$E:HOME"/Library/Android/sdk"

paths = [
  $E:ANDROID_HOME/emulator
  $E:ANDROID_HOME/tools
  $E:ANDROID_HOME/tools/bin
  $E:ANDROID_HOME/platform-tools
  ~/.cargo/bin
  ~/.asdf/shims
  /usr/local/opt/asdf/bin
  /usr/local/bin
  $@paths
]

# prompt
edit:prompt = { put "\n"; tilde-abbr $pwd; put "> " }
edit:rprompt = { put "" }

# keybindings
edit:insert:binding[Alt+Backspace]=$edit:kill-small-word-left~

# aliases
fn q { exit }
fn e [@a]{ open -a Emacs $@a }
fn gs [@a]{ git status $@a }
fn ls [@a]{ e:ls -GF $@a }
fn la [@a]{ ls -GFa $@a }
fn ll [@a]{ ls -GFalh $@a }
fn otp [@a]{ pass otp -c $@a }

# run this once: direnv hook elvish > ~/.elvish/lib/direnv.elv
use direnv