public static Installation InstallTextMate(
     this TextEditor editor,
     IRegistryOptions registryOptions,
     bool initCurrentDocument = true)
 {
     return(new Installation(editor, registryOptions, initCurrentDocument));
 }
            public Installation(TextEditor editor, IRegistryOptions registryOptions, bool initCurrentDocument = true)
            {
                _textMateRegistryOptions = registryOptions;
                _textMateRegistry        = new Registry(registryOptions);

                _editor = editor;

                SetTheme(registryOptions.GetDefaultTheme());

                editor.DocumentChanged += OnEditorOnDocumentChanged;

                if (initCurrentDocument)
                {
                    OnEditorOnDocumentChanged(editor, EventArgs.Empty);
                }
            }