install initial nixvim
This commit is contained in:
2026-04-08 10:13:11 +02:00
parent 6f64253c4b
commit d7b58e2216
64 changed files with 592 additions and 286 deletions

View File

@@ -0,0 +1,52 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPackages = with pkgs; [ rust-analyzer ];
plugins = {
rustaceanvim = {
enable = true;
lazyload.settings.filetype = "rs";
};
};
files = {
"ftplugin/rust.lua" = {
keymaps = [
{
action.__raw = ''
function()
vim.cmd.RustAnalyzer('codeAction')
end
'';
key = "<leader>a";
mode = [
"n"
];
options = {
desc = "Code action";
silent = true;
buffer.__raw = "vim.api.nvim_get_current_buf()";
};
}
{
action.__raw = ''
function()
vim.cmd.RustAnalyzer({'hover', 'actions'})
end
'';
key = "K";
mode = [
"n"
];
options = {
silent = true;
buffer.__raw = "vim.api.nvim_get_current_buf()";
};
}
];
};
};
};
}