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

LOVELY2​D

by kevinfiol ST4

LOVE2D API support for Sublime Text 4

Details

Installs

  • Total 1K
  • Win 788
  • Mac 128
  • Linux 275
Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12
Windows 0 0 1 0 1 0 0 0 1 2 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 0 2 3 3 1 0 3 1 2 0 1 0 0 2 0 0 0 2 0 2
Mac 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0
Linux 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 2 1 0 0 0 1 0 1 1 1 1 1 0 0 0 1 0 0 0 0 2 0 2 1 0 0 0 0 2

Readme

Source
raw.​githubusercontent.​com

LÖVELY2D

video demo

A (WIP) Sublime Text 4 plugin for LÖVE2D development that provides autocomplete and API information.

Based on LÖVE-API.

Status: LSP-lua now ships with LÖVE2D support. Unless you want to avoid LSP, I recommend that over LÖVELY2D.

Installation

Package Control

LÖVELY2D is available on Package Control.

Manually

  1. Navigate to your Packages folder (easiest way to find it is from within Sublime Text, go to Preferences > Browse Packages...).
  2. Download the latest release from the releases page.
  3. Unzip the downloaded archive. Copy the directory LOVELY2D-x.x.x into your Packages folder.

With Git

Use git clone to clone this repository into your Packages folder.

# From within your `Packages` folder
git clone https://github.com/kevinfiol/LOVELY2D.git

Usage

From within a .lua file, set the syntax to LOVELY2D. Autocomplete and hover tips should function normally.

Tip: I recommend setting "auto_complete_preserve_order": "none" in your Sublime preferences for more predictable auto-complete behavior.

Usage with Sublime LSP

Sublime LSP is an implementation of the Language Server Protocol for Sublime Text.

Note: the LSP-lua package now ships with LÖVE2D support out of the box that is more intelligent than LOVELY2D thanks to the Language Server Protocol. You may or may not want to use LOVELY2D in conjunction with Sublime LSP for this reason. Nevertheless, see below if you'd like to continue:

  1. Install Sublime LSP.
  2. Install LSP-lua
  3. Open the Command Palette, and go to LSP-lua Settings. Modify the selector and Lua.diagnostics.globals property so that LÖVELY2D Syntax files are correctly parsed and diagnostics doesn't nag you about the love global. Example:
{
    "selector": "source.lovely | source.lua",
    "settings": { "Lua.diagnostics.globals": ["love"] }
}

Known Issues / To-Do

  • (Bug) Invoking the API popup on anything under the love. namespace closes the autocomplete. This is unintended, and I'm not sure why it happens (help appreciated!)
  • Function override signatures not provided in hints
  • Hover tips are sometimes overridden by Reference tips
  • General clean-up / commenting
  • Implement function signature helper while typing in parameters (Added in 0.6.0)