devos/users/modules/neovim/default.nix
2023-04-30 18:26:56 +02:00

56 lines
1 KiB
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
./dart.nix
./hexeditor.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 mouse=
set number
set autoindent
set shortmess+=c
set completeopt=menuone,noinsert,noselect
'';
};
};
}