wip
This commit is contained in:
parent
54b784f6ba
commit
0ab89f02ba
1
.aliases
1
.aliases
|
|
@ -41,3 +41,4 @@ alias venv='python -m venv'
|
|||
alias venv2='python2 -m venv'
|
||||
alias venv3='python3 -m venv'
|
||||
alias dotvenv='source .venv/bin/activate'
|
||||
alias todo='rusty-tasks'
|
||||
|
|
|
|||
35
.bashrc
35
.bashrc
|
|
@ -156,3 +156,38 @@ fi
|
|||
unset __conda_setup
|
||||
# <<< conda initialize <<<
|
||||
|
||||
|
||||
|
||||
# JINA_CLI_BEGIN
|
||||
|
||||
## autocomplete
|
||||
_jina() {
|
||||
COMPREPLY=()
|
||||
local word="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
||||
if [ "$COMP_CWORD" -eq 1 ]; then
|
||||
COMPREPLY=( $(compgen -W "$(jina commands)" -- "$word") )
|
||||
else
|
||||
local words=("${COMP_WORDS[@]}")
|
||||
unset words[0]
|
||||
unset words[$COMP_CWORD]
|
||||
local completions=$(jina completions "${words[@]}")
|
||||
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
|
||||
fi
|
||||
}
|
||||
|
||||
complete -F _jina jina
|
||||
|
||||
# session-wise fix
|
||||
ulimit -n 4096
|
||||
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
||||
# default workspace for Executors
|
||||
|
||||
# JINA_CLI_END
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ local M = {}
|
|||
local highlights = require "custom.highlights"
|
||||
|
||||
M.ui = {
|
||||
theme = "tokyodark",
|
||||
theme_toggle = { "tokyodark", "one_light" },
|
||||
theme = "onedark",
|
||||
theme_toggle = { "onedark", "one_light" },
|
||||
|
||||
hl_override = highlights.override,
|
||||
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
|
||||
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
|
||||
lspconfig[lsp].setup({
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ M.mason = {
|
|||
|
||||
"jedi_language_server",
|
||||
|
||||
|
||||
"docker_compose_language_service",
|
||||
"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
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ M.general = {
|
|||
n = {
|
||||
-- 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>s"] = {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>f"] = {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>ha"] = {function() require("harpoon.mark").add_file() end, "Add file to Harpoon"},
|
||||
["<leader>hs"] = {function() require("harpoon.ui").nav_file(1) end, "Switch to file 1"},
|
||||
["<leader>hd"] = {function() require("harpoon.ui").nav_file(2) end, "Switch to file 2"},
|
||||
["<leader>hf"] = {function() require("harpoon.ui").nav_file(3) end, "Switch to file 3"},
|
||||
["<leader>hg"] = {function() require("harpoon.ui").nav_file(4) end, "Switch to file 4"},
|
||||
|
||||
-- navigation
|
||||
["<C-d>"] = {"<C-d>zz", "1/2 page down"},
|
||||
|
|
@ -17,7 +17,6 @@ M.general = {
|
|||
["n"] = {"nzz", "find next"},
|
||||
["N"] = {"Nzz", "find prev"},
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,16 @@
|
|||
local overrides = require "custom.configs.overrides"
|
||||
|
||||
|
||||
---@type NvPluginSpec[]
|
||||
local plugins = {
|
||||
|
||||
-- Override plugin definition options
|
||||
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
opts = overrides.cmp
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
|
|
@ -54,6 +60,10 @@ local plugins = {
|
|||
end,
|
||||
},
|
||||
|
||||
{ "nvim-treesitter/nvim-treesitter-context",
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
{
|
||||
"theprimeagen/harpoon",
|
||||
},
|
||||
|
|
@ -62,6 +72,13 @@ local plugins = {
|
|||
'simrat39/rust-tools.nvim'
|
||||
},
|
||||
|
||||
{
|
||||
"ellisonleao/glow.nvim",
|
||||
config = true,
|
||||
cmd = "Glow",
|
||||
event = 'BufEnter *.md',
|
||||
},
|
||||
|
||||
-- Disable nvchad plugins
|
||||
|
||||
{
|
||||
|
|
@ -69,7 +86,6 @@ local plugins = {
|
|||
lazy = false,
|
||||
},
|
||||
|
||||
|
||||
{ "NvChad/nvterm", enabled = false },
|
||||
|
||||
-- To make a plugin not be loaded
|
||||
|
|
|
|||
37
.zshrc
37
.zshrc
|
|
@ -119,3 +119,40 @@ function work() {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
# 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