feat: Switch to rustaceanvim keymaps
This commit is contained in:
@@ -33,7 +33,7 @@ lib.attrsets.optionalAttrs device.hasGui {
|
||||
];
|
||||
};
|
||||
ghostty = {
|
||||
enable = true;
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
installBatSyntax = false;
|
||||
settings = {
|
||||
theme = "catppuccin-mocha";
|
||||
|
||||
@@ -406,6 +406,27 @@ in {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
on_attach = rawLua ''
|
||||
function(client, bufnr)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>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 = {
|
||||
|
||||
Reference in New Issue
Block a user