def __init__(self, *args, **kwargs):
super().__init__(*args,
default_width=640,
default_height=480,
**kwargs)
self.switcher = NeovimBufferBar()
self.set_titlebar(Gtk.HeaderBar(show_close_button=True,
custom_title=self.switcher))
vbox = Gtk.Box(parent=self, orientation=Gtk.Orientation.VERTICAL)
self.notebook = NeovimTabBar(parent=vbox)
self.viewport = NeovimViewport(parent=Gtk.ScrolledWindow(parent=vbox))
self.terminal = NeovimTerminal(parent=self.viewport, expand=True)
self.terminal.connect('child-exited', lambda *_:
self.close())
self.terminal.connect('nvim-attached', lambda _, nvim:
self.emit('nvim-setup', nvim))
评论列表
文章目录