feat: neovim: add the russian map support.

This commit is contained in:
Andrey Parhomenko 2023-11-20 07:26:11 +03:00
parent a8a61c6743
commit f2989bc480

View file

@ -1,4 +1,18 @@
local function escape(str)
local escape_chars = [[;,."|\]]
return vim.fn.escape(str, escape_chars)
end
local en_shift = [[~QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>]]
local ru_shift = [[ËЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ]]
local en = [[`qwertyuiop[]asdfghjkl;'zxcvbnm]]
local ru = [[ёйцукенгшщзхъфывапролджэячсмить]]
vim.opt.langmap = vim.fn.join({
escape(ru_shift) .. ';' .. escape(en_shift),
escape(ru) .. ';' .. escape(en),
}, ',')
vim.o.timeout = false vim.o.timeout = false
-- Key mapping -- Key mapping
local map = vim.api.nvim_set_keymap local map = vim.api.nvim_set_keymap