Global Settings

SublimeLinter supports the following global settings:

debug

If true, SublimeLinter prints information to the Sublime Text 3 console that may help in debugging problems with a linter. For example, the command passed to a linter and the output from the linter are logged to the console in debug mode. All of SublimeLinter’s log messages are prefixed by “SublimeLinter: ”. The default value is false.

Rather than change this setting manually, you are better off using the user interface to set the debug mode.

delay

When the lint mode is "background", this setting determines how long SublimeLinter will wait until acting on a lint request. The default value is 0.25 (seconds). For a discussion of this setting, see Usage.

error_color

This setting determines the color used to mark errors in the text. It should be a six-digit hex RGB color (like those used in CSS), with or without a leading “#”. If this setting is changed, SublimeLinter will offer to update all user color schemes with the new error color. The default value is "D02000".

Warnings are marked with warning_color.

gutter_theme

This setting should be the full Packages-relative path to the .gutter-theme file for the current gutter theme. Rather than changing this setting manually, you are better off using the user interface to choose a gutter theme. The default value is Packages/SublimeLinter/gutter-themes/Default.gutter-theme.

gutter_theme_excludes

If you wish to exclude one or more gutter themes from the list of available gutter themes, you can add one or more patterns to the array in this setting. The patterns are matched against the gutter theme name using python’s fnmatch method. The default value is an empty array.

For example, if you wanted to exclude the “Blueberry” gutter themes that come with SublimeLinter, you would use this setting:

{
    "gutter_theme_excludes": [
        "Blueberry*"
    ]
}

lint_mode

This setting determines the current lint mode. Possible values are "background", "load/save", "save only", and "manual". The default value is "background".

Rather than change this setting manually, you are better off using the user interface to choose a lint mode.

mark_style

This setting determines the current mark style. Possible values are "fill", "outline", "solid underline", "squiggly underline", "stippled underline", and "none". The default value is "outline".

Rather than change this setting manually, you are better off using the user interface to choose a mark style.

no_column_highlights_line

This setting determines what happens when a linter reports an error with no column information. By default, a mark is put in the gutter but no text is highlighted. If this setting is true, in addition to the gutter mark, the entire line is highlighted.

Rather than change this setting manually, you are better off using the user interface to set the no-column highlight mode.

paths

This setting provides extra paths to be searched when locating system executables.

Note

Instead of using this setting, consider setting up your PATH correctly in your shell.

This setting works like the PATH environment variable; you provide directories that will be searched for executables (e.g. "/opt/bin"), not paths to specific executables.

You may provide separate paths for each platform on which Sublime Text 3 runs. The default value is empty path lists.

{
    "paths": {
        "linux": [],
        "osx": [],
        "windows": []
    }
}

python_paths

When SublimeLinter starts up, it reads sys.path from the system python 3 (if it is available), and adds those paths to the SublimeLinter sys.path. So you should never need to do anything special to access a python module within a linter. However, if for some reason sys.path needs to be augmented, you may do so with this setting. Like the "paths" setting, you may provide separate paths for each platform on which Sublime Text 3 runs. The default value is empty path lists.

rc_search_limit

This setting determines how many directories will be searched when looking for a .sublimelinterrc settings file. The default value is 3. See .sublimelinterrc settings for more information.

shell_timeout

This setting determines the number of seconds that SublimeLinter will wait when executing a shell command, for example when getting the value of PATH. The default value is 10. If the SublimeLinter debug log says that shell commands are timing out, you may need to increase the value of this setting.

show_errors_on_save

This setting determines if a Quick Panel with all errors is displayed when a file is saved. The default value is false.

Rather than change this setting manually, you are better off using the user interface to change this setting.

show_marks_in_minimap

This setting determines whether error marks are shown in the minimap. The default value is true.

syntax_map

This setting allows you to map one syntax name to another. Because linters are tied to a syntax name, this is useful when there are variations on a syntax that should use the same linter.

Note

Syntax names are what appear in the View > Syntax menu and in the lower right of the status bar, not the file extension.

The syntax names in the map should be lowercase. The default value is:

{
    "python django": "python",
    "html 5": "html",
    "html (django)": "html",
    "html (rails)": "html",
    "php": "html"
}

This means that any file that has the named syntax which is one of the keys will be linted by any linter than supports the named syntax corresponding to that key. For example, any file with the “python django” syntax will be linted by any linter that supports the “python” syntax.

Let’s say you install some fancy new syntax package for python named “Totally Awesome Python”. To ensure SublimeLinter will lint files that use that syntax, you would modify the "syntax_map" setting as follows:

{
    "totally awesome python": "python",
    "python django": "python",
    "html 5": "html",
    "html (django)": "html",
    "html (rails)": "html",
    "php": "html"
}

warning_color

This setting determines the color used to mark warnings in the text. It should be a six-digit hex RGB color (like those used in CSS), with or without a leading “#”. If this setting is changed, SublimeLinter will offer to update all user color schemes with the new warning color. The default value is "DDB700".

Errors are marked with error_color.

wrap_find

This setting determines if the Next Error and Previous Error commands wrap around when reaching the end or beginning of the file. See Navigating Errors for more information on those commands. The default value is true.