Compare commits
4 Commits
c1c454612f
...
2a80731f4a
Author | SHA1 | Date |
---|---|---|
Trevor Vallender | 2a80731f4a | |
Trevor Vallender | e39921edc1 | |
Trevor Vallender | d7d155178c | |
Trevor Vallender | 5d76b8ce01 |
|
@ -16,3 +16,6 @@ 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 init - bash)"
|
eval "$(~/.rbenv/bin/rbenv init - bash)"
|
||||||
|
|
||||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||||
|
|
|
@ -18,6 +18,7 @@ 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'
|
||||||
|
@ -39,3 +40,34 @@ 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'
|
||||||
|
|
||||||
|
|
|
@ -2,5 +2,4 @@
|
||||||
|
|
||||||
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
|
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
|
||||||
|
|
||||||
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
|
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}'
|
||||||
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
[user]
|
[user]
|
||||||
name = Trevor Vallender
|
name = Trevor Vallender
|
||||||
email = trevor@tsvallender.co.uk
|
email = trevor@tsvallender.co.uk
|
||||||
[includeIf "gitdir:~/foxsoft/"]
|
[includeIf "gitdir:~/boxstuff/"]
|
||||||
path = ~/.config/git/config_foxsoft
|
path = ~/.config/git/config_boxstuff
|
||||||
[includeIf "gitdir:~/fs/"]
|
|
||||||
path = ~/.config/git/config_foxsoft
|
|
||||||
[core]
|
[core]
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
safecrlf = true
|
safecrlf = true
|
||||||
|
@ -19,8 +17,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 develop
|
# Show all commits on the current branch but not main
|
||||||
curr = "!git log --no-merges \"$(git rev-parse --abbrev-ref HEAD)\" ^develop"
|
curr = "!git log --no-merges \"$(git rev-parse --abbrev-ref HEAD)\" ^main"
|
||||||
co = checkout
|
co = checkout
|
||||||
cm = commit
|
cm = commit
|
||||||
cma = commit --amend
|
cma = commit --amend
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
[user]
|
[user]
|
||||||
email = trevor@foxsoft.co.uk
|
email = trevor.vallender@boxstuff.com
|
||||||
[commit]
|
|
||||||
template = ~/foxsoft/git_template
|
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
monitor=,preferred,auto,auto
|
monitor=,preferred,auto,auto
|
||||||
|
|
||||||
windowrule = workspace 1, alacritty
|
windowrule = workspace 1, alacritty
|
||||||
windowrule = workspace 2, firefox
|
windowrule = workspace 1, 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 = qutebrowser
|
$browser = firefox
|
||||||
|
|
||||||
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,10 +71,6 @@ 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,42 +1,38 @@
|
||||||
{
|
{
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
"cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" },
|
"cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f94f7ba948e32cd302caba1c2ca3f7c697fb4fcf" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
||||||
"cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f0f53f704c08ea501f9d222b23491b0d354644b0" },
|
"cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" },
|
||||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
"codeium.vim": { "branch": "main", "commit": "e0342fde9474fdd0a36ff9692fe0031b7611a19f" },
|
||||||
"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": "bef9cbaa5c19ab85d8048f364bfc0ac8c7ab335d" },
|
|
||||||
"git-messenger.vim": { "branch": "master", "commit": "8a61bdfa351d4df9a9118ee1d3f45edbed617072" },
|
"git-messenger.vim": { "branch": "master", "commit": "8a61bdfa351d4df9a9118ee1d3f45edbed617072" },
|
||||||
"go.nvim": { "branch": "master", "commit": "9ac3e6faa32d01479973f4ca368d00b7ae328646" },
|
"go.nvim": { "branch": "master", "commit": "033344ddfa3cd5cfd55037903264b2bb86691619" },
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "6e4027ae957cddf7b193adfaec4a8f9e03b4555f" },
|
"gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" },
|
||||||
"guihua.lua": { "branch": "master", "commit": "9fb6795474918b492d9ab01b1ebaf85e8bf6fe0b" },
|
"guihua.lua": { "branch": "master", "commit": "225db770e36aae6a1e9e3a65578095c8eb4038d3" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "839f9e78e78dc935b1188fb16583365991739c51" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "af4c3cf17206810880d2a93562e0a4c0d901c684" },
|
"lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "82c7cb08ddb836ad938b2708e50085f12a8825d2" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "58bc9119ca273c0ce5a66fad1927ef0f617bd81b" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" },
|
"noice.nvim": { "branch": "main", "commit": "dd7363eae290ecdb9d6a2db6e0f59527df79edd6" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
|
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
|
"nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "c1695e500c7d552a0a19953a9aefcc89178fb1af" },
|
"nvim-dap": { "branch": "master", "commit": "bc03b83c94d0375145ff5ac6a6dcf28c1241e06f" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" },
|
"nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" },
|
||||||
"nvim-html-css": { "branch": "main", "commit": "c072b05c56a40d3ec7874fa487723e6bef5d97f8" },
|
"nvim-html-css": { "branch": "main", "commit": "c514bd27ad560636ed39dea3e370b3103754e244" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "d67715d3b746a19e951b6b0a99663fa909bb9e64" },
|
"nvim-lspconfig": { "branch": "master", "commit": "fa6c2a64100c6f692bbec29bbbc8ec2663c9e869" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "ed70af8ad9d4dafdb55539ed2b4454aac2a2a0c3" },
|
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "f7c09bd72e50e1795bd3afb9e2a2b157b4bfb3c3" },
|
"nvim-tree.lua": { "branch": "master", "commit": "4e396b26244444c911b73e9f2f40ae0115351fd1" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "36860295919fb18e57cd637b2a5f22e16f750c2f" },
|
"nvim-treesitter": { "branch": "master", "commit": "9d252d00210ed8d43197ef048daa94e6dc821bd6" },
|
||||||
"nvim-treesitter-endwise": { "branch": "master", "commit": "60e8c288e011403f248b5f6478dde12bed8a6c55" },
|
"nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "cb0c967c9723a76ccb1be0cc3a9a10e577d2f6ec" },
|
"nvim-web-devicons": { "branch": "master", "commit": "e612de3d3a41a6b7be47f51e956dddabcbf419d9" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
|
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||||
"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": "8d4e8d45385c63a0bf735fe1164772116bf0da0d" },
|
"vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" },
|
||||||
"vim-rails": { "branch": "master", "commit": "3a155462d1c346e291595400ca238037d02a357f" },
|
"vim-rails": { "branch": "master", "commit": "2fba7907f585819a8653f0bc7dd7f437a822d9c6" },
|
||||||
"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": "78557d972b4bfbb7488e17b5703d25164ae64e6a" }
|
"zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
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")
|
||||||
|
@ -15,6 +11,32 @@ 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,9 +4,4 @@ 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",
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
return {
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
config = function()
|
||||||
|
require'ibl'.setup()
|
||||||
|
end
|
||||||
|
}
|
|
@ -5,87 +5,6 @@ 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,
|
||||||
|
@ -94,8 +13,9 @@ end
|
||||||
function(server_name)
|
function(server_name)
|
||||||
require("lspconfig")[server_name].setup({})
|
require("lspconfig")[server_name].setup({})
|
||||||
end,
|
end,
|
||||||
["ruby_ls"] = function()
|
["ruby_lsp"] = function()
|
||||||
require("lspconfig").ruby_ls.setup({
|
require("lspconfig").ruby_lsp.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,5 +1,6 @@
|
||||||
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,12 @@
|
||||||
|
[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