Comments (3)
Thank you for your answer and tips 🙂. I understand a little better how the Vim UI works.
Indeed, I use Windows Terminal which supports blurred background and that's why, for better appearance, I disabled as many backgrounds as possible using:
let g:sonokai_transparent_background=2
Also, what I like about the transparency of Vim is that it is pseudo-transparent actually, inside the Vim UI and you can't see through a floating window even if it's "transparent".
Floating transparent windows actually just takes the lowest background of the UI at that specific area.
With borders it's even better like here:
Even if there is text behind the floating window, the text will not appear and will be covered by pseudo-transparent background.
Unless I misunderstood something.
This is precisely want I need to achieve for all my floating windows.
Should look at how to customize the background for each plugin that uses floating windows or is there a way to overwrite the default appearance of all floating windows of Vim?
Thanks in advance for your time 🙂.
Edit : I finally found that I just had to define the following highlight commands:
vim.cmd("hi NormalFloat ctermbg=NONE guibg=NONE")
vim.cmd("hi FloatTitle ctermbg=NONE guibg=NONE")
vim.cmd("hi FloatBorder ctermbg=NONE guibg=NONE")
And here is the result for Mason.nvim
for example :
Should add this for LSP Diagnostics
vim.cmd("hi DiagnosticFloatingHint ctermbg=NONE guibg=NONE guifg=#42E66C")
vim.cmd("hi DiagnosticFloatingInfo ctermbg=NONE guibg=NONE guifg=#0876c5")
vim.cmd("hi DiagnosticFloatingWarn ctermbg=NONE guibg=NONE guifg=#E8AB53")
vim.cmd("hi DiagnosticFloatingError ctermbg=NONE guibg=NONE guifg=#ff5189")
Freely choosing foreground colors (guifg
)
output:
Thank you for your attention.
from sonokai.
I thought setting NormalFloat
(which is the default highlight group of floating window) to be transparent, but the problem is that not all floating window have a border, instead the designs in most of them are using a brighter background to distinguish between normal background colors, so I gave up this idea.
Another thing that needs to be considered is that vim actually shouldn't make everything transparent, some elements should use a different background color (e.g. the status line). If you want to make your vim fully transparent, you should consider switching to a terminal emulator that supports blurred background (e.g. konsole). This will fully blur every elements in vim, which will look much better.
from sonokai.
Any solutions for Linux? I have the same problem on Arch Linux with Alacritty. The solution above didn't help.
from sonokai.
Related Issues (20)
- Better ruby highlights HOT 4
- [Question] Does the colorscheme need to do something to support hrsh7th/cmp-nvim-lsp-signature-help HOT 1
- Add WinBar and WinBarNC HOT 8
- Error when define colorscheme sonokai HOT 2
- A lot of highlight warning. HOT 2
- How to change style to Andromeda in lua? HOT 2
- Emacs Port? HOT 4
- bufferline HOT 3
- How to set Espresso mode? HOT 2
- Nvim-navic has wrong background color in statusline from lualine HOT 5
- Interest in support nvim lsp semantic highlighting? HOT 6
- LSP saga floating window design HOT 9
- Support Neo-tree.nvim HOT 5
- help with folke/noice.nvim and mini view HOT 5
- Configuration for dim float window style HOT 2
- Questions: Better way to highlight variable with {} in shell script HOT 1
- Question: Better highlighter command support for Dockerfile with treesitter HOT 6
- Support vim HOT 3
- Variables starting with uppercase letter have different color HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonokai.