nvim-cmp icon indicating copy to clipboard operation
nvim-cmp copied to clipboard

Customize docs location

Open zbirenbaum opened this issue 4 years ago • 6 comments

Something that I have really wanted for a while, but found out is easy to implement now with the new views changes, is the ability to customize the docs location to place it into the top right corner.

I managed to get mostly what I was looking for (although the line draw to fill max width messed things up when I tried to enforce a specific size cap with line wraps, but that should be fairly easily fixed...) after about 10 minutes of playing around in docs_view.lua

  self.window:set_style({
    relative = 'editor',
    style = 'minimal',
    width = width,
    height = height,
    row = vim.opt.tabline:get() == "" and 0 or 1,
    col = vim.api.nvim_win_get_width(0)-width-1,
    border = documentation.border,
    zindex = documentation.zindex or 50,
  })

It would be pretty easy to add in the ability to override these with something like documentation.row or row, etc... If anyone else thinks this would be a good idea I'd be happy to PR it in the next few days.

zbirenbaum avatar Feb 03 '22 07:02 zbirenbaum

Seems like a cool idea! Hope to get more customisation for windows in general!

DeadlySquad13 avatar Jun 25 '22 11:06 DeadlySquad13

I like

denstiny avatar Jun 25 '22 11:06 denstiny

I really like this since my doc window is always too small

OrlandoMatteo avatar Oct 13 '22 09:10 OrlandoMatteo

This is a really cool idea. +1 to making this happen 🚀

jonfriesen avatar Nov 30 '22 23:11 jonfriesen

5thing on this one, would be great to have :-)

dfendr avatar May 01 '23 03:05 dfendr