diff --git a/common/gui.nix b/common/gui.nix index 4b12dda1..eadb7c10 100644 --- a/common/gui.nix +++ b/common/gui.nix @@ -33,7 +33,7 @@ lib.attrsets.optionalAttrs device.hasGui { ]; }; ghostty = { - enable = true; + enable = pkgs.stdenv.isLinux; installBatSyntax = false; settings = { theme = "catppuccin-mocha"; diff --git a/neovim/default.nix b/neovim/default.nix index 900b7f5a..659be01b 100644 --- a/neovim/default.nix +++ b/neovim/default.nix @@ -406,6 +406,27 @@ in { enable = true; settings = { server = { + on_attach = rawLua '' + function(client, bufnr) + vim.keymap.set( + "n", + "a", + function() + vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping + -- or vim.lsp.buf.codeAction() if you don't want grouping. + end, + { silent = true, buffer = bufnr } + ) + vim.keymap.set( + "n", + "K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions + function() + vim.cmd.RustLsp({'hover', 'actions'}) + end, + { silent = true, buffer = bufnr } + ) + end + ''; default_settings = { rust-analyzer = { inlayHints = {