update
This commit is contained in:
parent
191c2e4ecd
commit
f3c1524c2d
12 changed files with 254 additions and 30 deletions
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
["/nvim-neo-tree/neo-tree.nvim"] = { disable = true },
|
||||
-- ["/nvim-neo-tree/neo-tree.nvim"] = { disable = true },
|
||||
["rcarriga/nvim-notify"] = { disable = true },
|
||||
|
||||
--
|
||||
["catppuccin/nvim"] = {
|
||||
as = "catppuccin",
|
||||
config = function()
|
||||
|
|
@ -13,26 +13,22 @@ return {
|
|||
require("treesitter-context").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
["ahmedkhalf/project.nvim"] = {
|
||||
config = function()
|
||||
require("user.plugins.project")
|
||||
end,
|
||||
},
|
||||
|
||||
["kyazdani42/nvim-tree.lua"] = {
|
||||
config = function()
|
||||
require("user.plugins.nvim-tree")
|
||||
end,
|
||||
},
|
||||
|
||||
-- ["kyazdani42/nvim-tree.lua"] = {
|
||||
-- config = function()
|
||||
-- require("user.plugins.nvim-tree")
|
||||
-- end,
|
||||
-- },
|
||||
["kylechui/nvim-surround"] = {
|
||||
tag = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
config = function()
|
||||
require("nvim-surround").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
["s1n7ax/nvim-comment-frame"] = {
|
||||
requires = {
|
||||
{ "nvim-treesitter" },
|
||||
|
|
@ -50,14 +46,12 @@ return {
|
|||
requires = "nvim-treesitter/nvim-treesitter",
|
||||
tag = "*", -- stable releases
|
||||
},
|
||||
|
||||
["folke/todo-comments.nvim"] = {
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
config = function()
|
||||
require("todo-comments").setup({})
|
||||
end,
|
||||
},
|
||||
|
||||
["folke/trouble.nvim"] = {
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
config = function()
|
||||
|
|
@ -77,10 +71,22 @@ return {
|
|||
})
|
||||
end,
|
||||
},
|
||||
|
||||
["ThePrimeagen/harpoon"] = {
|
||||
config = function()
|
||||
require("user.plugins.harpoon")
|
||||
end,
|
||||
},
|
||||
["ckolkey/ts-node-action"] = {
|
||||
requires = { "nvim-treesitter" },
|
||||
config = function()
|
||||
require("user.plugins.ts-node-action")
|
||||
end,
|
||||
},
|
||||
["phaazon/mind.nvim"] = {
|
||||
branch = "v2",
|
||||
requires = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
require("user.plugins.mind")
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
1
config/astronvim/lua/user/plugins/mind.lua
Normal file
1
config/astronvim/lua/user/plugins/mind.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
require("mind").setup()
|
||||
142
config/astronvim/lua/user/plugins/neo-tree.lua
Normal file
142
config/astronvim/lua/user/plugins/neo-tree.lua
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
return {
|
||||
hide_root_node = true,
|
||||
retain_hidden_root_indent = true,
|
||||
enable_diagnostics = true,
|
||||
default_component_configs = {
|
||||
same_level = true,
|
||||
indent = {
|
||||
with_expanders = true,
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
added = "",
|
||||
deleted = "",
|
||||
modified = "",
|
||||
renamed = "➜",
|
||||
untracked = "★",
|
||||
ignored = "◌",
|
||||
unstaged = "✗",
|
||||
staged = "✓",
|
||||
conflict = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
window = {
|
||||
width = 30,
|
||||
mappings = {
|
||||
["<2-LeftMouse>"] = "open_with_window_picker",
|
||||
["<cr>"] = "open_with_window_picker",
|
||||
["o"] = "o",
|
||||
["l"] = "open_with_window_picker",
|
||||
["S"] = "split_with_window_picker:",
|
||||
["v"] = "vsplit_with_window_picker:",
|
||||
["h"] = "close_node",
|
||||
["<esc>"] = "end_preview",
|
||||
["<tab>"] = { "toggle_preview", config = { use_float = true } },
|
||||
["."] = "set_root",
|
||||
["i"] = "toggle_hidden",
|
||||
["R"] = "refresh",
|
||||
["/"] = "fuzzy_finder",
|
||||
["f"] = "filter_on_submit",
|
||||
["<c-x>"] = "clear_filter",
|
||||
["a"] = { "add", config = { show_path = "relative" } },
|
||||
["d"] = "delete",
|
||||
["r"] = "rename",
|
||||
["y"] = "copy_to_clipboard",
|
||||
["x"] = "cut_to_clipboard",
|
||||
["p"] = "paste_from_clipboard",
|
||||
["c"] = "copy",
|
||||
["m"] = "move",
|
||||
["q"] = "close_window",
|
||||
["e"] = function()
|
||||
vim.api.nvim_exec("Neotree focus filesystem left", true)
|
||||
end,
|
||||
["b"] = function()
|
||||
vim.api.nvim_exec("Neotree focus buffers left", true)
|
||||
end,
|
||||
["g"] = function()
|
||||
vim.api.nvim_exec("Neotree focus git_status left", true)
|
||||
end,
|
||||
},
|
||||
},
|
||||
filesystem = {
|
||||
group_empty_dirs = true,
|
||||
hijack_netrw_behavior = "open_default",
|
||||
filtered_items = {
|
||||
hide_by_name = {
|
||||
".DS_Store",
|
||||
"thumbs.db",
|
||||
"node_modules",
|
||||
"__pycache__",
|
||||
},
|
||||
},
|
||||
components = {
|
||||
harpoon_index = function(config, node)
|
||||
local Marked = require("harpoon.mark")
|
||||
local path = node:get_id()
|
||||
local succuss, index = pcall(Marked.get_index_of, path)
|
||||
if succuss and index and index > 0 then
|
||||
return {
|
||||
text = string.format("-> %d", index), -- <-- Add your favorite harpoon like arrow here
|
||||
highlight = config.highlight or "NeoTreeDirectoryIcon",
|
||||
}
|
||||
else
|
||||
return {}
|
||||
end
|
||||
end,
|
||||
},
|
||||
renderers = {
|
||||
file = {
|
||||
{ "icon" },
|
||||
{ "name", use_git_status_colors = true },
|
||||
{ "harpoon_index" }, --> This is what actually adds the component in where you want it
|
||||
{ "diagnostics" },
|
||||
{ "git_status", highlight = "NeoTreeDimText" },
|
||||
},
|
||||
},
|
||||
window = {
|
||||
mappings = {
|
||||
["h"] = "close_node",
|
||||
},
|
||||
},
|
||||
},
|
||||
buffers = {
|
||||
show_unloaded = true,
|
||||
window = {
|
||||
mappings = {
|
||||
["bd"] = "buffer_delete",
|
||||
},
|
||||
},
|
||||
},
|
||||
git_status = {
|
||||
window = {
|
||||
position = "float",
|
||||
mappings = {
|
||||
["A"] = "git_add_all",
|
||||
["gu"] = "git_unstage_file",
|
||||
["ga"] = "git_add_file",
|
||||
["gr"] = "git_revert_file",
|
||||
["gc"] = "git_commit",
|
||||
["gp"] = "git_push",
|
||||
["gg"] = "git_commit_and_push",
|
||||
},
|
||||
},
|
||||
},
|
||||
event_handlers = {
|
||||
{
|
||||
event = "vim_buffer_enter",
|
||||
handler = function(_)
|
||||
if vim.bo.filetype == "neo-tree" then
|
||||
vim.wo.signcolumn = "auto"
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
event = "file_opened",
|
||||
handler = function()
|
||||
--auto close
|
||||
require("neo-tree").close_all()
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -29,18 +29,43 @@ tree.setup({
|
|||
list = {
|
||||
{ key = { "l", "<CR>", "o", "<2-LeftMouse>" }, action = "edit" },
|
||||
-- {key = {"L", "<2-RightMouse>", "<C-]>"}, action = "cd"},
|
||||
{ key = "s", action = "vsplit" },
|
||||
{ key = "v", action = "split" },
|
||||
{ key = "t", action = "tabnew" },
|
||||
{ key = { "h", "<BS>" }, action = "close_node" },
|
||||
{ key = "i", action = "toggle_dotfiles" },
|
||||
{ key = "I", action = "toggle_ignored" },
|
||||
{ key = { "<C-l>", "<C-CR>" }, cb = tree_cb("system_open") },
|
||||
{ key = "s", action = "vsplit" },
|
||||
{ key = "v", action = "split" },
|
||||
{ key = "t", action = "tabnew" },
|
||||
{ key = { "h", "<BS>" }, action = "close_node" },
|
||||
{ key = "i", action = "toggle_dotfiles" },
|
||||
{ key = "I", action = "toggle_ignored" },
|
||||
{ key = { "<C-l>", "<C-CR>" }, cb = tree_cb("system_open") },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Auto open when a dir is opened
|
||||
|
||||
local function open_nvim_tree(data)
|
||||
-- buffer is a directory
|
||||
local directory = vim.fn.isdirectory(data.file) == 1
|
||||
|
||||
if not directory then
|
||||
return
|
||||
end
|
||||
|
||||
-- create a new, empty buffer
|
||||
vim.cmd.enew()
|
||||
|
||||
-- wipe the directory buffer
|
||||
vim.cmd.bw(data.buf)
|
||||
|
||||
-- change to the directory
|
||||
vim.cmd.cd(data.file)
|
||||
|
||||
-- open the tree
|
||||
require("nvim-tree.api").tree.open()
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||
|
||||
-- bindings
|
||||
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
|
||||
vim.keymap.set("n", "<C-e>", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
|
||||
|
|
|
|||
12
config/astronvim/lua/user/plugins/ts-node-action.lua
Normal file
12
config/astronvim/lua/user/plugins/ts-node-action.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
require("ts-node-action").setup({})
|
||||
|
||||
vim.keymap.set({ "n" }, "<leader>lA", require("ts-node-action").node_action, { desc = "Trigger Node Action" })
|
||||
|
||||
require("null-ls").register({
|
||||
name = "more_actions",
|
||||
method = { require("null-ls").methods.CODE_ACTION },
|
||||
filetypes = { "_all" },
|
||||
generator = {
|
||||
fn = require("ts-node-action").available_actions,
|
||||
},
|
||||
})
|
||||
|
|
@ -24,10 +24,10 @@ cat <<-EOF
|
|||
EOF
|
||||
)"
|
||||
|
||||
export FZF_THEME_CATPPUCCIN_MOCHA="
|
||||
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
|
||||
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
|
||||
--color=marker:#f5e0dc,fg+:blue,border:blue,prompt:#cba6f7,hl+:#f38ba8"
|
||||
export FZF_DEFAULT_OPTS=" \
|
||||
--color=bg+:#363a4f,bg:#24273a,spinner:#f4dbd6,hl:#ed8796 \
|
||||
--color=fg:#cad3f5,header:#ed8796,info:#c6a0f6,pointer:#f4dbd6 \
|
||||
--color=marker:#f4dbd6,fg+:#cad3f5,prompt:#c6a0f6,hl+:#ed8796"
|
||||
|
||||
export FZF_PREVIEW_OPTS="--preview
|
||||
'([[ {} =~ ('.jpg'|'.jpeg'|'.png'|'.gif'|'.bmp'|'.svg'|'.mp4'|'.mkv')$ ]] && (chafa --center=on {} && exiftool {})) ||
|
||||
|
|
@ -127,4 +127,4 @@ _fzf_compgen_path() {
|
|||
}
|
||||
_fzf_compgen_dir() {
|
||||
fd --color=always --type d --hidden --follow --exclude ".git" . "$1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3
config/nvim.old/lua/plugins/ts-node-action.lua
Normal file
3
config/nvim.old/lua/plugins/ts-node-action.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
require("ts-node-action").setup({})
|
||||
|
||||
vim.keymap.set({ "n" }, "<leader>lt", require("ts-node-action").node_action, { desc = "Trigger Node Action" })
|
||||
3
config/zsh/aliases/configs.zsh
Normal file
3
config/zsh/aliases/configs.zsh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
alias \
|
||||
ckb='cd ~/qmk_firmware && $EDITOR keyboards/sofle/keymaps/aleee-idk' \
|
||||
dots='cd $DOTS && $EDITOR'
|
||||
|
|
@ -4,11 +4,11 @@ SAVEHIST=1000
|
|||
setopt BANG_HIST
|
||||
setopt EXTENDED_HISTORY
|
||||
setopt HIST_EXPIRE_DUPS_FIRST
|
||||
setopt HIST_IGNORE_DUPS
|
||||
setopt HIST_FIND_NO_DUPS
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
# setopt HIST_IGNORE_DUPS
|
||||
# setopt HIST_FIND_NO_DUPS
|
||||
# setopt HIST_IGNORE_ALL_DUPS
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt HIST_SAVE_NO_DUPS
|
||||
# setopt HIST_SAVE_NO_DUPS
|
||||
setopt HIST_VERIFY
|
||||
setopt SHARE_HISTORY
|
||||
|
||||
|
|
|
|||
|
|
@ -104,6 +104,8 @@ files=(
|
|||
$DOTS/config/zsh/**/*.zsh
|
||||
# fzf scripts that need to be sourced
|
||||
$DOTS/scripts/fzf-flatpak
|
||||
# fzf config file
|
||||
$DOOTS/config/fzf/fzfrc
|
||||
)
|
||||
|
||||
for file in $files; do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue