clean up nixvim config

This commit is contained in:
lucy 2026-07-03 23:38:47 +02:00
commit 47401eb97f
5 changed files with 91 additions and 67 deletions

59
nixvim/nixvim.nix Normal file
View file

@ -0,0 +1,59 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [
./plugins.nix
./keymaps.nix
];
programs.nixvim = {
enable = true;
extraConfigLuaPost = ''
local map = vim.keymap.set
for i = 1, 10 do
map('n', '<A-' .. i .. '>', '<cmd> LualineBuffersJump! ' .. i .. '<cr>')
end
'';
opts = {
relativenumber = true;
tabstop = 8;
shiftwidth = 8;
expandtab = true;
swapfile = false;
};
extraPackages = with pkgs; [
nixfmt
];
lsp = {
inlayHints.enable = true;
servers = {
clangd.enable = true;
qmlls.enable = true;
lua-language-server.enable = true;
rust_analyzer.enable = true;
nixd = {
enable = true;
config = {
formatting = {
command = "nixfmt";
};
};
};
};
};
globals = {
mapleader = " ";
};
diagnostic = {
settings = {
virtual_text = {
spacing = 4;
source = true;
};
};
};
};
}