jasonjmcghee/livelove
소개
Love2D LSP (VS Code / Neovim / Zed / etc.) extension for live coding and live variable tracking
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originallivelove
Please feel free to file any issues you have. Note this does not have LÖVE 2D definitions, but you can get some there.
A LÖVE 2D VSCode extension in the form of an LSP server, and a few files to add to your project to enable live coding, and live feedback.
Note: I also added a neovim plugin and a zed plugin, if you'd prefer them over vs code. They do not support the live number slider and live color palette features, but do support live coding and live feedback.
"Live coding" here means, when you change the code, you'll see the changes reflected instantly / as you type them. If there are errors, it'll use the last valid code.
"Live feedback" here means, you'll see every value of variables you created, updated live, next to any reference to it (as an inlay hint). Any variable prefixed with _ like _foo will not be tracked. You can disable this entirely with live_vars = false at the top of livelove.lua.
Getting Started
- Install the vs code extension. (You can build it yourself, or download the one I built here.) or install the neovim plugin (
cdinto the folder and runnpm run install) (similar for zed). - Add the
.luafiles other thanmain.luato your project (color.luais optional). - As soon as you open a file like
main.luaafter installing the extension, it will automatically start the LSP. Then, just run the project / main.lua, and you should see inlay hints in the editor. Edit your file and see the changes instantly (glsl shaders work too)!
There are a few additional features included. You can select a hex color string or a number, then click once on it. It'll pop up a slider / color palette (click to modify) you can use to edit the values using a good UX, live.
Neovim Demo
https://github.com/user-attachments/assets/ce749695-4abf-48fd-ba25-3c1076ce9bb7
Example
I've included main.lua to provide an example of how to use it.
But, here's a template:
if not IMAIN then
livelove = require("livelove")
-- Add state that you want to persist across hot reload here (probably most everything)
-- You'll want something like this in every file, but choose a unique variable each time.
IMAIN = true
end
local function hotreload()
-- (optional) whatever you want here (fires any time there's a hot reload)
end
livelove.postswap = function(f)
hotreload()
end
function love.update(dt)
livelove.instantupdate()
-- whatever you want here
end
function love.draw()
-- whatever you want here
livelove.postdraw()
end
관련 프로젝트 살펴보기
불러오는 중…