refactor(plugins): Update AstroCore, Kitty, and NeoTree configs
This commit is contained in:
1 parent
d1425bc422
commit
03ef0ecf15
5 files changed
+123
-135
No files matched your search
@@ -54,7 +54,7 @@ return {
|
||||
dirs = {},
|
||||
},
|
||||
autochdir = true,
|
||||
scope = "win",
|
||||
scope = "global",
|
||||
notify = false,
|
||||
},
|
||||
|
||||
@@ -294,7 +294,7 @@ return {
|
||||
desc = "Paste from system clipboard",
|
||||
},
|
||||
["<C-j><C-j>"] = { function() terminals.scratch_toggle() end, desc = "Open Scratch Terminal" },
|
||||
["<C-a><C-a>"] = { "<Cmd>ClaudeCodeFocus<CR>", desc = "Toggle Claude Code" },
|
||||
["<C-a>f"] = { "<Cmd>ClaudeCodeFocus<CR>", desc = "Toggle Claude Code" },
|
||||
["<C-m>"] = { "<Cmd>OverseerRun<CR>", desc = "Run Overseer task" },
|
||||
["<C-a>d"] = {
|
||||
function() with_trouble("diagnostics") end,
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
-- Claude Code IDE integration via WebSocket MCP.
|
||||
-- <C-a><C-a> opens/focuses a near-fullscreen snacks float; the same key inside
|
||||
-- the terminal hides it (toggle). Visual-mode <C-a><C-a> sends the selection.
|
||||
-- Neo-tree's <C-a> is wired separately (see lua/plugins/neotree.lua).
|
||||
|
||||
local toggle_key = "<C-a><C-a>"
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"coder/claudecode.nvim",
|
||||
dependencies = { "folke/snacks.nvim" },
|
||||
cmd = {
|
||||
"ClaudeCode",
|
||||
"ClaudeCodeFocus",
|
||||
"ClaudeCodeSend",
|
||||
"ClaudeCodeAdd",
|
||||
"ClaudeCodeTreeAdd",
|
||||
"ClaudeCodeSelectModel",
|
||||
"ClaudeCodeDiffAccept",
|
||||
"ClaudeCodeDiffDeny",
|
||||
"ClaudeCodeStatus",
|
||||
},
|
||||
keys = {
|
||||
{ toggle_key, "<cmd>ClaudeCodeFocus<cr>", mode = { "n", "x" }, desc = "Toggle Claude Code" },
|
||||
{ "<leader>am", "<cmd>ClaudeCodeSelectModel<cr>", desc = "Select Claude model" },
|
||||
{ "<leader>ar", "<cmd>ClaudeCode --resume<cr>", desc = "Resume Claude" },
|
||||
{ "<leader>aC", "<cmd>ClaudeCode --continue<cr>", desc = "Continue Claude" },
|
||||
{ "<leader>ab", "<cmd>ClaudeCodeAdd %<cr>", desc = "Add current buffer to Claude" },
|
||||
{ "<leader>ay", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept Claude diff" },
|
||||
{ "<leader>an", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny Claude diff" },
|
||||
},
|
||||
opts = {
|
||||
git_repo_cwd = true,
|
||||
terminal = {
|
||||
provider = "snacks",
|
||||
---@module "snacks"
|
||||
---@type snacks.win.Config|{}
|
||||
snacks_win_opts = {
|
||||
position = "right",
|
||||
width = 0.3,
|
||||
height = 1,
|
||||
border = "rounded",
|
||||
backdrop = 60,
|
||||
keys = {
|
||||
claude_hide = {
|
||||
toggle_key,
|
||||
function(self) self:hide() end,
|
||||
mode = { "t", "n" },
|
||||
desc = "Hide Claude Code",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
diff_opts = {
|
||||
layout = "vertical",
|
||||
open_in_new_tab = false,
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
}
|
||||
+37
-13
@@ -1,18 +1,42 @@
|
||||
local function t_nav(fn)
|
||||
return function()
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes([[<C-\><C-n>]], true, false, true), "n", false)
|
||||
vim.schedule(fn)
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
"TmuxNavigatorProcessList",
|
||||
"MunsMan/kitty-navigator.nvim",
|
||||
-- Keep the kitty-side kittens in sync with the plugin. ~/.config/kitty is symlinked into the
|
||||
-- dotfiles repo, so this copies navigate_kitty.py + pass_keys.py straight into the tracked config.
|
||||
-- navigate_kitty.py is required for the nvim->kitty edge handoff (init.lua calls `kitty @ kitten
|
||||
-- navigate_kitty.py <dir>`); pass_keys.py must match the `neighboring_window` map syntax in kitty.conf.
|
||||
build = {
|
||||
"cp navigate_kitty.py ~/.config/kitty",
|
||||
"cp pass_keys.py ~/.config/kitty",
|
||||
},
|
||||
-- Disable smart-splits navigation keys (AstroNvim injects these when KITTY_LISTEN_ON is set);
|
||||
-- kitty-navigator owns <C-h/j/k/l>. Resize bindings (<C-Up/Down/Left/Right>) are left intact.
|
||||
specs = {
|
||||
{
|
||||
"AstroNvim/astrocore",
|
||||
opts = function(_, opts)
|
||||
local m = opts.mappings.n
|
||||
m["<C-H>"] = false
|
||||
m["<C-J>"] = false
|
||||
m["<C-K>"] = false
|
||||
m["<C-L>"] = false
|
||||
end,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
{"<C-h>", function()require("kitty-navigator").navigateLeft()end, desc = "Move left a Split", mode = {"n"}},
|
||||
{"<C-j>", function()require("kitty-navigator").navigateDown()end, desc = "Move down a Split", mode = {"n"}},
|
||||
{"<C-k>", function()require("kitty-navigator").navigateUp()end, desc = "Move up a Split", mode = {"n"}},
|
||||
{"<C-l>", function()require("kitty-navigator").navigateRight()end, desc = "Move right a Split", mode = {"n"}},
|
||||
{"<C-h>", t_nav(function()require("kitty-navigator").navigateLeft()end), desc = "Move left a Split", mode = {"t"}},
|
||||
{"<C-j>", t_nav(function()require("kitty-navigator").navigateDown()end), desc = "Move down a Split", mode = {"t"}},
|
||||
{"<C-k>", t_nav(function()require("kitty-navigator").navigateUp()end), desc = "Move up a Split", mode = {"t"}},
|
||||
{"<C-l>", t_nav(function()require("kitty-navigator").navigateRight()end), desc = "Move right a Split", mode = {"t"}},
|
||||
},
|
||||
}
|
||||
@@ -32,13 +32,13 @@ return {
|
||||
git_status_async = true, -- Asynchronous git status. Improves performance.
|
||||
hide_root_node = true, -- Hide the root node.
|
||||
retain_hidden_root_indent = true, -- IF the root node is hidden, keep the indentation anyhow.
|
||||
use_libuv_file_watcher = false,
|
||||
use_libuv_file_watcher = true,
|
||||
sort = {
|
||||
sorter = "name",
|
||||
},
|
||||
window = {
|
||||
position = "left",
|
||||
width = 34,
|
||||
width = 32,
|
||||
mappings = {
|
||||
["H"] = "navigate_up",
|
||||
["L"] = function(state)
|
||||
|
||||
+82
-58
@@ -5,26 +5,95 @@
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
{
|
||||
"ankushbhagats/match.nvim",
|
||||
config = true,
|
||||
},
|
||||
-- == Examples of Adding Plugins ==
|
||||
|
||||
"andweeb/presence.nvim",
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
event = "BufRead",
|
||||
config = function() require("lsp_signature").setup() end,
|
||||
},
|
||||
|
||||
-- == Examples of Overriding Plugins ==
|
||||
|
||||
-- customize dashboard options
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
dashboard = {
|
||||
sections = {
|
||||
{ section = "header" },
|
||||
|
||||
{ section = "keys", gap = 1, padding = 1 },
|
||||
{
|
||||
pane = 2,
|
||||
icon = " ",
|
||||
desc = "Browse Repo",
|
||||
padding = 1,
|
||||
key = "b",
|
||||
action = function()
|
||||
Snacks.gitbrowse()
|
||||
end,
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
desc = "Projects (ghq)",
|
||||
padding = 1,
|
||||
key = "p",
|
||||
action = function()
|
||||
local repos = vim.fn.systemlist("ghq list -p")
|
||||
vim.ui.select(repos, { prompt = "Select repository" }, function(dir)
|
||||
if not dir then return end
|
||||
vim.cmd.cd(dir)
|
||||
Snacks.picker.files()
|
||||
end)
|
||||
end,
|
||||
},
|
||||
function()
|
||||
local in_git = Snacks.git.get_root() ~= nil
|
||||
local cmds = {
|
||||
{
|
||||
title = "Notifications",
|
||||
cmd = "gh notify -s -a -n5",
|
||||
action = function()
|
||||
vim.ui.open("https://github.com/notifications")
|
||||
end,
|
||||
key = "n",
|
||||
icon = " ",
|
||||
height = 5,
|
||||
enabled = true,
|
||||
},
|
||||
{
|
||||
title = "Open Issues",
|
||||
cmd = "gh issue list -L 3",
|
||||
key = "i",
|
||||
action = function()
|
||||
vim.fn.jobstart("gh issue list --web", { detach = true })
|
||||
end,
|
||||
icon = " ",
|
||||
height = 7,
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
title = "Open PRs",
|
||||
cmd = "gh pr list -L 3",
|
||||
key = "P",
|
||||
action = function()
|
||||
vim.fn.jobstart("gh pr list --web", { detach = true })
|
||||
end,
|
||||
height = 7,
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
title = "Git Status",
|
||||
cmd = "git --no-pager diff --stat -B -M -C",
|
||||
height = 10,
|
||||
},
|
||||
}
|
||||
return vim.tbl_map(function(cmd)
|
||||
return vim.tbl_extend("force", {
|
||||
pane = 2,
|
||||
section = "terminal",
|
||||
enabled = in_git,
|
||||
padding = 1,
|
||||
ttl = 5 * 60,
|
||||
indent = 3,
|
||||
}, cmd)
|
||||
end, cmds)
|
||||
end,
|
||||
{ section = "startup" },
|
||||
},
|
||||
preset = {
|
||||
header = table.concat({
|
||||
" █████ ███████ ████████ ██████ ██████ ",
|
||||
@@ -44,49 +113,4 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
-- You can disable default plugins as follows:
|
||||
{ "max397574/better-escape.nvim", enabled = false },
|
||||
|
||||
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
config = function(plugin, opts)
|
||||
-- add more custom luasnip configuration such as filetype extend or custom snippets
|
||||
local luasnip = require "luasnip"
|
||||
luasnip.filetype_extend("javascript", { "javascriptreact" })
|
||||
|
||||
-- include the default astronvim config that calls the setup call
|
||||
require "astronvim.plugins.configs.luasnip"(plugin, opts)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
config = function(plugin, opts)
|
||||
require "astronvim.plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call
|
||||
-- add more custom autopairs configuration such as custom rules
|
||||
local npairs = require "nvim-autopairs"
|
||||
local Rule = require "nvim-autopairs.rule"
|
||||
local cond = require "nvim-autopairs.conds"
|
||||
npairs.add_rules(
|
||||
{
|
||||
Rule("$", "$", { "tex", "latex" })
|
||||
-- don't add a pair if the next character is %
|
||||
:with_pair(cond.not_after_regex "%%")
|
||||
-- don't add a pair if the previous character is xxx
|
||||
:with_pair(
|
||||
cond.not_before_regex("xxx", 3)
|
||||
)
|
||||
-- don't move right when repeat character
|
||||
:with_move(cond.none())
|
||||
-- don't delete if the next character is xx
|
||||
:with_del(cond.not_after_regex "xx")
|
||||
-- disable adding a newline when you press <cr>
|
||||
:with_cr(cond.none()),
|
||||
},
|
||||
-- disable for .vim files, but it work for another filetypes
|
||||
Rule("a", "a", "-vim")
|
||||
)
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user