{ lib, pkgs, config, ... }: let cfg = config.mae.nvim.dart; in with lib; { options.mae.nvim.dart.enable = lib.mkEnableOption "Enable dart support in neovim"; config = mkIf cfg.enable { mae.nvim.lsp.servers.dartls = { enable = true; script = '' { cmd = { "${pkgs.latest.dart}/bin/dart", "language-server" }, } ''; }; programs.neovim.plugins = with pkgs.vimPlugins; [ dart-vim-plugin ]; }; }