ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

=BB= LSL

LSL support for Sublime 3154+ with linting (works with Firestorm preprocessor), tooltips and completions with your indent style of choice.

Details

Installs

  • Total 136
  • Win 107
  • OS X 18
  • Linux 11
Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6
Windows 0 0 0 0 0 0 1 0 0 0 0 1 0 2 5 5 3 8 4 1 1 2 0 1 4 3 2 1 0 1 3 2 1 12 0 1 1 0 4 2 3 3 1 4 3 10
OS X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 5 2 1 0 1 2 1 0 1 1 2 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 2 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 5 0 2

Readme

Source
raw.​githubusercontent.​com

License Requires Sublime Text Build 3154 or later Download the =BB= LSL on Package Control

Table of contents


=BB= LSL package for Sublime

Bringing Linden Scripting Language (LSL) support to Sublime Text.

About

With regards to the development of this package, supporting new features of Sublime Text as they become available takes precedence over ensuring backwards compatibility.

Therefore this package targets and is tested against the latest Build of Sublime Text, releases are frequent and the requirements for this package will be updated accordingly.

Implicitly this might require you to be on the dev release channel and have a valid Sublime Text license, as the dev builds of Sublime Text are only available to paying customers.

Requirements

Installation

Make sure your setup meets the requirements before you:

  • open Sublime Text
  • open the command palette
    • via Tools > Command Palette
  • select Package Control: Install Package
  • select =BB= LSL

To get LSL syntax highlighting in tooltips, refer to the settings section.

Close and re-open Sublime Text.

Usage

To use Sublime Text for editing your script in-world:

  • Enable: Me > Preferences > Advanced > Show Advanced menu
  • Go to: Advanced > Show Debug Settings
  • Edit: ExternalEditor

Setting consists of these three parts:

  • Path to editor (use quotes if path has spaces)
  • Optional command line params
  • "%s" will paste script path automatically (do NOT change this)

For a list of Sublime arguments run subl --help and/or refer to the OSX Command Line documentation.

Example for Windows:

"C:\Program Files\Sublime Text 3\subl.exe" "%s"

When editing scripts in the viewer, click the EDIT button in the script edit window. Save and close view (tab) when done.

Building

runs lslint only, not lslint in combination with mcpp

  • Select Tools > Build on Linux or macOS.
  • Select Tools > Build with … on Windows and select a binary to use.

Output to a Build results panel, in which you can double click (possible) errors to move the cursor to that point in your file.

To debug LSL scripts that make use of the Firestorm preprocessor, please use the linting functionality of this package.

Color Scheme

Sublime Text 3 Color Scheme documentation

Requires Sublime Text Build 3149 or later

You can toggle using the official Color Scheme for LSL files by selecting Preferences > Package Settings > =BB= LSL > Settings > Use official color scheme for LSL files from the main menu.

The color scheme file can be overridden via Packages/User/LSL.hidden-color-scheme.

Contributing

The issue tracker can be found at https://github.com/buildersbrewery/sublime-lsl/issues.

Please read CONTRIBUTING.md and make sure tests pass before sending a pull request.

Linting

Requires the SublimeLinter package, uses the included binaries from lslint and mcpp and some code from XenHat/SublimeLinter-contrib-lslint

Linting also works for LSL files that use the Firestorm preprocessor.

SublimeLinter with lslint

Indent style

Requires Sublime Text Build 3154 or later

LSL Indent Styles

You can change the indent style of all LSL completions and snippets to:

  • Allman
  • GNU
  • Horstmann
  • K & R
  • Lisp
  • Pico
  • Ratliff
  • or Whitesmiths

by:

  • selecting Preferences > Package Settings > =BB= LSL > Settings > Choose indent style from the main menu
  • or selecting Preferences: LSL: Settings - Indent Style in the command palette

Settings

Sublime Text 3 Settings documentation

Packages/User/Preferences.sublime-settings (set via Preferences > Settings from the main menu):

These mdpopups.* settings are needed to get LSL syntax highlighting in tooltips:

{
    "mdpopups.sublime_user_lang_map":
    {
        "lsl":
        [
            [ "lsl" ],
            [ "=BB= LSL/.sublime/syntaxes/LSL" ]
        ]
    },
    "mdpopups.use_sublime_highlighter": true
}

These are optional, but recommended:

{
    "auto_complete_commit_on_tab": true,
    "auto_complete_with_fields": true,
    "caret_extra_bottom": 3,
    "caret_extra_top": 3,
    "caret_extra_width": 3,
    "caret_style": "phase",
    "line_padding_bottom": 3,
    "line_padding_top": 3,
    "rulers":
    [
        80,
        100,
        120
    ],
    "tab_size": 4,
    "translate_tabs_to_spaces": true,
    "use_tab_stops": true,
    "word_wrap": true
}

Tooltips

Require Sublime Text Build 3124 or later

LSL Tooltips

⚠ To get LSL syntax highlighting in tooltips, refer to the settings section.

Disclaimer

Second Life® and the Linden Scripting Language are trademarks of Linden Research, Inc.

The Builder's Brewery is neither affiliated with nor sponsored by Linden Research.