nixos-config/config/programs/vim/configuration.nix

42 lines
761 B
Nix
Raw Normal View History

2022-08-10 08:20:23 +00:00
{
pkgs,
lib,
...
}:
with lib;
2022-08-10 08:20:23 +00:00
with builtins; let
getNixFiles = dir: let
recu = n: k:
if k == "directory"
then getNixFiles "${dir}/${n}"
else if hasSuffix "nix" n
then ["${dir}/${n}"]
else [];
in
flatten (mapAttrsToList recu (readDir dir));
in {
imports = getNixFiles ./modules;
treesitter.enable = true;
vim.opt = {
wrap = true;
lbr = true;
timeoutlen = 400;
};
output.path.style = "impure";
output.makeWrapper = "--set LUA_PATH '${./modules/lua}/?.lua;;'";
2022-08-10 08:20:23 +00:00
output.path.path = with pkgs; [wl-clipboard];
output.extraConfig = ''
" Keybindings
:lua require'keybindings'
" TODO: Set clipboard tool with g:clipboard
'';
}
# TODO:
# https://idie.ru/posts/vim-modern-cpp
2022-08-10 08:20:23 +00:00