Skip to content

Commit a307556

Browse files
committed
fix EcaFixTreeSitter command and update docs
1 parent 63c6193 commit a307556

3 files changed

Lines changed: 4 additions & 13 deletions

File tree

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ require("eca").setup({
333333
- Set `server_path` if you prefer using a local ECA binary.
334334
- Use the `log` block to control verbosity and where logs are written.
335335
- `context.auto_repo_map` controls whether repo context is attached automatically.
336-
- `todos` and `selected_code` can be disabled entirely if you prefer a simpler UI.
336+
337337
- Adjust `windows.width` to fit your layout.
338338
- Keymaps can be set manually by turning off `behavior.auto_set_keymaps` and defining your own mappings.
339339
- The `windows.usage.format` string controls how token and cost usage are displayed.

lua/eca/commands.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,12 @@ function M.setup()
407407
})
408408

409409
vim.api.nvim_create_user_command("EcaFixTreesitter", function()
410-
local Utils = require("eca.utils")
411-
412410
-- Emergency treesitter fix for chat buffer
413411
vim.schedule(function()
414412
local eca = require("eca")
415-
if eca.sidebar and eca.sidebar.containers and eca.sidebar.containers.chat then
416-
local bufnr = eca.sidebar.containers.chat.bufnr
413+
local sidebar = eca.get()
414+
if sidebar and sidebar.containers and sidebar.containers.chat then
415+
local bufnr = sidebar.containers.chat.bufnr
417416
if bufnr and vim.api.nvim_buf_is_valid(bufnr) then
418417
-- Disable all highlighting for this buffer
419418
pcall(vim.api.nvim_set_option_value, "syntax", "off", { buf = bufnr })

lua/eca/config.lua

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ M._defaults = {
2121
context = {
2222
auto_repo_map = true, -- Automatically add repoMap context when starting new chat
2323
},
24-
todos = {
25-
enabled = true, -- Enable todos functionality
26-
max_height = 5, -- Maximum height for todos container
27-
},
28-
selected_code = {
29-
enabled = true, -- Enable selected code display
30-
max_height = 8, -- Maximum height for selected code container
31-
},
3224
mappings = {
3325
chat = "<leader>ec",
3426
focus = "<leader>ef",

0 commit comments

Comments
 (0)