feat: update

This commit is contained in:
2026-03-18 17:35:07 +08:00
parent df359c6e07
commit 478449d3a8
3 changed files with 147 additions and 91 deletions
+5
View File
@@ -262,5 +262,10 @@
"key": "ctrl+o", "key": "ctrl+o",
"command": "-lineBreakInsert", "command": "-lineBreakInsert",
"when": "textInputFocus && !editorReadonly" "when": "textInputFocus && !editorReadonly"
},
{
"key": "alt+cmd+s",
"command": "workbench.action.toggleUnifiedSidebarFromKeyboard",
"when": "cursor.agentIdeUnification.enabled == true && !isAuxiliaryWindowFocusedContext"
} }
] ]
+52 -53
View File
@@ -20,7 +20,7 @@
"vim.normalModeKeyBindingsNonRecursive": [ "vim.normalModeKeyBindingsNonRecursive": [
{ {
"before": ["<space>"], "before": ["<space>"],
"commands": ["vspacecode.space"] "commands": ["vspacecode.space"],
}, },
{ {
"before": [","], "before": [","],
@@ -28,15 +28,15 @@
"vspacecode.space", "vspacecode.space",
{ {
"command": "whichkey.triggerKey", "command": "whichkey.triggerKey",
"args": "m" "args": "m",
} },
] ],
} },
], ],
"vim.visualModeKeyBindingsNonRecursive": [ "vim.visualModeKeyBindingsNonRecursive": [
{ {
"before": ["<space>"], "before": ["<space>"],
"commands": ["vspacecode.space"] "commands": ["vspacecode.space"],
}, },
{ {
"before": [","], "before": [","],
@@ -44,18 +44,18 @@
"vspacecode.space", "vspacecode.space",
{ {
"command": "whichkey.triggerKey", "command": "whichkey.triggerKey",
"args": "m" "args": "m",
} },
] ],
}, },
{ {
"before": [">"], "before": [">"],
"commands": ["editor.action.indentLines"] "commands": ["editor.action.indentLines"],
}, },
{ {
"before": ["<"], "before": ["<"],
"commands": ["editor.action.outdentLines"] "commands": ["editor.action.outdentLines"],
} },
], ],
"workbench.panel.location": "right", "workbench.panel.location": "right",
"gitHistory.hideCommitViewExplorer": true, "gitHistory.hideCommitViewExplorer": true,
@@ -67,16 +67,16 @@
"sync.gist": "3c4e02a02a0d110622006b8c8b058fa5", "sync.gist": "3c4e02a02a0d110622006b8c8b058fa5",
"go.languageServerFlags": ["-rpc.trace"], "go.languageServerFlags": ["-rpc.trace"],
"[json]": { "[json]": {
"editor.defaultFormatter": "vscode.json-language-features" "editor.defaultFormatter": "vscode.json-language-features",
}, },
"files.associations": { "files.associations": {
"*.html": "html", "*.html": "html",
"*.json": "jsonc", "*.json": "jsonc",
"NOTES.txt": "helm", "NOTES.txt": "helm",
"Dockerfile": "dockerfile" "Dockerfile": "dockerfile",
}, },
"[helm]": { "[helm]": {
"editor.defaultFormatter": "redhat.vscode-yaml" "editor.defaultFormatter": "redhat.vscode-yaml",
// "editor.formatOnSave": false // alternatively, force it to leave you alone // "editor.formatOnSave": false // alternatively, force it to leave you alone
}, },
"gitlens.codeLens.recentChange.enabled": false, "gitlens.codeLens.recentChange.enabled": false,
@@ -87,19 +87,19 @@
// "terminal.integrated.shell.osx": "/bin/zsh", // "terminal.integrated.shell.osx": "/bin/zsh",
"editor.fontFamily": "Fira Code, Sarasa Fixed SC Nerd Font, Menlo, Monaco, 'Courier New', monospace", "editor.fontFamily": "Fira Code, Sarasa Fixed SC Nerd Font, Menlo, Monaco, 'Courier New', monospace",
"[javascript]": { "[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode",
}, },
"search.followSymlinks": false, "search.followSymlinks": false,
"go.autocompleteUnimportedPackages": true, "go.autocompleteUnimportedPackages": true,
"[jsonc]": { "[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode",
}, },
"vscode-neovim.mouseSelectionStartVisualMode": true, "vscode-neovim.mouseSelectionStartVisualMode": true,
"go.lintTool": "golangci-lint", "go.lintTool": "golangci-lint",
"go.lintFlags": ["--config=~/.dotfile/golang/golangci.yml"], "go.lintFlags": ["--config=~/.dotfile/golang/golangci.yml"],
"go.liveErrors": { "go.liveErrors": {
"enabled": false, "enabled": false,
"delay": 500 "delay": 500,
}, },
"python.languageServer": "Pylance", "python.languageServer": "Pylance",
"go.overwriteGoplsMiddleware": {}, "go.overwriteGoplsMiddleware": {},
@@ -107,20 +107,20 @@
"[go]": { "[go]": {
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.organizeImports": "explicit" "source.organizeImports": "explicit",
}, },
"editor.snippetSuggestions": "none", "editor.snippetSuggestions": "none",
"editor.defaultFormatter": "golang.go" "editor.defaultFormatter": "golang.go",
}, },
"[go.mod]": { "[go.mod]": {
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.organizeImports": "explicit" "source.organizeImports": "explicit",
} },
}, },
"gopls": { "gopls": {
"usePlaceholders": true, "usePlaceholders": true,
"staticcheck": false "staticcheck": false,
}, },
"go.testFlags": ["-v"], "go.testFlags": ["-v"],
"vscode-neovim.neovimExecutablePaths.darwin": "/usr/local/bin/nvim", "vscode-neovim.neovimExecutablePaths.darwin": "/usr/local/bin/nvim",
@@ -136,22 +136,22 @@
"security.workspace.trust.untrustedFiles": "open", "security.workspace.trust.untrustedFiles": "open",
"workbench.tree.indent": 4, "workbench.tree.indent": 4,
"[html]": { "[html]": {
"editor.defaultFormatter": "vscode.html-language-features" "editor.defaultFormatter": "vscode.html-language-features",
}, },
"python.defaultInterpreterPath": "/usr/local/bin/python3", "python.defaultInterpreterPath": "/usr/local/bin/python3",
"[python]": { "[python]": {
"editor.formatOnType": true, "editor.formatOnType": true,
"editor.defaultFormatter": "ms-python.python" "editor.defaultFormatter": "ms-python.python",
}, },
"[go][go.mod]": { "[go][go.mod]": {
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.organizeImports": "explicit" "source.organizeImports": "explicit",
} },
}, },
"update.showReleaseNotes": false, "update.showReleaseNotes": false,
"terminal.integrated.defaultProfile.osx": "fish", "terminal.integrated.defaultProfile.osx": "fish",
"extensions.experimental.affinity": { "extensions.experimental.affinity": {
"asvetliakov.vscode-neovim": 1 "asvetliakov.vscode-neovim": 1,
}, },
"makefile.configureOnOpen": false, "makefile.configureOnOpen": false,
"python.terminal.activateEnvInCurrentTerminal": true, "python.terminal.activateEnvInCurrentTerminal": true,
@@ -162,7 +162,7 @@
"remote.SSH.remotePlatform": { "remote.SSH.remotePlatform": {
"box1": "linux", "box1": "linux",
"hx80": "linux", "hx80": "linux",
"hx20": "linux" "hx20": "linux",
}, },
"editor.formatOnSave": true, "editor.formatOnSave": true,
"pylint.enabled": false, "pylint.enabled": false,
@@ -170,50 +170,50 @@
"python.analysis.packageIndexDepths": [ "python.analysis.packageIndexDepths": [
{ {
"name": "sklearn", "name": "sklearn",
"depth": 2 "depth": 2,
}, },
{ {
"name": "matplotlib", "name": "matplotlib",
"depth": 2 "depth": 2,
}, },
{ {
"name": "scipy", "name": "scipy",
"depth": 2 "depth": 2,
}, },
{ {
"name": "django", "name": "django",
"depth": 2 "depth": 2,
}, },
{ {
"name": "flask", "name": "flask",
"depth": 2 "depth": 2,
}, },
{ {
"name": "fastapi", "name": "fastapi",
"depth": 2 "depth": 2,
} },
], ],
"[shellscript]": { "[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format" "editor.defaultFormatter": "foxundermoon.shell-format",
}, },
// "[dockerfile]": { // "[dockerfile]": {
// "editor.defaultFormatter": "foxundermoon.shell-format" // "editor.defaultFormatter": "foxundermoon.shell-format"
// }, // },
"[ignore]": { "[ignore]": {
"editor.defaultFormatter": "foxundermoon.shell-format" "editor.defaultFormatter": "foxundermoon.shell-format",
}, },
"[properties]": { "[properties]": {
"editor.defaultFormatter": "foxundermoon.shell-format" "editor.defaultFormatter": "foxundermoon.shell-format",
}, },
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
// "source.organizeImports": "explicit", // "source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit" "source.fixAll.eslint": "explicit",
}, },
"[proto3]": { "[proto3]": {
"editor.defaultFormatter": "zxh404.vscode-proto3" "editor.defaultFormatter": "zxh404.vscode-proto3",
}, },
"[dotenv]": { "[dotenv]": {
"editor.defaultFormatter": "foxundermoon.shell-format" "editor.defaultFormatter": "foxundermoon.shell-format",
}, },
"typescript.preferences.quoteStyle": "single", "typescript.preferences.quoteStyle": "single",
"javascript.preferences.quoteStyle": "single", "javascript.preferences.quoteStyle": "single",
@@ -221,7 +221,7 @@
"pretty-formatter.quoteConvert": "single", "pretty-formatter.quoteConvert": "single",
"html.completion.attributeDefaultValue": "singlequotes", "html.completion.attributeDefaultValue": "singlequotes",
"[typescriptreact]": { "[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode",
}, },
"prettier.jsxSingleQuote": true, "prettier.jsxSingleQuote": true,
"go.buildFlags": ["-tags=wireinject"], "go.buildFlags": ["-tags=wireinject"],
@@ -231,7 +231,7 @@
"editor.tabSize": 2, "editor.tabSize": 2,
"editor.autoIndent": "advanced", "editor.autoIndent": "advanced",
"diffEditor.ignoreTrimWhitespace": false, "diffEditor.ignoreTrimWhitespace": false,
"editor.defaultColorDecorators": "never" "editor.defaultColorDecorators": "never",
}, },
"html.format.unformatted": "", "html.format.unformatted": "",
"editor.defaultFormatter": "esbenp.prettier-vscode", "editor.defaultFormatter": "esbenp.prettier-vscode",
@@ -243,34 +243,33 @@
"name": "Space (Global Leader)", "name": "Space (Global Leader)",
"type": "bind", "type": "bind",
"command": "vspacecode.space", "command": "vspacecode.space",
"when": "editorTextFocus || explorerViewletVisible || terminalFocus" "when": "editorTextFocus || explorerViewletVisible || terminalFocus",
}, },
{ {
"keys": "w.t", "keys": "w.t",
"name": "Toggle Terminal", "name": "Toggle Terminal",
"type": "command", "type": "command",
"command": "workbench.action.terminal.toggleTerminal" "command": "workbench.action.terminal.toggleTerminal",
}, },
{ {
"keys": "w.w", "keys": "w.w",
"name": "Toggle AI Sidebar", "name": "Toggle AI Sidebar",
"type": "command", "type": "command",
"command": "workbench.action.toggleAuxiliaryBar" "command": "workbench.action.toggleAuxiliaryBar",
}, },
{ {
"keys": "w.e", "keys": "w.e",
"name": "Focus First Editor Group", "name": "Focus First Editor Group",
"type": "command", "type": "command",
"command": "workbench.action.focusFirstEditorGroup" "command": "workbench.action.focusFirstEditorGroup",
} },
], ],
"[java]": { "[java]": {
"editor.suggest.snippetsPreventQuickSuggestions": false "editor.suggest.snippetsPreventQuickSuggestions": false,
}, },
"git.confirmSync": false, "git.confirmSync": false,
"editor.dropIntoEditor.preferences": [], "editor.dropIntoEditor.preferences": [],
"whichkey.bindingOverrides": [], "whichkey.bindingOverrides": [],
"cursor.general.disableHttp2": true,
"remote.SSH.localServerDownload": "always", "remote.SSH.localServerDownload": "always",
"workbench.colorCustomizations": {}, "workbench.colorCustomizations": {},
"javascript.format.enable": false, "javascript.format.enable": false,
@@ -283,7 +282,7 @@
"ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M2.1", "ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M2.1",
"ANTHROPIC_MODEL": "MiniMax-M2.1", "ANTHROPIC_MODEL": "MiniMax-M2.1",
"API_TIMEOUT_MS": "3000000", "API_TIMEOUT_MS": "3000000",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1 "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1,
}, },
"claudeCode.preferredLocation": "panel" "claudeCode.preferredLocation": "panel",
} }
+90 -38
View File
@@ -1,43 +1,95 @@
return { return {
{ "folke/sidekick.nvim",
"folke/sidekick.nvim", opts = {
dependencies = { -- add any options here
"folke/snacks.nvim", -- sidekick 推荐的 prompt / cli picker 支持 cli = {
"nvim-treesitter/nvim-treesitter", -- 可选,但推荐用于 diff 窗口高亮 mux = {
}, backend = "zellij",
opts = { enabled = true,
-- 配置 CLI 工具
cli = {
tools = {
gemini = {
-- Gemini CLI 命令
cmd = { "gemini" },
-- 传递给 gemini 命令的参数
args = {},
-- 环境变量配置
-- 不设置 GEMINI_API_KEY,让 Gemini CLI 使用已缓存的 OAuth 凭证
env = {
-- 代理配置(如果需要通过代理访问)
-- 从环境变量读取代理设置,如果没有设置则使用系统默认
HTTP_PROXY = os.getenv("HTTP_PROXY") or os.getenv("http_proxy"),
HTTPS_PROXY = os.getenv("HTTPS_PROXY") or os.getenv("https_proxy"),
ALL_PROXY = os.getenv("ALL_PROXY") or os.getenv("all_proxy"),
NO_PROXY = os.getenv("NO_PROXY") or os.getenv("no_proxy"),
},
},
},
-- 设置默认工具
default = "gemini",
}, },
}, },
config = function(_, opts) },
require("sidekick").setup(opts) keys = {
-- 在配置加载后设置快捷键 {
vim.keymap.set("n", "<leader>as", function() "<tab>",
local sidekick = require("sidekick.cli") function()
sidekick.toggle({ name = "gemini", focus = true }) -- if there is a next edit, jump to it, otherwise apply it if any
end, { desc = "Sidekick: Toggle Gemini CLI" }) if not require("sidekick").nes_jump_or_apply() then
end, return "<Tab>" -- fallback to normal tab
end
end,
expr = true,
desc = "Goto/Apply Next Edit Suggestion",
},
{
"<c-.>",
function()
require("sidekick.cli").toggle()
end,
desc = "Sidekick Toggle",
mode = { "n", "t", "i", "x" },
},
{
"<leader>aa",
function()
require("sidekick.cli").toggle()
end,
desc = "Sidekick Toggle CLI",
},
{
"<leader>as",
function()
require("sidekick.cli").select()
end,
-- Or to select only installed tools:
-- require("sidekick.cli").select({ filter = { installed = true } })
desc = "Select CLI",
},
{
"<leader>ad",
function()
require("sidekick.cli").close()
end,
desc = "Detach a CLI Session",
},
{
"<leader>at",
function()
require("sidekick.cli").send({ msg = "{this}" })
end,
mode = { "x", "n" },
desc = "Send This",
},
{
"<leader>af",
function()
require("sidekick.cli").send({ msg = "{file}" })
end,
desc = "Send File",
},
{
"<leader>av",
function()
require("sidekick.cli").send({ msg = "{selection}" })
end,
mode = { "x" },
desc = "Send Visual Selection",
},
{
"<leader>ap",
function()
require("sidekick.cli").prompt()
end,
mode = { "n", "x" },
desc = "Sidekick Select Prompt",
},
-- Example of a keybinding to open Claude directly
{
"<leader>ac",
function()
require("sidekick.cli").toggle({ name = "claude", focus = true })
end,
desc = "Sidekick Toggle Claude",
},
}, },
} }