Compare commits
3 Commits
54b784f6ba
...
5c88830f93
| Author | SHA1 | Date |
|---|---|---|
|
|
5c88830f93 | |
|
|
0ab89f02ba | |
|
|
8639ac6164 |
2
.aliases
2
.aliases
|
|
@ -41,3 +41,5 @@ alias venv='python -m venv'
|
||||||
alias venv2='python2 -m venv'
|
alias venv2='python2 -m venv'
|
||||||
alias venv3='python3 -m venv'
|
alias venv3='python3 -m venv'
|
||||||
alias dotvenv='source .venv/bin/activate'
|
alias dotvenv='source .venv/bin/activate'
|
||||||
|
alias todo='rusty-tasks'
|
||||||
|
alias ccat='highlight -O ansi --force'
|
||||||
|
|
|
||||||
16
.bashrc
16
.bashrc
|
|
@ -141,18 +141,4 @@ TERM=xterm-256color
|
||||||
export VISUAL=vim
|
export VISUAL=vim
|
||||||
export EDITOR="$VISUAL"
|
export EDITOR="$VISUAL"
|
||||||
|
|
||||||
# >>> conda initialize >>>
|
. "$HOME/.cargo/env"
|
||||||
# !! Contents within this block are managed by 'conda init' !!
|
|
||||||
__conda_setup="$('/home/andrei/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
eval "$__conda_setup"
|
|
||||||
else
|
|
||||||
if [ -f "/home/andrei/miniconda3/etc/profile.d/conda.sh" ]; then
|
|
||||||
. "/home/andrei/miniconda3/etc/profile.d/conda.sh"
|
|
||||||
else
|
|
||||||
export PATH="/home/andrei/miniconda3/bin:$PATH"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
unset __conda_setup
|
|
||||||
# <<< conda initialize <<<
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ local M = {}
|
||||||
local highlights = require "custom.highlights"
|
local highlights = require "custom.highlights"
|
||||||
|
|
||||||
M.ui = {
|
M.ui = {
|
||||||
theme = "tokyodark",
|
theme = "onedark",
|
||||||
theme_toggle = { "tokyodark", "one_light" },
|
theme_toggle = { "onedark", "one_light" },
|
||||||
|
|
||||||
hl_override = highlights.override,
|
hl_override = highlights.override,
|
||||||
hl_add = highlights.add,
|
hl_add = highlights.add,
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
-- if you just want default config for the servers then put them in a table
|
-- if you just want default config for the servers then put them in a table
|
||||||
local servers =
|
local servers =
|
||||||
{ "html", "cssls", "tsserver", "clangd", "docker_compose_language_service", "dockerls", "rust_analyzer", "pyright" }
|
{ "html", "cssls", "tsserver", "clangd", "docker_compose_language_service", "dockerls", "rust_analyzer", "pyright", "grammarly" }
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup({
|
lspconfig[lsp].setup({
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ M.mason = {
|
||||||
|
|
||||||
"jedi_language_server",
|
"jedi_language_server",
|
||||||
|
|
||||||
|
|
||||||
"docker_compose_language_service",
|
"docker_compose_language_service",
|
||||||
"dockerls",
|
"dockerls",
|
||||||
},
|
},
|
||||||
|
|
@ -62,4 +63,58 @@ M.nvimtree = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
M.cmp = function (_, opts)
|
||||||
|
local cmp = require "cmp"
|
||||||
|
opts.experimental = {
|
||||||
|
ghost_text = true,
|
||||||
|
}
|
||||||
|
opts.sources = cmp.config.sources({
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "luasnip" },
|
||||||
|
{ name = "nvim_lua" },
|
||||||
|
{ name = "path" },
|
||||||
|
{ name = "buffer", keyword_length = 5},
|
||||||
|
})
|
||||||
|
|
||||||
|
opts.mapping = cmp.config.mapping {
|
||||||
|
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||||
|
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||||
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
["<C-e>"] = cmp.mapping.close(),
|
||||||
|
["<C-y>"] = cmp.mapping.confirm {
|
||||||
|
behavior = cmp.ConfirmBehavior.Insert,
|
||||||
|
select = true,
|
||||||
|
},
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif require("luasnip").expand_or_jumpable() then
|
||||||
|
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, {
|
||||||
|
"i",
|
||||||
|
"s",
|
||||||
|
}),
|
||||||
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif require("luasnip").jumpable(-1) then
|
||||||
|
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, {
|
||||||
|
"i",
|
||||||
|
"s",
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
return opts
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@ M.general = {
|
||||||
n = {
|
n = {
|
||||||
-- harpoon
|
-- harpoon
|
||||||
["H"] = {function() require("harpoon.ui").toggle_quick_menu() end, "Open Harpoon" },
|
["H"] = {function() require("harpoon.ui").toggle_quick_menu() end, "Open Harpoon" },
|
||||||
["<leader>a"] = {function() require("harpoon.mark").add_file() end, "Add file to Harpoon"},
|
["<leader>ha"] = {function() require("harpoon.mark").add_file() end, "Add file to Harpoon"},
|
||||||
["<leader>s"] = {function() require("harpoon.ui").nav_file(1) end, "Switch to file 1"},
|
["<leader>hs"] = {function() require("harpoon.ui").nav_file(1) end, "Switch to file 1"},
|
||||||
["<leader>d"] = {function() require("harpoon.ui").nav_file(2) end, "Switch to file 2"},
|
["<leader>hd"] = {function() require("harpoon.ui").nav_file(2) end, "Switch to file 2"},
|
||||||
["<leader>f"] = {function() require("harpoon.ui").nav_file(3) end, "Switch to file 3"},
|
["<leader>hf"] = {function() require("harpoon.ui").nav_file(3) end, "Switch to file 3"},
|
||||||
["<leader>g"] = {function() require("harpoon.ui").nav_file(4) end, "Switch to file 4"},
|
["<leader>hg"] = {function() require("harpoon.ui").nav_file(4) end, "Switch to file 4"},
|
||||||
|
|
||||||
-- navigation
|
-- navigation
|
||||||
["<C-d>"] = {"<C-d>zz", "1/2 page down"},
|
["<C-d>"] = {"<C-d>zz", "1/2 page down"},
|
||||||
|
|
@ -17,7 +17,6 @@ M.general = {
|
||||||
["n"] = {"nzz", "find next"},
|
["n"] = {"nzz", "find next"},
|
||||||
["N"] = {"Nzz", "find prev"},
|
["N"] = {"Nzz", "find prev"},
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,16 @@
|
||||||
local overrides = require "custom.configs.overrides"
|
local overrides = require "custom.configs.overrides"
|
||||||
|
|
||||||
|
|
||||||
---@type NvPluginSpec[]
|
---@type NvPluginSpec[]
|
||||||
local plugins = {
|
local plugins = {
|
||||||
|
|
||||||
-- Override plugin definition options
|
-- Override plugin definition options
|
||||||
|
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
opts = overrides.cmp
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
|
@ -54,13 +60,24 @@ local plugins = {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ "nvim-treesitter/nvim-treesitter-context",
|
||||||
|
lazy = false,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"theprimeagen/harpoon",
|
"theprimeagen/harpoon",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
'simrat39/rust-tools.nvim'
|
'simrat39/rust-tools.nvim'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"ellisonleao/glow.nvim",
|
||||||
|
config = true,
|
||||||
|
cmd = "Glow",
|
||||||
|
event = 'BufEnter *.md',
|
||||||
|
},
|
||||||
|
|
||||||
-- Disable nvchad plugins
|
-- Disable nvchad plugins
|
||||||
|
|
||||||
|
|
@ -69,7 +86,6 @@ local plugins = {
|
||||||
lazy = false,
|
lazy = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
{ "NvChad/nvterm", enabled = false },
|
{ "NvChad/nvterm", enabled = false },
|
||||||
|
|
||||||
-- To make a plugin not be loaded
|
-- To make a plugin not be loaded
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,10 @@ bind b setw synchronize-panes
|
||||||
# setting vi mode
|
# setting vi mode
|
||||||
set-window-option -g mode-keys vi
|
set-window-option -g mode-keys vi
|
||||||
|
|
||||||
|
# reset working dir for session
|
||||||
|
unbind h
|
||||||
|
bind h attach-session -t . -c "#{pane_current_path}"
|
||||||
|
|
||||||
# status bar
|
# status bar
|
||||||
set -g status-right '♥#(acpi | cut -d ',' -f 2) | %H:%m %d-%b-%y '
|
set -g status-right '♥#(acpi | cut -d ',' -f 2) | %H:%m %d-%b-%y '
|
||||||
|
|
||||||
|
|
|
||||||
43
.zshrc
43
.zshrc
|
|
@ -107,15 +107,52 @@ function work() {
|
||||||
work_dirs=( "$HOME/clones" "$HOME/sandbox" )
|
work_dirs=( "$HOME/clones" "$HOME/sandbox" )
|
||||||
|
|
||||||
goto=$(find $work_dirs -maxdepth 1 -mindepth 1 -type d | fzf --query=$1 --preview "tree -C -L 2 {}")
|
goto=$(find $work_dirs -maxdepth 1 -mindepth 1 -type d | fzf --query=$1 --preview "tree -C -L 2 {}")
|
||||||
[ -z $goto ] && return
|
[ -z $goto ] && return
|
||||||
|
|
||||||
if [ -z $TMUX ]
|
if [ -z $TMUX ]
|
||||||
then
|
then
|
||||||
tmux new -A -s "$(basename -- $goto)" -c "$goto"
|
tmux new -A -s "$(basename -- $goto)" -c "$goto"
|
||||||
else
|
else
|
||||||
tmux new -d -s "$(basename -- $goto)" -c "$goto"
|
tmux new -d -s "$(basename -- $goto)" -c "$goto"
|
||||||
tmux switch-client -t "$(basename -- $goto)"
|
tmux switch-client -t "$(basename -- $goto)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# JINA_CLI_BEGIN
|
||||||
|
|
||||||
|
## autocomplete
|
||||||
|
if [[ ! -o interactive ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
compctl -K _jina jina
|
||||||
|
|
||||||
|
_jina() {
|
||||||
|
local words completions
|
||||||
|
read -cA words
|
||||||
|
|
||||||
|
if [ "${#words}" -eq 2 ]; then
|
||||||
|
completions="$(jina commands)"
|
||||||
|
else
|
||||||
|
completions="$(jina completions ${words[2,-2]})"
|
||||||
|
fi
|
||||||
|
|
||||||
|
reply=(${(ps:
|
||||||
|
:)completions})
|
||||||
|
}
|
||||||
|
|
||||||
|
# session-wise fix
|
||||||
|
ulimit -n 4096
|
||||||
|
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
||||||
|
|
||||||
|
# JINA_CLI_END
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue