Compare commits
4 Commits
2a80731f4a
...
c1c454612f
Author | SHA1 | Date |
---|---|---|
Trevor Vallender | c1c454612f | |
Trevor Vallender | 76c5b36e93 | |
Trevor Vallender | 591f3bd6ce | |
Trevor Vallender | db2200f068 |
|
@ -16,6 +16,3 @@ CFLAGS="-Wall -Werror -Wextra"
|
||||||
alias cc="gcc ${CFLAGS}"
|
alias cc="gcc ${CFLAGS}"
|
||||||
alias update_ruby_build="git -C "$(rbenv root)"/plugins/ruby-build pull"
|
alias update_ruby_build="git -C "$(rbenv root)"/plugins/ruby-build pull"
|
||||||
alias irc="ssh kernighan -t tmux attach -t irc"
|
alias irc="ssh kernighan -t tmux attach -t irc"
|
||||||
alias krc="kamal app exec -i --reuse 'bin/rails c'"
|
|
||||||
alias krd="kamal app exec -i --reuse 'bin/rails dbconsole'"
|
|
||||||
alias krb="kamal app exec -i --reuse 'bash'"
|
|
||||||
|
|
6
.bashrc
6
.bashrc
|
@ -7,10 +7,10 @@ XDG_STATE_HOME=$HOME/.state
|
||||||
|
|
||||||
LC_ALL="en_GB.UTF-8"
|
LC_ALL="en_GB.UTF-8"
|
||||||
|
|
||||||
|
DIP=false
|
||||||
|
HYPRSHOT_DIR=/home/tsv/img/screenshots
|
||||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openssl-1.0.2u/lib
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openssl-1.0.2u/lib
|
||||||
XDG_DOWNLOAD_DIR=$HOME/downloads
|
XDG_DOWNLOAD_DIR=$HOME/downloads
|
||||||
XDG_PICTURES_DIR=$HOME/img
|
|
||||||
HYPRSHOT_DIR=$XDG_PICTURES_DIR/screenshots
|
|
||||||
|
|
||||||
# Sane defaults for history
|
# Sane defaults for history
|
||||||
HISTFILE=$XDG_STATE_HOME/.bash_history
|
HISTFILE=$XDG_STATE_HOME/.bash_history
|
||||||
|
@ -104,6 +104,6 @@ if ! shopt -oq posix; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval "$(~/.rbenv/bin/rbenv init - bash)"
|
eval "$(rbenv init - bash)"
|
||||||
|
|
||||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||||
|
|
|
@ -18,7 +18,6 @@ padding = { x = 20, y = 20 }
|
||||||
dynamic_padding = true
|
dynamic_padding = true
|
||||||
opacity = 0.95
|
opacity = 0.95
|
||||||
|
|
||||||
# Gruvbox dark
|
|
||||||
[colors.primary]
|
[colors.primary]
|
||||||
background = '#282828'
|
background = '#282828'
|
||||||
foreground = '#ebdbb2'
|
foreground = '#ebdbb2'
|
||||||
|
@ -40,34 +39,3 @@ blue = '#83a598'
|
||||||
magenta = '#d3869b'
|
magenta = '#d3869b'
|
||||||
cyan = '#8ec07c'
|
cyan = '#8ec07c'
|
||||||
white = '#ebdbb2'
|
white = '#ebdbb2'
|
||||||
|
|
||||||
# Gruvbox light
|
|
||||||
# # Default colors
|
|
||||||
# [colors.primary]
|
|
||||||
# # hard contrast background = = '#f9f5d7'
|
|
||||||
# background = '#fbf1c7'
|
|
||||||
# # soft contrast background = = '#f2e5bc'
|
|
||||||
# foreground = '#3c3836'
|
|
||||||
#
|
|
||||||
# # Normal colors
|
|
||||||
# [colors.normal]
|
|
||||||
# black = '#fbf1c7'
|
|
||||||
# red = '#cc241d'
|
|
||||||
# green = '#98971a'
|
|
||||||
# yellow = '#d79921'
|
|
||||||
# blue = '#458588'
|
|
||||||
# magenta = '#b16286'
|
|
||||||
# cyan = '#689d6a'
|
|
||||||
# white = '#7c6f64'
|
|
||||||
#
|
|
||||||
# # Bright colors
|
|
||||||
# [colors.bright]
|
|
||||||
# black = '#928374'
|
|
||||||
# red = '#9d0006'
|
|
||||||
# green = '#79740e'
|
|
||||||
# yellow = '#b57614'
|
|
||||||
# blue = '#076678'
|
|
||||||
# magenta = '#8f3f71'
|
|
||||||
# cyan = '#427b58'
|
|
||||||
# white = '#3c3836'
|
|
||||||
|
|
||||||
|
|
|
@ -45,3 +45,7 @@
|
||||||
.current {
|
.current {
|
||||||
color: #D65D0E;
|
color: #D65D0E;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.battery, .ram, .disk {
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
|
|
@ -6,15 +6,15 @@
|
||||||
|
|
||||||
(defwidget sidestuff []
|
(defwidget sidestuff []
|
||||||
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
|
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
|
||||||
|
(box :class "battery" :orientation "h" :space-evenly false
|
||||||
|
{battery != "" ? " ${battery}" : ""})
|
||||||
|
(box :class "ram" :orientation "h"
|
||||||
|
" ${ram}%")
|
||||||
|
(box :class "disk" :orientation "h"
|
||||||
|
" ${disk}")
|
||||||
(metric :label ""
|
(metric :label ""
|
||||||
:value { volume * 100 }
|
:value { volume * 100 }
|
||||||
:onchange "VOL=$(bc -l <<<\"scale=2; {} / 100\") ; wpctl set-volume @DEFAULT_AUDIO_SINK@ $VOL")
|
:onchange "VOL=$(bc -l <<<\"scale=2; {} / 100\") ; wpctl set-volume @DEFAULT_AUDIO_SINK@ $VOL")
|
||||||
(metric :label ""
|
|
||||||
:value {EWW_RAM.used_mem_perc}
|
|
||||||
:onchange "")
|
|
||||||
(metric :label ""
|
|
||||||
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
|
|
||||||
:onchange "")
|
|
||||||
time))
|
time))
|
||||||
|
|
||||||
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces")
|
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces")
|
||||||
|
@ -61,6 +61,15 @@
|
||||||
(defpoll volume :interval "1s"
|
(defpoll volume :interval "1s"
|
||||||
"scripts/getvol")
|
"scripts/getvol")
|
||||||
|
|
||||||
|
(defpoll battery :interval "1s"
|
||||||
|
"upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage | awk '{print $2}'")
|
||||||
|
|
||||||
|
(defpoll ram :interval "1s"
|
||||||
|
"MEM=$(free | grep Mem | awk '{print $3/$2 * 100.0}') ; echo \${MEM%.*}")
|
||||||
|
|
||||||
|
(defpoll disk :interval "1s"
|
||||||
|
"df | grep '/$' | awk '{print $5}'")
|
||||||
|
|
||||||
(defpoll time :interval "10s"
|
(defpoll time :interval "10s"
|
||||||
"date '+%H:%M %F'")
|
"date '+%H:%M %F'")
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,5 @@
|
||||||
|
|
||||||
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
|
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
|
||||||
|
|
||||||
socat -u UNIX-CONNECT:/run/user/$UID/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
|
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
|
||||||
|
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
[user]
|
[user]
|
||||||
name = Trevor Vallender
|
name = Trevor Vallender
|
||||||
email = trevor@tsvallender.co.uk
|
email = trevor@tsvallender.co.uk
|
||||||
[includeIf "gitdir:~/boxstuff/"]
|
[includeIf "gitdir:~/foxsoft/"]
|
||||||
path = ~/.config/git/config_boxstuff
|
path = ~/.config/git/config_foxsoft
|
||||||
|
[includeIf "gitdir:~/fs/"]
|
||||||
|
path = ~/.config/git/config_foxsoft
|
||||||
[core]
|
[core]
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
safecrlf = true
|
safecrlf = true
|
||||||
|
@ -17,8 +19,8 @@
|
||||||
br = branch
|
br = branch
|
||||||
cb = clone --bare
|
cb = clone --bare
|
||||||
cp = cherry-pick
|
cp = cherry-pick
|
||||||
# Show all commits on the current branch but not main
|
# Show all commits on the current branch but not develop
|
||||||
curr = "!git log --no-merges \"$(git rev-parse --abbrev-ref HEAD)\" ^main"
|
curr = "!git log --no-merges \"$(git rev-parse --abbrev-ref HEAD)\" ^develop"
|
||||||
co = checkout
|
co = checkout
|
||||||
cm = commit
|
cm = commit
|
||||||
cma = commit --amend
|
cma = commit --amend
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
[user]
|
[user]
|
||||||
email = trevor.vallender@boxstuff.com
|
email = trevor@foxsoft.co.uk
|
||||||
|
[commit]
|
||||||
|
template = ~/foxsoft/git_template
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
monitor=,preferred,auto,auto
|
monitor=,preferred,auto,1
|
||||||
|
|
||||||
windowrule = workspace 1, alacritty
|
windowrule = workspace 1, alacritty
|
||||||
windowrule = workspace 1, firefox
|
windowrule = workspace 2, firefox
|
||||||
|
windowrule = workspace 2, qutebrowser
|
||||||
|
windowrule = workspace 2, ^(.*)(Chrom)(.*)$
|
||||||
windowrule = workspace 2, thunderbird
|
windowrule = workspace 2, thunderbird
|
||||||
windowrule = workspace 2, ^(.*)(potify)(.*)$
|
|
||||||
|
|
||||||
exec-once = eww daemon && eww open bar
|
exec-once = eww daemon && eww open bar
|
||||||
|
exec-once = qutebrowser
|
||||||
exec-once = firefox
|
exec-once = firefox
|
||||||
exec-once = thunderbird
|
exec-once = thunderbird
|
||||||
exec-once = dunst & hyprpaper & alacritty
|
exec-once = dunst & hyprpaper & alacritty
|
||||||
exec-once = flatpak run com.spotify.Client
|
|
||||||
|
|
||||||
$terminal = alacritty
|
$terminal = alacritty
|
||||||
$menu = wofi --show drun
|
$menu = wofi --show drun
|
||||||
$browser = firefox
|
$browser = qutebrowser
|
||||||
|
|
||||||
env = XCURSOR_SIZE,24
|
env = XCURSOR_SIZE,24
|
||||||
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
|
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
|
||||||
env = SSH_AUTH_SOCK,$XDG_RUNTIME_DIR/ssh-agent.socket
|
|
||||||
|
|
||||||
input {
|
input {
|
||||||
kb_layout = us
|
kb_layout = us
|
||||||
|
@ -71,6 +71,10 @@ dwindle {
|
||||||
preserve_split = yes # you probably want this
|
preserve_split = yes # you probably want this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
master {
|
||||||
|
new_is_master = true
|
||||||
|
}
|
||||||
|
|
||||||
gestures {
|
gestures {
|
||||||
workspace_swipe = off
|
workspace_swipe = off
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +1,42 @@
|
||||||
{
|
{
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
||||||
"cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f94f7ba948e32cd302caba1c2ca3f7c697fb4fcf" },
|
"cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" },
|
||||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||||
"cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" },
|
"cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f0f53f704c08ea501f9d222b23491b0d354644b0" },
|
||||||
"codeium.vim": { "branch": "main", "commit": "e0342fde9474fdd0a36ff9692fe0031b7611a19f" },
|
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
"cmp-tmux": { "branch": "main", "commit": "95b1b921802e6f60627b3e76afb9380fddd87f9a" },
|
||||||
|
"cmp-treesitter": { "branch": "master", "commit": "13e4ef8f4dd5639fca2eb9150e68f47639a9b37d" },
|
||||||
|
"cmp_kitty": { "branch": "main", "commit": "a0716db2efb4c452600ef1e4a3ca610889279118" },
|
||||||
|
"codeium.vim": { "branch": "main", "commit": "f2d90dedb45e35f7563d2ce3a31c6928f79de678" },
|
||||||
"git-messenger.vim": { "branch": "master", "commit": "8a61bdfa351d4df9a9118ee1d3f45edbed617072" },
|
"git-messenger.vim": { "branch": "master", "commit": "8a61bdfa351d4df9a9118ee1d3f45edbed617072" },
|
||||||
"go.nvim": { "branch": "master", "commit": "033344ddfa3cd5cfd55037903264b2bb86691619" },
|
"go.nvim": { "branch": "master", "commit": "9ac3e6faa32d01479973f4ca368d00b7ae328646" },
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" },
|
"gruvbox.nvim": { "branch": "main", "commit": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f" },
|
||||||
"guihua.lua": { "branch": "master", "commit": "225db770e36aae6a1e9e3a65578095c8eb4038d3" },
|
"guihua.lua": { "branch": "master", "commit": "9fb6795474918b492d9ab01b1ebaf85e8bf6fe0b" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" },
|
"lazy.nvim": { "branch": "main", "commit": "3132d7d27d56d6bb4bdd0a09623d162b3cf1c588" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "839f9e78e78dc935b1188fb16583365991739c51" },
|
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" },
|
"lualine.nvim": { "branch": "master", "commit": "8b56462bfb746760465264de41b4907310f113ec" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "58bc9119ca273c0ce5a66fad1927ef0f617bd81b" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "82c7cb08ddb836ad938b2708e50085f12a8825d2" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
"mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "dd7363eae290ecdb9d6a2db6e0f59527df79edd6" },
|
"noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
"nui.nvim": { "branch": "main", "commit": "fbb139c6f14896b434d0229099e1acd863ae6bec" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" },
|
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "bc03b83c94d0375145ff5ac6a6dcf28c1241e06f" },
|
"nvim-dap": { "branch": "master", "commit": "fc880e82059eb21c0fa896be60146e5f17680648" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" },
|
"nvim-dap-ui": { "branch": "master", "commit": "9720eb5fa2f41988e8770f973cd11b76dd568a5d" },
|
||||||
"nvim-html-css": { "branch": "main", "commit": "c514bd27ad560636ed39dea3e370b3103754e244" },
|
"nvim-html-css": { "branch": "main", "commit": "c072b05c56a40d3ec7874fa487723e6bef5d97f8" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "fa6c2a64100c6f692bbec29bbbc8ec2663c9e869" },
|
"nvim-lspconfig": { "branch": "master", "commit": "7f5cf1121f772850a30bdaf83fb448e88846aa58" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
"nvim-nio": { "branch": "master", "commit": "ed70af8ad9d4dafdb55539ed2b4454aac2a2a0c3" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "4e396b26244444c911b73e9f2f40ae0115351fd1" },
|
"nvim-tree.lua": { "branch": "master", "commit": "efafd73efa9bc8c26282aed563ba0f01c7465b06" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "9d252d00210ed8d43197ef048daa94e6dc821bd6" },
|
"nvim-treesitter": { "branch": "master", "commit": "70f03829afa31f8b619b56296cdcaa921118d912" },
|
||||||
"nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
|
"nvim-treesitter-endwise": { "branch": "master", "commit": "60e8c288e011403f248b5f6478dde12bed8a6c55" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "e612de3d3a41a6b7be47f51e956dddabcbf419d9" },
|
"nvim-web-devicons": { "branch": "master", "commit": "4adea17610d140a99c313e3f79a9dc01825d59ae" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
|
||||||
"repl.nvim": { "branch": "master", "commit": "ec202eb5786b305c7d73b8cab5ee8fe69a2534a7" },
|
"repl.nvim": { "branch": "master", "commit": "ec202eb5786b305c7d73b8cab5ee8fe69a2534a7" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" },
|
"telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" },
|
||||||
"vim-cool": { "branch": "master", "commit": "662e7b11064cbeedad17c45d2fe926e78d3cd0b6" },
|
"vim-cool": { "branch": "master", "commit": "662e7b11064cbeedad17c45d2fe926e78d3cd0b6" },
|
||||||
"vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" },
|
"vim-fugitive": { "branch": "master", "commit": "41beedabc7e948c787ea5696e04c3544c3674e23" },
|
||||||
"vim-rails": { "branch": "master", "commit": "2fba7907f585819a8653f0bc7dd7f437a822d9c6" },
|
"vim-rails": { "branch": "master", "commit": "3a155462d1c346e291595400ca238037d02a357f" },
|
||||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||||
"vim-wordmotion": { "branch": "master", "commit": "81d9bd298376ab0dc465c85d55afa4cb8d5f47a1" },
|
"vim-wordmotion": { "branch": "master", "commit": "81d9bd298376ab0dc465c85d55afa4cb8d5f47a1" },
|
||||||
"zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" }
|
"zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" }
|
||||||
}
|
}
|
|
@ -1,9 +1,13 @@
|
||||||
local set = vim.opt
|
local set = vim.opt
|
||||||
|
set.autoindent = true
|
||||||
|
set.tabstop = 2
|
||||||
|
set.shiftwidth = 2
|
||||||
|
set.softtabstop = 2
|
||||||
|
set.expandtab = true
|
||||||
set.number = true
|
set.number = true
|
||||||
set.relativenumber = true
|
set.relativenumber = true
|
||||||
set.cursorline = true
|
set.cursorline = true
|
||||||
set.termguicolors = true
|
set.termguicolors = true
|
||||||
set.grepprg = 'rg --vimgrep --smart-case'
|
|
||||||
|
|
||||||
-- Improve terminal setup
|
-- Improve terminal setup
|
||||||
vim.api.nvim_command("autocmd TermOpen * startinsert")
|
vim.api.nvim_command("autocmd TermOpen * startinsert")
|
||||||
|
@ -11,32 +15,6 @@ vim.api.nvim_command("autocmd TermOpen * setlocal nonumber norelativenumber")
|
||||||
vim.api.nvim_command("autocmd TermEnter * setlocal signcolumn=no")
|
vim.api.nvim_command("autocmd TermEnter * setlocal signcolumn=no")
|
||||||
vim.keymap.set('t', '<esc>', "<C-\\><C-n>")
|
vim.keymap.set('t', '<esc>', "<C-\\><C-n>")
|
||||||
|
|
||||||
set.autoindent = true
|
|
||||||
set.expandtab = true
|
|
||||||
set.tabstop = 2
|
|
||||||
set.shiftwidth = 2
|
|
||||||
set.softtabstop = 2
|
|
||||||
vim.keymap.set('n', 'qq',
|
|
||||||
function()
|
|
||||||
vim.opt.autoindent = not vim.opt.autoindent:get()
|
|
||||||
vim.opt.expandtab = not vim.opt.expandtab:get()
|
|
||||||
if vim.opt.tabstop:get() == 2 then
|
|
||||||
vim.opt.tabstop = vim.opt.tabstop._info.default
|
|
||||||
else
|
|
||||||
vim.opt.tabstop = 2
|
|
||||||
end
|
|
||||||
if vim.opt.shiftwidth:get() == 2 then
|
|
||||||
vim.opt.shiftwidth = vim.opt.shiftwidth._info.default
|
|
||||||
else
|
|
||||||
vim.opt.shiftwidth = 2
|
|
||||||
end
|
|
||||||
if vim.opt.softtabstop:get() == 2 then
|
|
||||||
vim.opt.softtabstop = vim.opt.softtabstop._info.default
|
|
||||||
else
|
|
||||||
vim.opt.softtabstop = 2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
-- Strip trailing spaces on save
|
-- Strip trailing spaces on save
|
||||||
vim.api.nvim_create_autocmd({"BufWritePre"}, {
|
vim.api.nvim_create_autocmd({"BufWritePre"}, {
|
||||||
pattern = { "*" },
|
pattern = { "*" },
|
||||||
|
|
|
@ -4,4 +4,9 @@ return {
|
||||||
"hrsh7th/cmp-nvim-lsp-document-symbol",
|
"hrsh7th/cmp-nvim-lsp-document-symbol",
|
||||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||||
"ray-x/cmp-treesitter",
|
"ray-x/cmp-treesitter",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-cmdline",
|
||||||
|
"andersevenrud/cmp-tmux",
|
||||||
|
"garyhurtz/cmp_kitty",
|
||||||
|
"kdheepak/cmp-latex-symbols",
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
return {
|
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
|
||||||
config = function()
|
|
||||||
require'ibl'.setup()
|
|
||||||
end
|
|
||||||
}
|
|
|
@ -5,6 +5,87 @@ return {
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
-- textDocument/diagnostic support until 0.10.0 is released
|
||||||
|
_timers = {}
|
||||||
|
local function setup_diagnostics(client, buffer)
|
||||||
|
if require("vim.lsp.diagnostic")._enable then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local diagnostic_handler = function()
|
||||||
|
local params = vim.lsp.util.make_text_document_params(buffer)
|
||||||
|
client.request("textDocument/diagnostic", { textDocument = params }, function(err, result)
|
||||||
|
if err then
|
||||||
|
local err_msg = string.format("diagnostics error - %s", vim.inspect(err))
|
||||||
|
vim.lsp.log.error(err_msg)
|
||||||
|
end
|
||||||
|
local diagnostic_items = {}
|
||||||
|
if result then
|
||||||
|
diagnostic_items = result.items
|
||||||
|
end
|
||||||
|
vim.lsp.diagnostic.on_publish_diagnostics(
|
||||||
|
nil,
|
||||||
|
vim.tbl_extend("keep", params, { diagnostics = diagnostic_items }),
|
||||||
|
{ client_id = client.id }
|
||||||
|
)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
diagnostic_handler() -- to request diagnostics on buffer when first attaching
|
||||||
|
|
||||||
|
vim.api.nvim_buf_attach(buffer, false, {
|
||||||
|
on_lines = function()
|
||||||
|
if _timers[buffer] then
|
||||||
|
vim.fn.timer_stop(_timers[buffer])
|
||||||
|
end
|
||||||
|
_timers[buffer] = vim.fn.timer_start(200, diagnostic_handler)
|
||||||
|
end,
|
||||||
|
on_detach = function()
|
||||||
|
if _timers[buffer] then
|
||||||
|
vim.fn.timer_stop(_timers[buffer])
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- adds ShowRubyDeps command to show dependencies in the quickfix list.
|
||||||
|
-- add the `all` argument to show indirect dependencies as well
|
||||||
|
local function add_ruby_deps_command(client, bufnr)
|
||||||
|
vim.api.nvim_buf_create_user_command(bufnr, "ShowRubyDeps",
|
||||||
|
function(opts)
|
||||||
|
|
||||||
|
local params = vim.lsp.util.make_text_document_params()
|
||||||
|
|
||||||
|
local showAll = opts.args == "all"
|
||||||
|
|
||||||
|
client.request("rubyLsp/workspace/dependencies", params,
|
||||||
|
function(error, result)
|
||||||
|
if error then
|
||||||
|
print("Error showing deps: " .. error)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local qf_list = {}
|
||||||
|
for _, item in ipairs(result) do
|
||||||
|
if showAll or item.dependency then
|
||||||
|
table.insert(qf_list, {
|
||||||
|
text = string.format("%s (%s) - %s",
|
||||||
|
item.name,
|
||||||
|
item.version,
|
||||||
|
item.dependency),
|
||||||
|
|
||||||
|
filename = item.path
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.fn.setqflist(qf_list)
|
||||||
|
vim.cmd('copen')
|
||||||
|
end, bufnr)
|
||||||
|
end, {nargs = "?", complete = function()
|
||||||
|
return {"all"}
|
||||||
|
end})
|
||||||
|
end
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
|
@ -13,9 +94,8 @@ return {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
require("lspconfig")[server_name].setup({})
|
require("lspconfig")[server_name].setup({})
|
||||||
end,
|
end,
|
||||||
["ruby_lsp"] = function()
|
["ruby_ls"] = function()
|
||||||
require("lspconfig").ruby_lsp.setup({
|
require("lspconfig").ruby_ls.setup({
|
||||||
cmd = {"/home/tsv/.rbenv/shims/ruby-lsp"},
|
|
||||||
on_attach = function(client, buffer)
|
on_attach = function(client, buffer)
|
||||||
setup_diagnostics(client, buffer)
|
setup_diagnostics(client, buffer)
|
||||||
add_ruby_deps_command(client, buffer)
|
add_ruby_deps_command(client, buffer)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = ":TSUpdate",
|
|
||||||
config = function()
|
config = function()
|
||||||
require'nvim-treesitter.configs'.setup({
|
require'nvim-treesitter.configs'.setup({
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
/home/tsv/.config/systemd/user/syncthing.service
|
|
@ -1,12 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=SSH key agent
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
|
||||||
# DISPLAY required for ssh-askpass to work
|
|
||||||
Environment=DISPLAY=:0
|
|
||||||
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
Loading…
Reference in New Issue