stevearc / dressing.nvim

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

Do not apply `sidescrolloff` to DressingInput #75

Closed chrisgrieser closed 1 year ago

chrisgrieser commented 1 year ago

Describe the bug when you have a higher sidescrolloff value, this leads DressingInput to not using the entire width of the input window.

for the DressingInput window, sidescrolloff should be disabled or set to 0.

To Reproduce Steps to reproduce the behavior:

  1. set vim.opt.sidescrolloff = 30
  2. run LSP rename (or anything else triggering dressing input)
  3. fill a lot of characters

Additional context this fixed it for me

augroup("dressing", {})
autocmd("FileType", {
    pattern = "DressingInput",
    group = "dressing",
    command = "setlocal sidescrolloff=0",
})
stevearc commented 1 year ago

I've refactored the config to allow passing in any window options you like. This should work for you now:


require("dressing").setup({
  input = {
    win_options = {
      sidescrolloff = 0,
    },
  },
})
chrisgrieser commented 1 year ago

thanks for the quick fix, works fantastic. 🙂