Compare commits
6 Commits
claude-nvi
...
d06a181e0a
| Author | SHA1 | Date | |
|---|---|---|---|
| d06a181e0a | |||
| 28d935975b | |||
| cebca892b8 | |||
| fdb4df09be | |||
| ee301f1ae6 | |||
| 2030093433 |
61
dots/.config/nvim/after/plugin/claude-code.nvim.lua
Normal file
61
dots/.config/nvim/after/plugin/claude-code.nvim.lua
Normal file
@@ -0,0 +1,61 @@
|
||||
require("claude-code").setup({
|
||||
-- Terminal window settings
|
||||
window = {
|
||||
split_ratio = 0.3, -- Percentage of screen for the terminal window (height for horizontal, width for vertical splits)
|
||||
position = "vertical", -- Position of the window: "botright", "topleft", "vertical", "float", etc.
|
||||
enter_insert = true, -- Whether to enter insert mode when opening Claude Code
|
||||
hide_numbers = true, -- Hide line numbers in the terminal window
|
||||
hide_signcolumn = true, -- Hide the sign column in the terminal window
|
||||
|
||||
-- Floating window configuration (only applies when position = "float")
|
||||
float = {
|
||||
width = "80%", -- Width: number of columns or percentage string
|
||||
height = "80%", -- Height: number of rows or percentage string
|
||||
row = "center", -- Row position: number, "center", or percentage string
|
||||
col = "center", -- Column position: number, "center", or percentage string
|
||||
relative = "editor", -- Relative to: "editor" or "cursor"
|
||||
border = "rounded", -- Border style: "none", "single", "double", "rounded", "solid", "shadow"
|
||||
},
|
||||
},
|
||||
-- File refresh settings
|
||||
refresh = {
|
||||
enable = true, -- Enable file change detection
|
||||
updatetime = 100, -- updatetime when Claude Code is active (milliseconds)
|
||||
timer_interval = 1000, -- How often to check for file changes (milliseconds)
|
||||
show_notifications = true, -- Show notification when files are reloaded
|
||||
},
|
||||
-- Git project settings
|
||||
git = {
|
||||
use_git_root = true, -- Set CWD to git root when opening Claude Code (if in git project)
|
||||
},
|
||||
-- Shell-specific settings
|
||||
shell = {
|
||||
separator = "&&", -- Command separator used in shell commands
|
||||
pushd_cmd = "pushd", -- Command to push directory onto stack (e.g., 'pushd' for bash/zsh, 'enter' for nushell)
|
||||
popd_cmd = "popd", -- Command to pop directory from stack (e.g., 'popd' for bash/zsh, 'exit' for nushell)
|
||||
},
|
||||
-- Command settings
|
||||
command = "claude", -- Command used to launch Claude Code
|
||||
-- Command variants
|
||||
command_variants = {
|
||||
-- Conversation management
|
||||
continue = "--continue", -- Resume the most recent conversation
|
||||
resume = "--resume", -- Display an interactive conversation picker
|
||||
|
||||
-- Output options
|
||||
verbose = "--verbose", -- Enable verbose logging with full turn-by-turn output
|
||||
},
|
||||
-- Keymaps
|
||||
keymaps = {
|
||||
toggle = {
|
||||
normal = "<C-,>", -- Normal mode keymap for toggling Claude Code, false to disable
|
||||
terminal = "<C-,>", -- Terminal mode keymap for toggling Claude Code, false to disable
|
||||
variants = {
|
||||
continue = "<leader>cC", -- Normal mode keymap for Claude Code with continue flag
|
||||
verbose = "<leader>cV", -- Normal mode keymap for Claude Code with verbose flag
|
||||
},
|
||||
},
|
||||
window_navigation = true, -- Enable window navigation keymaps (<C-h/j/k/l>)
|
||||
scrolling = true, -- Enable scrolling keymaps (<C-f/b>) for page up/down
|
||||
},
|
||||
})
|
||||
@@ -1,17 +1,22 @@
|
||||
require("codecompanion").setup({
|
||||
ignore_warnings = true,
|
||||
extensions = {
|
||||
mcphub = {
|
||||
callback = "mcphub.extensions.codecompanion",
|
||||
opts = {
|
||||
make_vars = true,
|
||||
make_slash_commands = true,
|
||||
show_result_in_chat = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
strategies = {
|
||||
chat = { adapter = "openai" },
|
||||
inline = { adapter = "openai" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Load mcphub extension after codecompanion is initialized
|
||||
-- and ensure the config structure exists
|
||||
local ok, cc_config = pcall(require, "codecompanion.config")
|
||||
if ok then
|
||||
cc_config.interactions = cc_config.interactions or {}
|
||||
cc_config.interactions.chat = cc_config.interactions.chat or {}
|
||||
cc_config.interactions.chat.tools = cc_config.interactions.chat.tools or {}
|
||||
|
||||
require("mcphub.extensions.codecompanion").setup({
|
||||
make_vars = true,
|
||||
make_slash_commands = true,
|
||||
show_result_in_chat = true,
|
||||
})
|
||||
end
|
||||
|
||||
71
dots/.config/nvim/flake.lock
generated
71
dots/.config/nvim/flake.lock
generated
@@ -1,5 +1,45 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"mcp-hub",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1743550720,
|
||||
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mcp-hub": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755841689,
|
||||
"narHash": "sha256-KakvXZf0vjdqzyT+LsAKHEr4GLICGXPmxl1hZ3tI7Yg=",
|
||||
"owner": "ravitemer",
|
||||
"repo": "mcp-hub",
|
||||
"rev": "9c7670a4c341ed3cf738a6242c0fde1cea40bccf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ravitemer",
|
||||
"repo": "mcp-hub",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixCats": {
|
||||
"locked": {
|
||||
"lastModified": 1765766809,
|
||||
@@ -17,11 +57,27 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1765644376,
|
||||
"narHash": "sha256-yqHBL2wYGwjGL2GUF2w3tofWl8qO9tZEuI4wSqbCrtE=",
|
||||
"lastModified": 1743689281,
|
||||
"narHash": "sha256-y7Hg5lwWhEOgflEHRfzSH96BOt26LaYfrYWzZ+VoVdg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2bfc080955153be0be56724be6fa5477b4eefabb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1766532406,
|
||||
"narHash": "sha256-acLU/ag9VEoKkzOD202QASX25nG1eArXg5A0mHjKgxM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "23735a82a828372c4ef92c660864e82fbe2f5fbe",
|
||||
"rev": "8142186f001295e5a3239f485c8a49bf2de2695a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -146,11 +202,11 @@
|
||||
"plugins-tailwind-fold-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1752559116,
|
||||
"narHash": "sha256-8uefZIVsn9USEd6FyiO3m3TRKAS/vigU4t9Tk5ijd3c=",
|
||||
"lastModified": 1766077142,
|
||||
"narHash": "sha256-SwcDLlygXUSV/dytPXA5Y45OpUhjnExc8SZg5a8MZ2k=",
|
||||
"owner": "razak17",
|
||||
"repo": "tailwind-fold.nvim",
|
||||
"rev": "d9e7ca11691d252b35795726dff087bf013b2ebf",
|
||||
"rev": "e2ba5ee1ca9b74208709fe9d7314b8aa753b26a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -161,8 +217,9 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"mcp-hub": "mcp-hub",
|
||||
"nixCats": "nixCats",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"plugins-beancount-nvim": "plugins-beancount-nvim",
|
||||
"plugins-crazy-node-movement": "plugins-crazy-node-movement",
|
||||
"plugins-helm-ls-nvim": "plugins-helm-ls-nvim",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
nixCats.url = "github:BirdeeHub/nixCats-nvim";
|
||||
mcp-hub.url = "github:ravitemer/mcp-hub";
|
||||
|
||||
plugins-shipwright-nvim = {
|
||||
url = "github:rktjmp/shipwright.nvim";
|
||||
@@ -51,8 +52,11 @@
|
||||
forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all;
|
||||
extra_pkg_config = { };
|
||||
|
||||
dependencyOverlays = [
|
||||
mkDependencyOverlays = system: [
|
||||
(utils.standardPluginOverlay inputs)
|
||||
(final: prev: {
|
||||
mcp-hub = inputs.mcp-hub.packages.${system}.default;
|
||||
})
|
||||
];
|
||||
|
||||
categoryDefinitions =
|
||||
@@ -66,12 +70,16 @@
|
||||
black
|
||||
clang
|
||||
clang-tools
|
||||
delta
|
||||
fd
|
||||
gawk
|
||||
gdtoolkit_4
|
||||
isort
|
||||
mcp-hub
|
||||
nixd
|
||||
nixfmt
|
||||
nodePackages.prettier
|
||||
nodePackages.typescript-language-server
|
||||
ormolu
|
||||
prettierd
|
||||
rustfmt
|
||||
@@ -152,6 +160,7 @@
|
||||
fidget-nvim
|
||||
rustaceanvim
|
||||
pkgs.neovimPlugins.m-taskwarrior-d-nvim
|
||||
claude-code-nvim
|
||||
];
|
||||
};
|
||||
|
||||
@@ -188,6 +197,7 @@
|
||||
forEachSystem (
|
||||
system:
|
||||
let
|
||||
dependencyOverlays = mkDependencyOverlays system;
|
||||
nixCatsBuilder = utils.baseBuilder luaPath {
|
||||
inherit
|
||||
nixpkgs
|
||||
@@ -219,31 +229,32 @@
|
||||
moduleNamespace = [ defaultPackageName ];
|
||||
inherit
|
||||
defaultPackageName
|
||||
dependencyOverlays
|
||||
luaPath
|
||||
categoryDefinitions
|
||||
packageDefinitions
|
||||
extra_pkg_config
|
||||
nixpkgs
|
||||
;
|
||||
dependencyOverlays = mkDependencyOverlays;
|
||||
};
|
||||
homeModule = utils.mkHomeModules {
|
||||
moduleNamespace = [ defaultPackageName ];
|
||||
inherit
|
||||
defaultPackageName
|
||||
dependencyOverlays
|
||||
luaPath
|
||||
categoryDefinitions
|
||||
packageDefinitions
|
||||
extra_pkg_config
|
||||
nixpkgs
|
||||
;
|
||||
dependencyOverlays = mkDependencyOverlays;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
overlays = utils.makeOverlays luaPath {
|
||||
inherit nixpkgs dependencyOverlays extra_pkg_config;
|
||||
inherit nixpkgs extra_pkg_config;
|
||||
dependencyOverlays = mkDependencyOverlays;
|
||||
} categoryDefinitions packageDefinitions defaultPackageName;
|
||||
|
||||
nixosModules.default = nixosModule;
|
||||
|
||||
@@ -43,4 +43,5 @@ require("nixCatsUtils.catPacker").setup({
|
||||
{ "zbirenbaum/copilot-cmp" },
|
||||
{ "qvalentin/helm-ls.nvim", ft = "helm" },
|
||||
{ "mikesmithgh/kitty-scrollback.nvim" },
|
||||
{ "greggh/claude-code.nvim" },
|
||||
})
|
||||
|
||||
88
flake.lock
generated
88
flake.lock
generated
@@ -29,11 +29,11 @@
|
||||
},
|
||||
"locked": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"lastModified": 1765771449,
|
||||
"narHash": "sha256-ZoHRPmTzwC1ndX3NQB/b/WKtU1WduAJdLI4j8eW/QFM=",
|
||||
"lastModified": 1766046711,
|
||||
"narHash": "sha256-PijxRQcvSgQae3qBdY4+IGMsMFL67N3D7sBJdZxDii4=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "5bcf9a2aeb4d361c2ff918a146b3fcc1e136b9ca",
|
||||
"rev": "7163ab9a8e64cd29c45e8f93fbc038b12056e6fc",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
@@ -43,6 +43,28 @@
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nvim",
|
||||
"mcp-hub",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1743550720,
|
||||
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
@@ -68,11 +90,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1765682243,
|
||||
"narHash": "sha256-yeCxFV/905Wr91yKt5zrVvK6O2CVXWRMSrxqlAZnLp0=",
|
||||
"lastModified": 1765980955,
|
||||
"narHash": "sha256-rB45jv4uwC90vM9UZ70plfvY/2Kdygs+zlQ07dGQFk4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "58bf3ecb2d0bba7bdf363fc8a6c4d49b4d509d03",
|
||||
"rev": "89c9508bbe9b40d36b3dc206c2483ef176f15173",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -81,6 +103,25 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mcp-hub": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755841689,
|
||||
"narHash": "sha256-KakvXZf0vjdqzyT+LsAKHEr4GLICGXPmxl1hZ3tI7Yg=",
|
||||
"owner": "ravitemer",
|
||||
"repo": "mcp-hub",
|
||||
"rev": "9c7670a4c341ed3cf738a6242c0fde1cea40bccf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ravitemer",
|
||||
"repo": "mcp-hub",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -153,11 +194,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1765472234,
|
||||
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
|
||||
"lastModified": 1765779637,
|
||||
"narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
|
||||
"rev": "1306659b587dc277866c7b69eb97e5f07864d8c4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -167,8 +208,25 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1743689281,
|
||||
"narHash": "sha256-y7Hg5lwWhEOgflEHRfzSH96BOt26LaYfrYWzZ+VoVdg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2bfc080955153be0be56724be6fa5477b4eefabb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim": {
|
||||
"inputs": {
|
||||
"mcp-hub": "mcp-hub",
|
||||
"nixCats": "nixCats",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
@@ -307,11 +365,11 @@
|
||||
"plugins-tailwind-fold-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1752559116,
|
||||
"narHash": "sha256-8uefZIVsn9USEd6FyiO3m3TRKAS/vigU4t9Tk5ijd3c=",
|
||||
"lastModified": 1766077142,
|
||||
"narHash": "sha256-SwcDLlygXUSV/dytPXA5Y45OpUhjnExc8SZg5a8MZ2k=",
|
||||
"owner": "razak17",
|
||||
"repo": "tailwind-fold.nvim",
|
||||
"rev": "d9e7ca11691d252b35795726dff087bf013b2ebf",
|
||||
"rev": "e2ba5ee1ca9b74208709fe9d7314b8aa753b26a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -340,11 +398,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1765684837,
|
||||
"narHash": "sha256-fJCnsYcpQxxy/wit9EBOK33c0Z9U4D3Tvo3gf2mvHos=",
|
||||
"lastModified": 1765836173,
|
||||
"narHash": "sha256-hWRYfdH2ONI7HXbqZqW8Q1y9IRbnXWvtvt/ONZovSNY=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "94d8af61d8a603d33d1ed3500a33fcf35ae7d3bc",
|
||||
"rev": "443a7f2e7e118c4fc63b7fae05ab3080dd0e5c63",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
Reference in New Issue
Block a user