{ lib, pkgs, config, ... }@inputs: with lib; let cfg = config.mae.nvim; in { imports = [ ./go.nix ./rust.nix ./web_dev.nix ./other_langs.nix ]; options.mae.nvim = { enable = mkEnableOption "enable neovim"; }; config = { 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 ]; extraConfig = '' set background=dark set termguicolors set ic set number set autoindent set completeopt=menuone,noinsert,noselect set shortmess+=c ''; coc.pluginConfig = '' nmap (coc-rename) inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" " Remap and for scroll float windows/popups. if has('nvim-0.4.0') || has('patch-8.2.0750') nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" endif ''; }; }; }