devos/users/modules/neovim/default.nix
2022-09-25 22:56:54 +02:00

53 lines
991 B
Nix

{ lib, pkgs, config, ... }@inputs:
with lib;
let
cfg = config.mae.nvim;
in
{
imports = [
./nvim-lsp.nix
./js.nix
./go.nix
./rust.nix
./nix.nix
./python.nix
./clangd.nix
./elixir.nix
];
options.mae.nvim = {
enable = mkEnableOption "enable neovim";
};
config = {
home.sessionVariables.EDITOR = "${pkgs.neovim}/bin/nvim";
programs.neovim = mkIf cfg.enable {
enable = true;
vimdiffAlias = true;
plugins = with pkgs.vimPlugins; [
neoformat
undotree
fzf-vim
{
plugin = iceberg-vim;
config = "colorscheme iceberg";
}
vim-sleuth
];
extraPackages = with pkgs; [
nodePackages.prettier
];
extraConfig = ''
set background=dark
set termguicolors
set ic
set number
set autoindent
set shortmess+=c
set completeopt=menuone,noinsert,noselect
'';
};
};
}