Skip to content
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

Highlight parenthesis character only and not the entire block #118

Open
joelostblom opened this issue Oct 2, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@joelostblom
Copy link
Contributor

Originally from jupyterlab/jupyterlab#15196 where it was suggested that this is a better fit for jupyterlab-vim

Problem

Currently, matching parenthesis are indicated by highlighting the entire block the parenthesis is in, rather than just the parenthesis character itself. This makes it difficult to tell apart the cursor from the highlighted parenthesis as they melt into each other as you can see in this short clip:

jlab-cursor-2023-10-01_14.45.47.mp4

a block cursor from a highlight parenthesis and is confusing when moving through text quickly.

Proposed Solution

I think it is much easier to keep track of the cursor position if just the parenthesis character is highlighted, rather than the entire block. This is how things look in vim for me:

vim-cursor-2023-10-01_14.46.52.mp4

Additional context

I believe this is a recent change, possibly new in 4.0, because I recently upgraded from 3.6 and immediately reacted to how hard it was to tell where my cursor is. Note that I do use vim mode for the cursor to be a block, but I believe this is a general issue for any block cursor.

Any CSS workaround that can be applied right away until there is a fix forthis would be much appreciated. I think this also affect non-block cursors to a lesser extent because the block highlight generally introduces more visual noise

@firai
Copy link
Collaborator

firai commented Nov 10, 2023

By the way, whether matching parentheses in vim are highlighted as blocks or as a foreground color seems to depend on the theme. I use Gruvbox and matching parentheses are highlighted as blocks, so the current behavior matches what I see in vim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants