feat(neovim): finish transition to nixvim

This commit is contained in:
oddlama 2023-11-26 00:59:03 +01:00
parent 052fded8e2
commit 2f4c2df735
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
31 changed files with 806 additions and 2131 deletions

View file

@ -0,0 +1,47 @@
{
programs.nixvim = {
files."ftplugin/nix.lua".extraConfigLua = ''
vim.opt_local.expandtab = true
vim.opt_local.tabstop = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.softtabstop = 2
'';
plugins = {
treesitter = {
enable = true;
# TODO (autocmd * zR needed) folding = true;
indent = true;
incrementalSelection = {
enable = true;
keymaps = {
initSelection = "<C-Space>";
nodeIncremental = "<C-Space>";
scopeIncremental = "<C-S-Space>";
nodeDecremental = "<C-B>";
};
};
nixvimInjections = true;
};
# Show the current function / context in topmost line
treesitter-context.enable = true;
# Cargo.toml dependency completion
crates-nvim = {
enable = true;
extraOptions = {
src.cmp.enabled = true;
};
};
# Rust specific LSP tools
rust-tools = {
enable = true;
server.check.command = "clippy";
};
};
};
}