Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Neotree and splitting a window causes Avante response area to shrink when placed at bottom pos #830

Open
Kysawier opened this issue Nov 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Kysawier
Copy link

Describe the bug

The response chat area gets smaller (while input textarea gets bigger) and stays smaller after each consecutive opening of neotree (or split window in an avante pane). It happens when avante chat is placed at bottom edge of neovim. Kinda anoying cuz you need to reopen the avante each time you use neotree.

To reproduce

  1. :AvanteAsk
  2. :Neotree

Expected behavior

  1. Open neotree
  2. Avante resizes
  3. Close neotree
  4. Avante resizes back

Installation method

Use lazy.nvim:

{
  "yetone/avante.nvim",
  event = "VeryLazy",
  lazy = false,
  version = false, -- set this if you want to always pull the latest change
  opts = {
      windows = {
        position = 'bottom',
        wrap = true,
        width = 30,
        min_height = 10, -- Minimum height to prevent squeezing
        sidebar_header = {
          enabled = true,
          align = 'left',
        },
      },
    },
  -- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
  build = "make",
  -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
  dependencies = {
    "nvim-treesitter/nvim-treesitter",
    "stevearc/dressing.nvim",
    "nvim-lua/plenary.nvim",
    "MunifTanjim/nui.nvim",
  },
}

Environment

Platform: Arch
Neovim: 0.10.2

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
  {
    'yetone/avante.nvim',
    event = 'VeryLazy',
    lazy = false,
    version = false, -- set this if you want to always pull the latest change
    opts = {
      windows = {
        position = 'bottom',
        wrap = true,
        width = 30,
        min_height = 10, -- Minimum height to prevent squeezing
        sidebar_header = {
          enabled = true,
          align = 'left',
        },
      },
    },
    build = 'make',
    dependencies = {
      'nvim-treesitter/nvim-treesitter',
      'stevearc/dressing.nvim',
      'nvim-lua/plenary.nvim',
      'MunifTanjim/nui.nvim',
      'nvim-tree/nvim-web-devicons',
      'zbirenbaum/copilot.lua',
      {
        'HakonHarnes/img-clip.nvim',
        event = 'VeryLazy',
        opts = {
          default = {
            embed_image_as_base64 = false,
            prompt_for_file_name = false,
            drag_and_drop = {
              insert_mode = true,
            },
            use_absolute_path = true,
          },
        },
      },
      {
        'MeanderingProgrammer/render-markdown.nvim',
        opts = {
          file_types = { 'markdown', 'Avante' },
        },
        ft = { 'markdown', 'Avante' },
      },
    },
  },

  },
})
@Kysawier Kysawier added the bug Something isn't working label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant