Skip to content

Commit

Permalink
Moving to zinit
Browse files Browse the repository at this point in the history
  • Loading branch information
daonb committed Mar 20, 2024
1 parent 3e7b367 commit 8609e87
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 31 deletions.
22 changes: 11 additions & 11 deletions .config/nvim/after/plugin/lspzero.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
local lsp = require('lsp-zero').preset({})
local lspconfig = require('lspconfig')
lspconfig.tsserver.setup {}
local lsp_zero = require('lsp-zero')

-- lsp.on_attach(function(client, bufnr)
-- lsp.default_keymaps({buffer = bufnr})
-- end)
lsp_zero.on_attach(function(client, bufnr)
-- see :help lsp-zero-keybindings
-- to learn the available actions
lsp_zero.default_keymaps({buffer = bufnr})
end)

lspconfig["gopls"].setup({
capabilities = capabilities,
on_attach = on_attach,
local lspconfig = require('lspconfig')
lspconfig.tsserver.setup {}
lspconfig.gopls.setup({})
lspconfig.pyright.setup({
pythonPath= "/Users/daonb/Library/Caches/pypoetry/virtualenvs/vault-RT5-Ioyu-py3.10/bin/python"
})

lspconfig["pylyzer"].setup({})
18 changes: 14 additions & 4 deletions .config/nvim/lua/daonb/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ return require('packer').startup(function(use)
requires = { "nvim-lua/plenary.nvim" },
})
-- use('jose-elias-alvarez/typescript.nvim')
use { "jackMort/ChatGPT.nvim",
requires = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim"
}
}


use({'nvim-lualine/lualine.nvim',
use {'nvim-lualine/lualine.nvim',
requires = { 'nvim-tree/nvim-web-devicons', opt = true },
})
}
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v2.x',
branch = 'v3.x',
requires = {
-- LSP Support
{'neovim/nvim-lspconfig'},
Expand All @@ -49,5 +55,9 @@ return require('packer').startup(function(use)
{'rafamadriz/friendly-snippets'},
}
}
use 'mfussenegger/nvim-dap'
use 'mfussenegger/nvim-dap-python'
use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} }
use {'github/copilot.vim', branch = 'release' }

end)
42 changes: 26 additions & 16 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ fi
if [ -d "/usr/local/opt/openssl/lib" ]; then
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/"
fi
# antigen - loading zsh plugins
source $HOME/.zsh/antigen.zsh
antigen bundle mafredri/zsh-async
antigen bundle djui/alias-tips
antigen bundle zsh-users/zsh-completions
antigen bundle zsh-users/zsh-syntax-highlighting
antigen apply
# direnv - loading a local .envrc on cd
eval "$(direnv hook zsh)"
# *** A Fittest IDE ***
Expand All @@ -44,24 +37,17 @@ unsetopt PROMPT_CR
# bindkey '^[[B' down-line-or-search
alias vi=nvim
alias hi="history -5000 | grep $1"
alias ll="lsd -l"
alias ll="lsd -l -I '**/__pycache__'"
alias zshc='nvim "$HOME/.zshrc"'
alias vic='nvim "$HOME/.config/nvim/init.vim"'
alias tmuxc='nvim "$HOME/.tmux.conf"'
alias lg="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias gdb="arch -arm64 dlv debug"
alias got="go test -v -race -coverprofile=coverage.txt -covermode=atomic"
alias llm="python3 -m llm"
alias imgcat="python3 -m imgcat"
# django (python framework) related aliases
alias m="poetry run python manage.py"
alias r="poetry run python manage.py runserver"
# Welcome message - fortune piped into a random cow
if [ $(uname -s) = "Darwin" ]; then
fortune | cowsay -f /usr/local/Cellar/cowsay/3.04/share/cows/kosh.cow
else
fortune | cowsay -f $(find "/usr/share/cowsay/cows/" | shuf | head -1) -n
fi
alias r="poetry run python manage.py runserver --settings elucd_vault.dev_settings"

eval "$(starship init zsh)"

Expand Down Expand Up @@ -94,3 +80,27 @@ if [ -f '/Users/daonb/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/dao

export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
# if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# Welcome message - fortune piped into a random cow or a plain one on mac
if [ -d /usr/share/cowsay/cows ]; then
fortune | cowsay -f $(find /usr/share/cowsay/cows | shuf | head -1) -n
else
fortune | cowsay
fi

### Added by Zinit's installer
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
print -P "%F{33} %F{34}Installation successful.%f%b" || \
print -P "%F{160} The clone has failed.%f%b"
fi

source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
# loading zsh plugins
zinit light-mode for \
djui/alias-tips \
zsh-users/zsh-completions \
zsh-users/zsh-syntax-highlighting

0 comments on commit 8609e87

Please sign in to comment.