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

LOVELY2​D

by kevinfiol ST4 New

LOVE2D API support for Sublime Text 4

Details

Installs

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

Note: LÖVELY2D is intended to work with Sublime Text versions 4102 and above. To find out how to download Sublime Text 4, check out this gist.

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)