stevearc / dressing.nvim

Neovim plugin to improve the default vim.ui interfaces
MIT License
1.87k stars 34 forks source link

side-scrolling with off-set for long input #76

Closed jan-xyz closed 1 year ago

jan-xyz commented 1 year ago

Sometimes I find myself deleting too much of a text when for example renaming a file in nvim-tree.lua because I can't see the characters to the left. It would be really nice if I could configure the offset of characters to the left so that I can see what I'm deleting next.

Screenshot 2022-12-07 at 07 56 32
stevearc commented 1 year ago

This is a great use case for :help sidescrolloff. You can set that by passing it in as a window option

require("dressing").setup({
  input = {
    win_options = {
      sidescrolloff = 4,
    },
  },
})
jan-xyz commented 1 year ago

Uuuuhhh and here I thought I looked through all the docs. I didn't know Neovim comes packed with this! Thank you!

meatballs commented 1 year ago

@jan-xyz How did you get the input to extend beyond the nvim-tree buffer? Mine is always limited to the width of that buffer.