How to use the @jupyterlab/codemirror.EditorSyntaxStatus function in @jupyterlab/codemirror

To help you get started, we’ve selected a few @jupyterlab/codemirror examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab / packages / codemirror-extension / src / index.ts View on Github external
activate: (
    app: JupyterFrontEnd,
    statusBar: IStatusBar,
    tracker: IEditorTracker,
    labShell: ILabShell
  ) => {
    let item = new EditorSyntaxStatus({ commands: app.commands });
    labShell.currentChanged.connect(() => {
      const current = labShell.currentWidget;
      if (current && tracker.has(current)) {
        item.model.editor = (current as IDocumentWidget<
          FileEditor
        >).content.editor;
      }
    });
    statusBar.registerStatusItem(
      '@jupyterlab/codemirror-extension:editor-syntax-status',
      {
        item,
        align: 'left',
        rank: 0,
        isActive: () =>
          labShell.currentWidget &&
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / codemirror-extension / src / index.ts View on Github external
activate: (
    app: JupyterFrontEnd,
    statusBar: IStatusBar,
    tracker: IEditorTracker,
    labShell: ILabShell
  ) => {
    let item = new EditorSyntaxStatus({ commands: app.commands });
    labShell.currentChanged.connect(() => {
      const current = labShell.currentWidget;
      if (current && tracker.has(current)) {
        item.model.editor = (current as IDocumentWidget<
          FileEditor
        >).content.editor;
      }
    });
    statusBar.registerStatusItem(
      '@jupyterlab/codemirror-extension:editor-syntax-status',
      {
        item,
        align: 'left',
        rank: 0,
        isActive: () =>
          labShell.currentWidget &&