class_docstr: Lexer that calls a pygments lexer.
  
  Example::
  
      from pygments.lexers import HtmlLexer
      lexer = PygmentsLexer(HtmlLexer)
  
  Note: Don't forget to also load a Pygments compatible style. E.g.::
  
      from prompt_toolkit.styles.from_pygments import style_from_pygments
      from pygments.styles import get_style_by_name
      style = style_from_pygments(get_style_by_name('monokai'))
  
  :param pygments_lexer_cls: A `Lexer` from Pygments.
  :param sync_from_start: Start lexing at the start of the document. This
      will always give the best results, but it will be slow for bigger
      documents. (When the last part of the document is display, then the
      whole document will be lexed by Pygments on every key stroke.) It is
      recommended to disable this for inputs that are expected to be more
      than 1,000 lines.
  :param syntax_sync: `SyntaxSync` object.
code: def __init__(
      self, pygments_lexer_cls, sync_from_start=True, syntax_sync=None
  ):
      assert syntax_sync is None or isinstance(syntax_sync, SyntaxSync)
  
      self.pygments_lexer_cls = pygments_lexer_cls
      self.sync_from_start = to_cli_filter(sync_from_start)
  
      # Instantiate the Pygments lexer.
      self.pygments_lexer = pygments_lexer_cls(
          stripnl=False, stripall=False, ensurenl=False
      )
  
      # Create syntax sync instance.
      self.syntax_sync = (
          syntax_sync
          or RegexSync.from_pygments_lexer_cls(pygments_lexer_cls)
      )
  
imports: from __future__ import unicode_literals
  from abc import ABCMeta, abstractmethod
  from six import with_metaclass
  from six.moves import range
  from prompt_toolkit.token import Token
  from prompt_toolkit.filters import to_cli_filter
  from .utils import split_lines
  import re
  import six
label_desc: Use image node_id 1 to create a new PygmentsLexer object from inherited base classes: Lexer with example: obj = PygmentsLexer(pygments_lexer_cls, sync_from_start, syntax_sync)