public NeovimClientControl(IControl parent, string neovimPath)
            : base(parent)
        {
            this.neovimRenderer = new NeovimRenderer(parent.Factory, parent.Device, true);

            this.neovimClient               = new NeovimClient.NeovimClient(@"C:\Users\lishengq\Downloads\nvim-win64\Neovim\bin\nvim.exe");
            this.neovimClient.Redraw       += this.OnNeovimRedraw;
            this.neovimClient.NeovimExited += this.NeovimExited;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NeovimControl"/> class.
        /// </summary>
        /// <param name="parent">The parent control.</param>
        /// <param name="neovimClient">the neovim client.</param>
        public NeovimControl(IElement parent, NeovimClient.NeovimClient neovimClient)
            : base(parent)
        {
            this.neovimClient              = neovimClient;
            this.neovimClient.Redraw      += this.Invalidate;
            this.neovimClient.FontChanged += this.OnFontChanged;

            this.textAnalyzer        = new DWrite.TextAnalyzer(this.factoryDWrite);
            this.cursorEffects       = new CursorEffects(this.DeviceContext);
            this.brushCache          = new BrushCache();
            this.scriptAnalysesCache = new ScriptAnalysesCache();
            this.fontCache           = new FontCache(this.factoryDWrite);

            this.textParam = new TextLayoutParameters(
                this.factoryDWrite,
                "Consolas",
                11,
                false,
                false,
                false,
                false,
                this.Factory.DesktopDpi);
        }