home: vim: refactor linked directories
This is more DRY.
This commit is contained in:
parent
f1e4a4d914
commit
fdc150bea2
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -46,21 +46,18 @@
|
||||||
extraConfig = builtins.readFile ./init.vim;
|
extraConfig = builtins.readFile ./init.vim;
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile =
|
||||||
"nvim/after" = {
|
let
|
||||||
source = ./after;
|
toSource = directory: { source = ./. + "/${directory}"; };
|
||||||
};
|
configureDirectory =
|
||||||
|
name: lib.nameValuePair "nvim/${name}" (toSource name);
|
||||||
"nvim/autoload" = {
|
linkDirectories =
|
||||||
source = ./autoload;
|
dirs: builtins.listToAttrs (map configureDirectory dirs);
|
||||||
};
|
in
|
||||||
|
linkDirectories [
|
||||||
"nvim/ftdetect" = {
|
"after"
|
||||||
source = ./ftdetect;
|
"autoload"
|
||||||
};
|
"ftdetect"
|
||||||
|
"plugin"
|
||||||
"nvim/plugin" = {
|
];
|
||||||
source = ./plugin;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
" Enable trailing whitespace high-lighting
|
|
||||||
let g:better_whitespace_enabled=1
|
|
||||||
|
|
||||||
" Strip trailing whitespace on file-save
|
|
||||||
let g:strip_whitespace_on_save=1
|
|
Loading…
Reference in a new issue