This repository has been archived on 2023-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dotfiles/modules/editors/neovim/default.nix

78 lines
1.7 KiB
Nix

{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.editors.neovim;
in {
options.modules.editors.neovim = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
(neovim.override {
configure = {
packages.myPlugins = with pkgs.vimPlugins; {
start = [
(nvim-treesitter.withPlugins (
plugins: with plugins; [
bash
c
cmake
cpp
css
dockerfile
elm
glsl
graphql
haskell
http
html
java
javascript
jsdoc
json
json5
latex
lua
markdown
ninja
nix
org
perl
php
pug
python
regex
rst
ruby
rust
scala
scss
toml
tsx
typescript
vim
yaml
zig
]
))
];
};
};
})
];
home.configFile = {
"nvim/init.lua" = { source = ./init.lua; };
"nvim/lua" = { source = ./lua; recursive = true; };
};
env.EDITOR = "nvim";
environment.shellAliases = {
vim = "nvim";
v = "nvim";
};
};
}