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 52
  • Win 36
  • Mac 7
  • Linux 9
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 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12
Windows 0 1 0 0 1 1 1 2 1 3 0 0 1 2 2 1 1 2 1 0 1 1 0 0 0 3 2 1 2 3 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0
Mac 0 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0

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.

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. You can use it in conjunction with LÖVELY2D for an even better LÖVE2D development experience.

  1. Follow the instructions to install and enable the Lua language server here.
  2. In LSP.sublime-settings, modify the selector and settings property so that LÖVELY2D Syntax files are correctly parsed and diagnostics doesn't nag you about the love global. Example:
{
    "clients": {
        "lua-ls": {
            "enabled": true,
            "command": [
                "C:\\Users\\johndoe\\lua-lsp\\sumneko.lua-1.19.1\\server\\bin\\Windows\\lua-language-server.exe",
                "-E", "C:\\Users\\johndoe\\lua-lsp\\sumneko.lua-1.19.1\\server\\main.lua"
            ],
            "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)