neovim: disable system keybind to switch keyboard layout

required to fix ghostty
This commit is contained in:
Dmitriy Pleshevskiy 2025-01-03 15:57:46 +03:00
parent 0148c6f403
commit 900e9a189f
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -2,7 +2,7 @@
with lib.nix2lua;
let
inherit (lib.mod) space cmd leader localLeader ctrl;
inherit (lib.mod) space cmd super localLeader ctrl;
gs = config.plugin.gitsigns-nvim.varName;
in
{
@ -60,7 +60,10 @@ in
{ mode = [ "n" "v" ]; lhs = localLeader "a"; rhs = raw "vim.lsp.buf.code_action"; }
];
vim.keymap.set = lib.optionals config.plugins.language-server.lspconfig.enable [
vim.keymap.set = [
# Required for Ghostty: Disable system binding to switch keyboard layout
{ mode = "!"; lhs = super lib.mod.Space; rhs = lib.mod.Nop; }
] ++ lib.optionals config.plugins.language-server.lspconfig.enable [
{ mode = "n"; lhs = localLeader "df"; rhs = raw "vim.diagnostic.open_float"; }
{ mode = "n"; lhs = "[d"; rhs = raw "vim.diagnostic.goto_prev"; }
{ mode = "n"; lhs = "]d"; rhs = raw "vim.diagnostic.goto_next"; }