I'm trying to map my leader to <C-s> and local leader to <C-q>, in my NeoVim (0.5.0) init.lua file. I know Ctrl-S and Ctrl-Q are software flow control, and I mainly use the terminal version of nvim (but I'm happy to disable software flow control in the terminal emulator), but strangely this mapping doesn't work in graphical nvim-qt either?
This indirect mapping does work for as a leader:
vim.api.nvim_set_keymap( '' , '<C-s>' , '<Leader>' , {noremap = false} ) But directly trying to set it, does not:
vim.g.mapleader = "<C-s>" I've tried many variations such as \<C-s> and <C-S> but none seem to work when called via the vim.g.mapleader function. That said, if I do an echo mapleader it does show <C-s>, but none of the actual bindings work, they only work if I have set the leader indirectly...
If I use something conventional like these, then the mappings work...
vim.g.mapleader = " " vim.g.mapleader = "," vim.g.mapleader = "\\" Any idea what is so special about trying to use mapleader with a Ctrl+Key combination?