nvim-navic icon indicating copy to clipboard operation
nvim-navic copied to clipboard

[feat] add update_in_insert and lazy_update_in_insert options

Open spflaumer opened this issue 2 years ago • 3 comments

The update_in_insert and lazy_update_in_insert options, with their respective vim.b.update_in_insert and vim.b.lazy_update_in_insert counterparts, allow the user of the plugin to enable updating the context while in Insert mode.

Currently, the information returned by get_data, and it's get_location wrapper, is the same as when first entering Insert mode. Now the context will update in insert mode, providing a fresh context with the "CursorHoldI" and "CursorMovedI" events.

spflaumer avatar Feb 07 '24 16:02 spflaumer

Does this achieve same as #168 ?

SmiteshP avatar Nov 25 '25 05:11 SmiteshP

Yes, but this also adds options to control that behavior for users that may not want updates in Insert mode. Reading the code a year later, it isn't the best and the commit messages suck, so I might want to redo this if you consider the config options a useful addition

spflaumer avatar Nov 25 '25 06:11 spflaumer

Sure 👍🏽

SmiteshP avatar Nov 25 '25 06:11 SmiteshP