Is it possible to hide the cursor when on alpha? #75
Unanswered
LudoPinelli
asked this question in
Q&A
Replies: 2 comments 3 replies
-
Try that :) Adapted from neovim/neovim#3688 (comment) local config = {
layout = {
...
},
opts = {
setup = function()
vim.api.nvim_create_autocmd('User', {
pattern = 'AlphaReady',
desc = 'hide cursor for alpha',
callback = function()
local hl = vim.api.nvim_get_hl_by_name('Cursor', true)
hl.blend = 100
vim.api.nvim_set_hl(0, 'Cursor', hl)
vim.opt.guicursor:append('a:Cursor/lCursor')
end,
})
vim.api.nvim_create_autocmd('BufUnload', {
buffer = 0,
desc = 'show cursor after alpha',
callback = function()
local hl = vim.api.nvim_get_hl_by_name('Cursor', true)
hl.blend = 0
vim.api.nvim_set_hl(0, 'Cursor', hl)
vim.opt.guicursor:remove('a:Cursor/lCursor')
end,
})
end,
...
},
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
just in case anyone else stumbles upon this, there's another way { type = 'button', val = '█' }, the only downside is that the cursor becomes visible again when the terminal is out of focus |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm sure there is a way, but I'm pretty new to the lua/neovim/programming world and can't find an easy answer.
It's a detail but I find that having this block hiding the first letter on the landing page is pretty ugly ^^
Beta Was this translation helpful? Give feedback.
All reactions