@@ -49,9 +49,9 @@ local plugins = {
49
49
},
50
50
{
51
51
" folke/flash.nvim" ,
52
- commit = " 48817af25f51c0590653bbc290866e4890fe1cbe " ,
52
+ commit = " 11a2e667d19d8f48c93c6ed2e2e525ac6b1b79be " ,
53
53
event = " VeryLazy" ,
54
- opts = {},
54
+ opts = { modes = { search = { enabled = true }} },
55
55
},
56
56
{ " machakann/vim-columnmove" , commit = " 21a43d809a03ff9bf9946d983d17b3a316bf7a64" , event = " VeryLazy" },
57
57
@@ -152,6 +152,7 @@ if not vim.g.vscode then
152
152
vim .cmd [[ au VimEnter * :TSEnable highlight" ]]
153
153
vim .cmd [[ color poimandres ]]
154
154
vim .api .nvim_set_hl (0 , " Comment" , { fg = " #444444" , bg = " NONE" })
155
+ vim .api .nvim_set_hl (0 , " FlashLabel" , { fg = " NONE" , bg = " #5FB3A1" })
155
156
vim .api .nvim_set_hl (0 , " Visual" , { fg = " NONE" , bg = " #1c1c1c" })
156
157
vim .api .nvim_set_hl (0 , " MiniCursorword" , { fg = " NONE" , bg = " #1c1c2c" })
157
158
end
202
203
203
204
---- --------------------------------------------------------------------------------------------------------------------
204
205
206
+ -- vscode's keybinding.json with neovim.fullMode context for flash mode and replace mode
207
+ -- https://github.com/vscode-neovim/vscode-neovim/issues/1718
208
+
209
+ -- to view which keypresses is mapped to, run:
210
+ -- :lua vim.on_key(function(key) vim.notify(key .. vim.api.nvim_get_mode().mode) end)
211
+ -- :lua vim.on_key(function(key) vim.print({ key, vim.api.nvim_get_mode().mode }) end)
212
+
213
+ if vim .g .vscode then
214
+ vim .on_key (function (key )
215
+
216
+ local esc_termcode = vim .api .nvim_replace_termcodes (" <esc>" , true , false , true )
217
+ local key_termcode = vim .api .nvim_replace_termcodes (key , true , false , true )
218
+
219
+ if key_termcode :find (" X.*g" ) then
220
+ -- vim.print("f_mode_enter");
221
+ vscode .call (" setContext" , { args = { " neovim.fullMode" , " f" }, })
222
+ end
223
+
224
+ if (vim .api .nvim_get_mode ().mode == " n" and key_termcode :find (" '" )) or key_termcode :find (esc_termcode ) or key_termcode :find (" X.*h" ) then
225
+ -- vim.print("f_mode_exit");
226
+ vscode .call (" setContext" , { args = { " neovim.fullMode" , " n" }, })
227
+ end
228
+
229
+ if vim .api .nvim_get_mode ().mode == " n" and key_termcode :find (" r" ) then
230
+ -- vim.print("r_mode_enter");
231
+ vscode .call (" setContext" , { args = { " neovim.fullMode" , " r" }, })
232
+ end
233
+
234
+ if vim .api .nvim_get_mode ().mode == " R" then
235
+ -- vim.print("r_mode_exit");
236
+ vscode .call (" setContext" , { args = { " neovim.fullMode" , " n" }, })
237
+ end
238
+
239
+ end )
240
+ end
241
+
242
+ ---- --------------------------------------------------------------------------------------------------------------------
243
+
205
244
local M = {}
206
245
207
246
-- https://www.reddit.com/r/neovim/comments/zc720y/tip_to_manage_hlsearch/
0 commit comments