Skip to content

Commit ffd3eba

Browse files
misumisumimisumisumi
andauthored
Fix deprecated tree-sitter package and update codecompanion v18 (#1557)
* fix(codecompanion): update to v18 * fix(settings): remove jsonc treesitter - jsonc is not available on upstream by nvim-treesitter/nvim-treesitter#8316 --------- Co-authored-by: misumisumi <[email protected]>
1 parent e238255 commit ffd3eba

File tree

4 files changed

+53
-11
lines changed

4 files changed

+53
-11
lines changed

lazy-lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" },
1616
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
1717
"codecompanion-history.nvim": { "branch": "main", "commit": "8c6ca9f998aeef89f3543343070f8562bf911fb4" },
18-
"codecompanion.nvim": { "branch": "main", "commit": "e7762c68daf24c3e356401f5223eeb5217047754" },
18+
"codecompanion.nvim": { "branch": "main", "commit": "e0780fa9fda504ffb89307cabcb6cbe1ce8eb60c" },
1919
"copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" },
2020
"copilot.lua": { "branch": "master", "commit": "e78d1ffebdf6ccb6fd8be4e6898030c1cf5f9b64" },
2121
"crates.nvim": { "branch": "main", "commit": "ac9fa498a9edb96dc3056724ff69d5f40b898453" },

lua/core/settings.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ settings["treesitter_deps"] = {
160160
"html",
161161
"javascript",
162162
"json",
163-
"jsonc",
164163
"latex",
165164
"lua",
166165
"make",

lua/modules/configs/tool/codecompanion.lua

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ return function()
2424
modes = { n = "<CR>" },
2525
description = "Submit",
2626
callback = function(chat)
27-
chat:apply_model(current_model)
2827
chat:submit()
2928
end,
3029
},
@@ -33,6 +32,9 @@ return function()
3332
inline = {
3433
adapter = "openrouter",
3534
},
35+
cmd = {
36+
adapter = "openrouter",
37+
},
3638
},
3739
adapters = {
3840
http = {
@@ -55,19 +57,61 @@ return function()
5557
display = {
5658
diff = {
5759
enabled = true,
58-
close_chat_at = 240, -- Close an open chat buffer if the total columns of your display are less than...
59-
layout = "vertical", -- vertical|horizontal split for default provider
60-
opts = { "internal", "filler", "closeoff", "algorithm:patience", "followwrap", "linematch:120" },
61-
provider = "default", -- default|mini_diff
60+
provider = "inline", -- mini_diff|split|inline
61+
provider_opts = {
62+
inline = {
63+
layout = "float", -- float|buffer
64+
},
65+
},
66+
split = {
67+
close_chat_at = 240, -- Close an open chat buffer if the total columns of your display are less than...
68+
layout = "vertical", -- vertical|horizontal split
69+
opts = {
70+
"internal",
71+
"filler",
72+
"closeoff",
73+
"algorithm:histogram", -- https://adamj.eu/tech/2024/01/18/git-improve-diff-histogram/
74+
"indent-heuristic", -- https://blog.k-nut.eu/better-git-diffs
75+
"followwrap",
76+
"linematch:120",
77+
},
78+
},
6279
},
6380
chat = {
6481
window = {
82+
auto_scroll = true,
83+
border = "single",
84+
full_height = true, -- when set to false, vsplit will be used to open the chat buffer vs. botright/topleft vsplit
6585
layout = "vertical", -- float|vertical|horizontal|buffer
6686
position = "right", -- left|right|top|bottom (nil will default depending on vim.opt.plitright|vim.opt.splitbelow)
67-
border = "single",
68-
width = 0.25,
6987
relative = "editor",
70-
full_height = true, -- when set to false, vsplit will be used to open the chat buffer vs. botright/topleft vsplit
88+
show_header_separator = true,
89+
width = 0.25,
90+
},
91+
},
92+
},
93+
rules = {
94+
default = {
95+
description = "Collection of common files for all projects",
96+
files = {
97+
".clinerules",
98+
".cursorrules",
99+
".goosehints",
100+
".rules",
101+
".windsurfrules",
102+
".github/copilot-instructions.md",
103+
"AGENT.md",
104+
"AGENTS.md",
105+
{ path = "CLAUDE.md", parser = "claude" },
106+
{ path = "CLAUDE.local.md", parser = "claude" },
107+
{ path = "~/.claude/CLAUDE.md", parser = "claude" },
108+
},
109+
is_preset = true,
110+
},
111+
opts = {
112+
chat = {
113+
autoload = "default", -- The rule groups to load
114+
enabled = true,
71115
},
72116
},
73117
},

lua/modules/plugins/tool.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ tool["gelguy/wilder.nvim"] = {
7575
if settings.use_chat then
7676
tool["olimorris/codecompanion.nvim"] = {
7777
lazy = true,
78-
tag = "v17.33.0",
7978
event = "VeryLazy",
8079
config = require("tool.codecompanion"),
8180
dependencies = {

0 commit comments

Comments
 (0)