Exemplo n.º 1
0
def lsp_client(qtbot):
    config = CONF.get('lsp-server', 'python')
    lsp_editor = LSPEditor()
    lsp = LSPClient(parent=None, server_settings=config, language='python')
    lsp.register_plugin_type(LSPEventTypes.DOCUMENT,
                             lsp_editor.sig_lsp_notification)
    yield lsp, lsp_editor
    if os.name != 'nt':
        lsp.stop()
Exemplo n.º 2
0
def lsp_client(qtbot):
    config = CONF.get('lsp-server', 'python')
    lsp_editor = LSPEditor()
    lsp = LSPClient(None, config['args'], config, config['external'],
                    plugin_configurations=config.get('configurations', {}),
                    language='python')
    lsp.register_plugin_type(
        LSPEventTypes.DOCUMENT, lsp_editor.sig_lsp_notification)
    # qtbot.addWidget(lsp)
    yield lsp, lsp_editor
    if os.name != 'nt':
        lsp.stop()
Exemplo n.º 3
0
def lsp_client_and_editor():
    """Create an LSP client/editor pair."""

    editor = LSPEditor()
    client = LSPClient(parent=None,
                       server_settings=PYTHON_CONFIG,
                       language='python')

    yield client, editor

    # Teardown
    client.stop()
Exemplo n.º 4
0
def lsp_client(qtbot):
    config = CONF.get('lsp-server', 'python')
    lsp_editor = LSPEditor()
    lsp = LSPClient(None,
                    config['args'],
                    config,
                    config['external'],
                    plugin_configurations=config.get('configurations', {}),
                    language='python')
    lsp.register_plugin_type(LSPEventTypes.DOCUMENT,
                             lsp_editor.sig_lsp_notification)
    # qtbot.addWidget(lsp)
    yield lsp, lsp_editor
    if os.name != 'nt':
        lsp.stop()