rhysd / git-messenger.vim

Vim and Neovim plugin to reveal the commit messages under the cursor
MIT License
1.34k stars 32 forks source link

Add highlight border color variable #73

Closed ecosse3 closed 3 years ago

ecosse3 commented 3 years ago

Hi,

It would be nice if you add the ability to set highlight border color. I use this plugin pretty often and I've started using lspsaga.nvim so I would like to set the colors of git-messenger to be similar to all my IDE.

Linking background color works as expected but without border, it's hard to recognize popup.

LspSaga border style: image

Current git-messenger popup (hard to see): image

Thanks!

rhysd commented 3 years ago

My recommendation is setting different background color from Normal for NormalFloat or gitmessengerPopupNormal.

My recommended config is below:

autocmd ColorScheme * highlight link gitmessengerPopupNormal CursorLine

Does this work fine in your environment? Or do you still want border?

phelipetls commented 3 years ago

Neovim now has an API to add border to floating windows. Would it be easy to add configuration for this? For example, let g:git_messenger_border = "single" to pass { border: "single" } to nvim_open_win.

rhysd commented 3 years ago

Looks good. I didn't know Neovim's float window supports borders since it had not supported it when I'd implemented this plugin.

rhysd commented 3 years ago

@ecosse3 @phelipetls I tried border window and felt that margin was not necessary when border existed. So I tried to implement to make margin configurable at margin-removable branch.

Do you think you want this feature?

スクリーンショット 2021-04-16 18 28 07

compared to

スクリーンショット 2021-04-16 18 31 41
phelipetls commented 3 years ago

Yes, that'd be great! Thanks for the plugin.

gegoune commented 3 years ago

I prefer with margins. :)

rhysd commented 3 years ago

@phelipetls @cloggier

Thank you for your feedbacks. Since adding/removing margin is separate configuration from floating window options, it's possible to add both border and margin. I'll merge this into master after adding some tests.