diff --git a/home.nix b/home.nix index 7094111..2601d34 100755 --- a/home.nix +++ b/home.nix @@ -346,58 +346,68 @@ }; }; - keymaps = { - silent = true; - lspBuf = { - gd = { - action = "definition"; - desc = "Goto Definition"; - }; - gr = { - action = "references"; - desc = "Goto References"; - }; - gD = { - action = "declaration"; - desc = "Goto Declaration"; - }; - gI = { - action = "implementation"; - desc = "Goto Implementation"; - }; - gT = { - action = "type_definition"; - desc = "Type Definition"; - }; - K = { - action = "hover"; - desc = "Hover"; - }; - "cw" = { - action = "workspace_symbol"; - desc = "Workspace Symbol"; - }; - "r" = { - action = "rename"; - desc = "Rename"; - }; - }; - - diagnostic = { - "cd" = { - action = "open_float"; - desc = "Line Diagnostics"; - }; - "]d" = { - action = "goto_next"; - desc = "Next Diagnostic"; - }; - "[d" = { - action = "goto_prev"; - desc = "Previous Diagnostic"; - }; - }; - }; + keymaps = [ + { + key = "gd"; + lspBufAction = "definition"; + desc = "Goto Definition"; + options.silent = true; + } + { + key = "gr"; + lspBufAction = "references"; + desc = "Goto References"; + options.silent = true; + } + { + key = "gD"; + lspBufAction = "declaration"; + desc = "Goto Declaration"; + options.silent = true; + } + { + key = "gI"; + lspBufAction = "implementation"; + desc = "Goto Implementation"; + options.silent = true; + } + { + key = "gT"; + lspBufAction = "type_definition"; + desc = "Type Definition"; + options.silent = true; + } + { + key = "K"; + lspBufAction = "hover"; + desc = "Hover"; + options.silent = true; + } + { + key = "cw"; + action = "workspace_symbol"; + desc = "Workspace Symbol"; + } + { + key = "r"; + action = "rename"; + } + { + key = "cd"; + action = "open_float"; + desc = "Line Diagnostics"; + } + { + key = "]d"; + action = "goto_next"; + desc = "Next Diagnostic"; + } + { + key = "[d"; + action = "goto_prev"; + desc = "Previous Diagnostic"; + } + ]; }; cmp = {