eric6.QScintilla.Lexers.__init__
Package implementing lexers for the various supported programming languages.
Global Attributes
Classes
Functions
__getPygmentsLexer
__getPygmentsLexer(parent, name="")
Private module function to instantiate a pygments lexer.
- parent
-
reference to the parent widget
- name=
-
name of the pygments lexer to use (string)
- Returns:
-
reference to the lexer (LexerPygments) or None
getDefaultLexerAssociations
getDefaultLexerAssociations()
Module function to get a dictionary with the default associations.
- Returns:
-
dictionary with the default lexer associations
getLanguageIcon
getLanguageIcon(language, pixmap)
Module function to get an icon for a language.
- language
-
language of the lexer (string)
- pixmap
-
flag indicating to return a pixmap (boolean)
- Returns:
-
icon for the language (QPixmap or QIcon)
getLexer
getLexer(language, parent=None, pyname="")
Module function to instantiate a lexer object for a given language.
- language
-
language of the lexer (string)
- parent
-
reference to the parent object (QObject)
- pyname=
-
name of the pygments lexer to use (string)
- Returns:
-
reference to the instanciated lexer object (QsciLexer)
getOpenFileFiltersList
getOpenFileFiltersList(includeAll=False, asString=False, withAdditional=True)
Module function to get the file filter list for an open file operation.
- includeAll
-
flag indicating the inclusion of the
All Files filter (boolean)
- asString
-
flag indicating the list should be returned
as a string (boolean)
- withAdditional=
-
flag indicating to include additional filters
defined by the user (boolean)
- Returns:
-
file filter list (list of strings or string)
getSaveFileFiltersList
getSaveFileFiltersList(includeAll=False, asString=False, withAdditional=True)
Module function to get the file filter list for a save file operation.
- includeAll
-
flag indicating the inclusion of the
All Files filter (boolean)
- asString
-
flag indicating the list should be returned
as a string (boolean)
- withAdditional=
-
flag indicating to include additional filters
defined by the user (boolean)
- Returns:
-
file filter list (list of strings or string)
getSupportedApiLanguages
getSupportedApiLanguages()
Module function to get a list of supported API languages.
- Returns:
-
list of supported API languages
- Return Type:
-
list of str
getSupportedLanguages
getSupportedLanguages()
Module function to get a dictionary of supported lexer languages.
- Returns:
-
dictionary of supported lexer languages. The keys are the
internal language names. The items are lists of three entries.
The first is the display string for the language, the second
is a dummy file name, which can be used to derive the lexer, and
the third is the name of an icon file.
(string, string, string)
registerLexer
registerLexer(name, displayString, filenameSample, getLexerFunc, openFilters=None, saveFilters=None, defaultAssocs=None, iconFileName="")
Module function to register a custom QScintilla lexer.
- name
-
lexer language name (string)
- displayString
-
display string (string)
- filenameSample
-
dummy filename to derive lexer name (string)
- getLexerFunc
-
reference to a function instantiating the specific
lexer. This function must take a reference to the parent as its only
argument.
- openFilters=
-
list of open file filters (list of strings)
- saveFilters=
-
list of save file filters (list of strings)
- defaultAssocs=
-
default lexer associations (list of strings of
filename wildcard patterns to be associated with the lexer)
- iconFileName=
-
name of an icon file (string)
- Raises KeyError:
-
raised when the given name is already in use
unregisterLexer
unregisterLexer(name)
Module function to unregister a custom QScintilla lexer.
- name
-
lexer language name (string)