-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scrollview hides text at the end of a line #132
Comments
Hi @lostl1ght. I don't know of a Neovim option for specifying where text should wrap when The plugin has options for controlling the transparency of its windows. If you're using However, transparency only works if there is no text (on scrollbars and/or signs). By default, the scrollbar has no text (this can be changed with the Here's an example showing how the scrollbar and search signs could be made partially transparent. let g:scrollview_winblend = 80
let g:scrollview_winblend_gui = 80
highlight ScrollViewSearch ctermbg=159 guibg=LightCyan
let g:scrollview_search_symbol = '' But removing the text from signs makes them less useful. They'd have to be differentiated based on their color only. |
So, it appears that there's no option to wrap before EOL. And, unfortunately, the suggested plugin setting are not ideal. Other option is to toggle the scrollbar on You can close as not planned if you'd like. |
I think we are missing this feature: neovim/neovim#4386.
That's interesting, I will try this, but sometimes I have to edit in normal mode, so this can still be a problem, but less. Yeah, not ideal. BTW, my problem is that sometimes some signs (?) are blocking the cell completely, like here: So the fact that I have a transparent scrollbar doesn't mean anything. But now that I disable So at least entering and leaving the insert mode is much easier than pure pain of not seeing what is behind there. And I think this problem will only happen in text files (plain, Typst, Markdown etc.) and not in code files. Basically in half of the cases for me. ;) |
I've added a new option, Vimscript: let g:scrollview_hide_for_insert = v:true Lua: vim.g.scrollview_hide_for_insert = true
-- Or with a setup function:
require('scrollview').setup({
...
hide_for_insert = true,
...
}) Another workaround could be to use a mapping that toggles the plugin. For example, the following sets noremap <c-v> <Plug>(ScrollViewToggle)
inoremap <c-v> <Plug>(ScrollViewToggle) |
That's a good addition, but can you expand it to be able to customize which part gets hidden? I tried it, and I don't like that it also hides an already semitransparent scrollbar. Instead, I use: local scrollview_group = vim.api.nvim_create_augroup("scrollview", {})
vim.api.nvim_create_autocmd({ "InsertEnter" }, {
callback = function()
vim.cmd [[silent ScrollViewDisable diagnostics]]
end,
group = scrollview_group,
})
vim.api.nvim_create_autocmd({ "InsertLeave" }, {
callback = function()
vim.cmd [[silent ScrollViewEnable diagnostics]]
end,
group = scrollview_group,
}) Like, it can be require("scrollview").setup {
hide_for_insert = { "diagnostics" },
} |
Hi @Andrew15-5. I've replaced The following examples will hide all signs and the scrollbar. Vimscript: let g:scrollview_signs_hidden_for_insert = ['all']
let g:scrollview_hide_bar_for_insert = v:true Lua: vim.g.scrollview_signs_hidden_for_insert = {'all'}
vim.g.scrollview_hide_bar_for_insert = true
-- Or with a setup function:
require('scrollview').setup({
...
signs_hidden_for_insert = {'all'},
hide_bar_for_insert = true,
...
}) The following examples will hide just the diagnostics signs. Vimscript: let g:scrollview_signs_hidden_for_insert = ['diagnostics'] Lua: vim.g.scrollview_signs_hidden_for_insert = {'diagnostics'}
-- Or with a setup function:
require('scrollview').setup({
...
signs_hidden_for_insert = {'diagnostics'},
...
}) |
Thank you very much. My config is now much cleaner. |
Hello!
I'm not sure if it is a bug or not but the scrollbar hides text at the end of a line. Is there any way to wrap text before scrollbar?
Steps to reproduce
nvim -u min.lua
:e somefile.txt
Minimal config
Below the letters
ex
are hidden:The text was updated successfully, but these errors were encountered: