feat: Switch to rustaceanvim keymaps
This commit is contained in:
@@ -33,7 +33,7 @@ lib.attrsets.optionalAttrs device.hasGui {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
ghostty = {
|
ghostty = {
|
||||||
enable = true;
|
enable = pkgs.stdenv.isLinux;
|
||||||
installBatSyntax = false;
|
installBatSyntax = false;
|
||||||
settings = {
|
settings = {
|
||||||
theme = "catppuccin-mocha";
|
theme = "catppuccin-mocha";
|
||||||
|
|||||||
@@ -406,6 +406,27 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
server = {
|
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 = {
|
default_settings = {
|
||||||
rust-analyzer = {
|
rust-analyzer = {
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
|
|||||||
Reference in New Issue
Block a user