Skip to content

Commit

Permalink
feat: Added vsh for zsh
Browse files Browse the repository at this point in the history
* Probably time to look at an alternative
  • Loading branch information
lukecollier committed Feb 19, 2024
1 parent a56695a commit b80e9cd
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 11 deletions.
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ cask "alacritty"
brew "reattach-to-user-namespace"
brew "coursier/formulas/coursier"
cask "font-jetbrains-mono-nerd-font"
brew "zsh-vi-mode"
31 changes: 30 additions & 1 deletion neovim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ require("lazy").setup({
},
init = function()
local metals_config = require("metals").bare_config()

metals_config.settings = {
showImplicitArguments = true,
showImplicitConversionsAndClasses = true,
showInferredType = true,
superMethodLensesEnabled = true,
gradleScript = "/Users/lcolli/Projects/work/df-federated-sql/fedsql/gradlew"
}
metals_config.init_options.statusBarProvider = "on"
metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities()
Expand Down Expand Up @@ -322,6 +322,10 @@ require("lazy").setup({
})
end
},
{
"github/copilot.vim",
tag = 'v1.15.0',
},
{
'VonHeikemen/lsp-zero.nvim',
branch = 'v3.x',
Expand Down Expand Up @@ -364,4 +368,29 @@ require("lazy").setup({
require('mason').setup({})
end
},
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
local harpoon = require("harpoon")
-- REQUIRED
harpoon:setup()
-- REQUIRED

vim.keymap.set("n", "<leader>a", function() harpoon:list():append() end)
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)

-- Toggle a harpoon marked

vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
vim.keymap.set("n", "<C-t>", function() harpoon:list():select(2) end)
vim.keymap.set("n", "<C-n>", function() harpoon:list():select(3) end)
vim.keymap.set("n", "<C-s>", function() harpoon:list():select(4) end)

-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end)
vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end)
end
}
})
17 changes: 7 additions & 10 deletions zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@ export PATH=/bin:/usr/bin:/usr/local/bin:${PATH}
eval "$(/opt/homebrew/bin/brew shellenv)"

# Vi mode
bindkey '^P' up-history
bindkey '^N' down-history
bindkey '^?' backward-delete-char
bindkey '^h' backward-delete-char
bindkey '^w' backward-kill-word
bindkey '^r' history-incremental-search-backward
bindkey -v
export KEYTIMEOUT=1
source $(brew --prefix)/opt/zsh-vi-mode/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh

# Vi mode
# History
HISTFILE=~/.zsh_history
HISTSIZE=1000000
SAVEHIST=$HISTSIZE
Expand All @@ -21,7 +14,7 @@ setopt SHARE_HISTORY

export VISUAL=nvim
export EDITOR=nvim

export ZVM_VI_EDITOR=nvim

alias ls="exa"
alias utcdate='date -u +"%Y-%m-%dT%H:%M:%SZ"'
Expand All @@ -46,3 +39,7 @@ precmd() { vcs_info }
zstyle ':vcs_info:git:*' formats '%b '
setopt PROMPT_SUBST
PROMPT='%F{yellow}%*%f %F{reset}$(basename $PWD)%f %F{green}${vcs_info_msg_0_}%F{reset}'

current_branch () {
echo $(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
}

0 comments on commit b80e9cd

Please sign in to comment.