fix(vscode): only remap keybinds when running in vscode

This commit is contained in:
Folke Lemaitre 2023-05-24 21:59:32 +02:00
parent 868ccedff2
commit 7c9abd7463
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -8,6 +8,9 @@ local function map(mode, lhs, rhs, opts)
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
opts = opts or {}
opts.silent = opts.silent ~= false
if opts.remap and not vim.g.vscode then
opts.remap = nil
end
vim.keymap.set(mode, lhs, rhs, opts)
end
end