Skip to content

Conversation

@noelevans
Copy link

Cursorword highlighting may not be desired when in insert mode. When cursorword highlighting uses fg and bg options particularly, the highlighting of the current word feels distracting. For example if the user is typing the word "return", highlighting triggers for "ret", "retu", "retur" and finally "return". Attaching example screenshot to ticket.

Cursorword highlighting may not be desired when in insert mode. When
cursorword highlighting uses fg and bg options particularly, the
highlighting of the current word feels distracting. For example if the
user is typing the word "return", highlighting triggers for "ret",
"retu", "retur" and finally "return". Attaching example screenshot to
ticket.
@noelevans
Copy link
Author

Here is cursorword highlighting while typing a return statement (in the main code) which for my use feels a bit distracting:
image

It then works as desired once the word is completed and normal mode is active:
image

The above screenshots are using these settings

require("nvim-cursorline").setup({
  cursorline = {
    enable = false,
  },
  cursorword = {
    enable = true,
    min_length = 1,
    hl = {
      fg = "#c0caf5",
      bg = "#565f89",
      underline = false,
    },
  },
})

@noelevans
Copy link
Author

Hi @yamatsum so I'm proposing this change which would make highlighting of the current word in insert mode as optional, defaulting to the current behavior (actively highlighting). I would like to be able to turn off insert mode highlighting. I wondered if you'd accept this PR to make that possible. Many thanks, Noel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant