Compare commits

...

4 Commits

Author SHA1 Message Date
Rob Watson 3f8f0fe495 feat(nvim): add binding 2024-09-23 08:36:54 +02:00
Rob Watson 2dd6cd4221 chore(nvim): rename lsp config 2024-09-23 08:36:50 +02:00
Rob Watson e9005dff17 chore(zsh): lower homebrew path priority 2024-09-23 08:32:39 +02:00
Rob Watson 453c272acf chore(git): add aliases 2024-09-23 08:16:57 +02:00
3 changed files with 11 additions and 8 deletions

View File

@ -23,6 +23,8 @@
cltms = !sh -c 'cd $HOME/dev && git clone $1 && cd $(basename $1 .git) && tmuxsess' -- cltms = !sh -c 'cd $HOME/dev && git clone $1 && cd $(basename $1 .git) && tmuxsess' --
co = checkout co = checkout
cols = !git checkout $(git branch | fzf) cols = !git checkout $(git branch | fzf)
comb = !git checkout $(git mainbranch)
cost = checkout staging
cp = cherry-pick cp = cherry-pick
cp2 = "!fn() { git cherry-pick $1~2..$1; }; fn" cp2 = "!fn() { git cherry-pick $1~2..$1; }; fn"
cp3 = "!fn() { git cherry-pick $1~3..$1; }; fn" cp3 = "!fn() { git cherry-pick $1~3..$1; }; fn"

View File

@ -9,6 +9,7 @@ local on_attach = function(client, bufnr)
vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "<Cmd>lua vim.lsp.buf.type_definition()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "<Cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>gD", "<Cmd>lua vim.lsp.buf.type_definition()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>gD", "<Cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>k", "<Cmd>lua vim.diagnostic.open_float()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>e", "<Cmd>lua vim.lsp.buf.rename()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>e", "<Cmd>lua vim.lsp.buf.rename()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>r", "<Cmd>lua vim.lsp.buf.references()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>r", "<Cmd>lua vim.lsp.buf.references()<CR>", opts)
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>i", "<Cmd>lua vim.lsp.buf.implementation()<CR>", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>i", "<Cmd>lua vim.lsp.buf.implementation()<CR>", opts)
@ -127,7 +128,7 @@ nvim_lsp.solargraph.setup({
-- Typescript -- Typescript
-- https://jose-elias-alvarez.medium.com/configuring-neovims-lsp-client-for-typescript-development-5789d58ea9c -- https://jose-elias-alvarez.medium.com/configuring-neovims-lsp-client-for-typescript-development-5789d58ea9c
nvim_lsp.tsserver.setup({ nvim_lsp.ts_ls.setup({
on_attach = on_attach, on_attach = on_attach,
}) })

14
zshrc
View File

@ -159,13 +159,6 @@ export KEYTIMEOUT=2
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# set PATHs (highest priority last) # set PATHs (highest priority last)
export PATH=$HOME/go/bin:$PATH
export PATH=$HOME/local/sbin:$PATH
export PATH=$HOME/local/bin:$PATH
export PATH=$HOME/bin:$PATH
export PATH=$HOME/.local/bin:$PATH
export PATH=$HOME/script:$PATH
if [ "$(uname -s)" = "Darwin" ]; then if [ "$(uname -s)" = "Darwin" ]; then
if [ -d /opt/homebrew/bin ]; then if [ -d /opt/homebrew/bin ]; then
export PATH=/opt/homebrew/bin:$PATH export PATH=/opt/homebrew/bin:$PATH
@ -176,6 +169,13 @@ if [ "$(uname -s)" = "Darwin" ]; then
export PATH="/Applications/Postgres.app/Contents/Versions/16/bin:$PATH" export PATH="/Applications/Postgres.app/Contents/Versions/16/bin:$PATH"
fi fi
export PATH=$HOME/go/bin:$PATH
export PATH=$HOME/local/sbin:$PATH
export PATH=$HOME/local/bin:$PATH
export PATH=$HOME/bin:$PATH
export PATH=$HOME/.local/bin:$PATH
export PATH=$HOME/script:$PATH
export VIMPLUGIN="$HOME/.vim/pack/git-plugins" export VIMPLUGIN="$HOME/.vim/pack/git-plugins"
# source local zshrc, if it exists (not: not in git) # source local zshrc, if it exists (not: not in git)