6 Commits

Author SHA1 Message Date
d06a181e0a chore: untrack 'packages.local.nix' 2025-12-26 09:28:18 +01:00
28d935975b feat(nvim): add typescript-language-server to runtime dependencies 2025-12-24 14:46:40 +01:00
cebca892b8 fix(nvim): ensure codecompanion config structure exists before mcphub extension loads 2025-12-24 14:43:29 +01:00
fdb4df09be chore: update flake.lock with nvim mcp-hub input
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-24 14:14:38 +01:00
ee301f1ae6 feat(nvim): add mcp-hub, fd, and delta dependencies
- add mcp-hub flake input for MCP integration
- create system-aware dependency overlays
- add mcp-hub, fd, delta to lspsAndRuntimeDeps
- remove duplicate tailwind-fold.lua file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-24 14:14:10 +01:00
2030093433 feat: set up 'claude-code.nvim' plugin 2025-12-18 16:01:31 +01:00
7 changed files with 229 additions and 36 deletions

View 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
},
})

View File

@@ -1,17 +1,22 @@
require("codecompanion").setup({ require("codecompanion").setup({
ignore_warnings = true, ignore_warnings = true,
extensions = {
mcphub = {
callback = "mcphub.extensions.codecompanion",
opts = {
make_vars = true,
make_slash_commands = true,
show_result_in_chat = true,
},
},
},
strategies = { strategies = {
chat = { adapter = "openai" }, chat = { adapter = "openai" },
inline = { 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

View File

@@ -1,5 +1,45 @@
{ {
"nodes": { "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": { "nixCats": {
"locked": { "locked": {
"lastModified": 1765766809, "lastModified": 1765766809,
@@ -17,11 +57,27 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1765644376, "lastModified": 1743689281,
"narHash": "sha256-yqHBL2wYGwjGL2GUF2w3tofWl8qO9tZEuI4wSqbCrtE=", "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", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "23735a82a828372c4ef92c660864e82fbe2f5fbe", "rev": "8142186f001295e5a3239f485c8a49bf2de2695a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -146,11 +202,11 @@
"plugins-tailwind-fold-nvim": { "plugins-tailwind-fold-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1752559116, "lastModified": 1766077142,
"narHash": "sha256-8uefZIVsn9USEd6FyiO3m3TRKAS/vigU4t9Tk5ijd3c=", "narHash": "sha256-SwcDLlygXUSV/dytPXA5Y45OpUhjnExc8SZg5a8MZ2k=",
"owner": "razak17", "owner": "razak17",
"repo": "tailwind-fold.nvim", "repo": "tailwind-fold.nvim",
"rev": "d9e7ca11691d252b35795726dff087bf013b2ebf", "rev": "e2ba5ee1ca9b74208709fe9d7314b8aa753b26a7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -161,8 +217,9 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"mcp-hub": "mcp-hub",
"nixCats": "nixCats", "nixCats": "nixCats",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"plugins-beancount-nvim": "plugins-beancount-nvim", "plugins-beancount-nvim": "plugins-beancount-nvim",
"plugins-crazy-node-movement": "plugins-crazy-node-movement", "plugins-crazy-node-movement": "plugins-crazy-node-movement",
"plugins-helm-ls-nvim": "plugins-helm-ls-nvim", "plugins-helm-ls-nvim": "plugins-helm-ls-nvim",

View File

@@ -2,6 +2,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixCats.url = "github:BirdeeHub/nixCats-nvim"; nixCats.url = "github:BirdeeHub/nixCats-nvim";
mcp-hub.url = "github:ravitemer/mcp-hub";
plugins-shipwright-nvim = { plugins-shipwright-nvim = {
url = "github:rktjmp/shipwright.nvim"; url = "github:rktjmp/shipwright.nvim";
@@ -51,8 +52,11 @@
forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all; forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all;
extra_pkg_config = { }; extra_pkg_config = { };
dependencyOverlays = [ mkDependencyOverlays = system: [
(utils.standardPluginOverlay inputs) (utils.standardPluginOverlay inputs)
(final: prev: {
mcp-hub = inputs.mcp-hub.packages.${system}.default;
})
]; ];
categoryDefinitions = categoryDefinitions =
@@ -66,12 +70,16 @@
black black
clang clang
clang-tools clang-tools
delta
fd
gawk gawk
gdtoolkit_4 gdtoolkit_4
isort isort
mcp-hub
nixd nixd
nixfmt nixfmt
nodePackages.prettier nodePackages.prettier
nodePackages.typescript-language-server
ormolu ormolu
prettierd prettierd
rustfmt rustfmt
@@ -152,6 +160,7 @@
fidget-nvim fidget-nvim
rustaceanvim rustaceanvim
pkgs.neovimPlugins.m-taskwarrior-d-nvim pkgs.neovimPlugins.m-taskwarrior-d-nvim
claude-code-nvim
]; ];
}; };
@@ -188,6 +197,7 @@
forEachSystem ( forEachSystem (
system: system:
let let
dependencyOverlays = mkDependencyOverlays system;
nixCatsBuilder = utils.baseBuilder luaPath { nixCatsBuilder = utils.baseBuilder luaPath {
inherit inherit
nixpkgs nixpkgs
@@ -219,31 +229,32 @@
moduleNamespace = [ defaultPackageName ]; moduleNamespace = [ defaultPackageName ];
inherit inherit
defaultPackageName defaultPackageName
dependencyOverlays
luaPath luaPath
categoryDefinitions categoryDefinitions
packageDefinitions packageDefinitions
extra_pkg_config extra_pkg_config
nixpkgs nixpkgs
; ;
dependencyOverlays = mkDependencyOverlays;
}; };
homeModule = utils.mkHomeModules { homeModule = utils.mkHomeModules {
moduleNamespace = [ defaultPackageName ]; moduleNamespace = [ defaultPackageName ];
inherit inherit
defaultPackageName defaultPackageName
dependencyOverlays
luaPath luaPath
categoryDefinitions categoryDefinitions
packageDefinitions packageDefinitions
extra_pkg_config extra_pkg_config
nixpkgs nixpkgs
; ;
dependencyOverlays = mkDependencyOverlays;
}; };
in in
{ {
overlays = utils.makeOverlays luaPath { overlays = utils.makeOverlays luaPath {
inherit nixpkgs dependencyOverlays extra_pkg_config; inherit nixpkgs extra_pkg_config;
dependencyOverlays = mkDependencyOverlays;
} categoryDefinitions packageDefinitions defaultPackageName; } categoryDefinitions packageDefinitions defaultPackageName;
nixosModules.default = nixosModule; nixosModules.default = nixosModule;

View File

@@ -43,4 +43,5 @@ require("nixCatsUtils.catPacker").setup({
{ "zbirenbaum/copilot-cmp" }, { "zbirenbaum/copilot-cmp" },
{ "qvalentin/helm-ls.nvim", ft = "helm" }, { "qvalentin/helm-ls.nvim", ft = "helm" },
{ "mikesmithgh/kitty-scrollback.nvim" }, { "mikesmithgh/kitty-scrollback.nvim" },
{ "greggh/claude-code.nvim" },
}) })

88
flake.lock generated
View File

@@ -29,11 +29,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1765771449, "lastModified": 1766046711,
"narHash": "sha256-ZoHRPmTzwC1ndX3NQB/b/WKtU1WduAJdLI4j8eW/QFM=", "narHash": "sha256-PijxRQcvSgQae3qBdY4+IGMsMFL67N3D7sBJdZxDii4=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "5bcf9a2aeb4d361c2ff918a146b3fcc1e136b9ca", "rev": "7163ab9a8e64cd29c45e8f93fbc038b12056e6fc",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -43,6 +43,28 @@
"type": "gitlab" "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": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@@ -68,11 +90,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1765682243, "lastModified": 1765980955,
"narHash": "sha256-yeCxFV/905Wr91yKt5zrVvK6O2CVXWRMSrxqlAZnLp0=", "narHash": "sha256-rB45jv4uwC90vM9UZ70plfvY/2Kdygs+zlQ07dGQFk4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "58bf3ecb2d0bba7bdf363fc8a6c4d49b4d509d03", "rev": "89c9508bbe9b40d36b3dc206c2483ef176f15173",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -81,6 +103,25 @@
"type": "github" "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": { "nix-secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -153,11 +194,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1765472234, "lastModified": 1765779637,
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=", "narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b", "rev": "1306659b587dc277866c7b69eb97e5f07864d8c4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -167,8 +208,25 @@
"type": "github" "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": { "nvim": {
"inputs": { "inputs": {
"mcp-hub": "mcp-hub",
"nixCats": "nixCats", "nixCats": "nixCats",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@@ -307,11 +365,11 @@
"plugins-tailwind-fold-nvim": { "plugins-tailwind-fold-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1752559116, "lastModified": 1766077142,
"narHash": "sha256-8uefZIVsn9USEd6FyiO3m3TRKAS/vigU4t9Tk5ijd3c=", "narHash": "sha256-SwcDLlygXUSV/dytPXA5Y45OpUhjnExc8SZg5a8MZ2k=",
"owner": "razak17", "owner": "razak17",
"repo": "tailwind-fold.nvim", "repo": "tailwind-fold.nvim",
"rev": "d9e7ca11691d252b35795726dff087bf013b2ebf", "rev": "e2ba5ee1ca9b74208709fe9d7314b8aa753b26a7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -340,11 +398,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1765684837, "lastModified": 1765836173,
"narHash": "sha256-fJCnsYcpQxxy/wit9EBOK33c0Z9U4D3Tvo3gf2mvHos=", "narHash": "sha256-hWRYfdH2ONI7HXbqZqW8Q1y9IRbnXWvtvt/ONZovSNY=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "94d8af61d8a603d33d1ed3500a33fcf35ae7d3bc", "rev": "443a7f2e7e118c4fc63b7fae05ab3080dd0e5c63",
"type": "github" "type": "github"
}, },
"original": { "original": {