{
  config,
  lib,
  pkgs,
  ...
}:

{
  programs.neovim = {
    enable = true;
    viAlias = true;
    vimAlias = true;
    plugins = with pkgs.vimPlugins; [
      vim-nix
      airline
      {
        plugin = onehalf;
        config = ''
          colorscheme onehalfdark
          let g:airline_theme='onehalflight'
        '';
      }
      {
        plugin = vim-autoformat;
        config = ''
          au BufWrite * :Autoformat
          let g:autoformat_autoindent = 0
          let g:autoformat_retab = 0
          let g:autoformat_remove_trailing_spaces = 0
        '';
      }
      vim-surround
      vim-commentary
      {
        plugin = nvim-treesitter.withAllGrammars;
      }
      nvim-nu
      null-ls-nvim
      vim-fugitive
    ];
    extraLuaConfig = ''
      vim.o.termguicolors = true
      require'nu'.setup{}
      require'nvim-treesitter.configs'.setup {
        highlight = {
          enable = true,
        },
      }
    '';
    extraConfig = ''
      " Show relative line numbers
      set number
      set rnu
      " 2 spaces for tabs
      set tabstop=4
      set shiftwidth=4
      " Keep 4 lines off the edge of the screen when scrolling
      set scrolloff=4
      " Djot setup
      au BufNewFile,BufRead *.dj set filetype=djot
    '';
    withPython3 = true;
  };
}