This summer as part of their GSoC project, Sam Heckle built the L5lua extension for Visual Studio Code and VS Codium (open source non-telemetry alternative) to make it easy to get started using the L5 creative coding library (in Lua). You can install it by opening up the extensions and searching for L5lua.
There are now step by step install guides for Mac, Win, PC, with video tutorials for Windows and Mac. It adds a Run L5 and Stop buttons to the VS Code editor, so you can play your L5 projects easily within the editor.
Hooray and thanks to Sam for building this! Feel free to ask questions, give feedback or file bug reports.
Hey Lee! Great work on bringing the Processing ethos to Lua, was wondering if there’s any plans in exploring any Neovim related tooling for L5 ? In editor help text files would be awesome too.
In-editor help text is already deployed and works in all editors with language servers, including Neovim! Make sure you have a version 0.2.0 of L5.lua or above that was released around the same time the L5lua extension was released. For Neovim you need to have a Lua Language Server running.
Please excuse the ugly theme color I have set up, but here’s an example of what it looks like. My cursor is on the line with the word textSize() and i’ve pressed K which opens up the annotations (provides reference text). There are also ways to turn on autocomplete and such but I don’'t usually personally use that and haven’t tried it yet but should also work.
I’m using Vim-plug to manage my Neovim plugins and am using the nvim-lspconfig for Lua Language Server added. Here’s the relevant part of my init.lua snippet below. I’m happy to try to help get this working for you but maybe we can open up another separate post/thread to discuss Vim/Neovim or language server. And by the way, the Auto-hotreload functionality isn’t yet added to L5.lua itself but my goal is to have that in a future update. Currently it is an optional setting you can turn on in L5lua extension. I’m open to hearing about other useful needs or questions. I’m also lately testing out old Vim classic and have it working on there too, but using a different plugin.
To be honest, I have not written much, L5 as of now (besides a few stray snippets after Sam helped me set it up on my machine) but I would love to see what possibilities are available in making the creating,debugging and perhaps publishing of L5 projects simple using a similar approach to p5.nvim (WIP but smh works for now).
I have never written any game code that I can speak of but I would love to recreate a classic in L5.
Your first is a question if I understand it: how to in Neovim be able to do fuzzy-search of the function API of L5. So for example this is already built-in to the LSP: :lua vim.lsp.buf.workspace_symbol() (and you could assign a shortcut key in your init.lua). Enter that and then it asks you type something into search (or you could prefill an argument in the workspace_symbol), and then it shows all of the matches. This is slightly clunky but again you could assign a keybinding.
If you want an auto-updating search as you type, you could either install telescope.nvim which would allow you to search like this: :Telescope lsp_workspace_symbols (again you could make a keybinding pop this up instead). There are alternative ways to do it with fzf-lua as well.
Your second query is about tooling in Neovim. I just searched on github and found your p5.nvim. Looks cool.
Because of its recent in the past month platforming fash (and focusing on LLM-development to a lesser extent), I’ve extremely recently (in the past month), moved away from Neovim entirely and have switched to Vim classic. Setting up some of my config on this older but maintained Vim is taking some time but i think is worth it, and I’m encouraging other vim users to try it out! I’m open to others developing vim, neovim (and related) plugins and tooling if they like. Would love to see anything you build. If I develop further Vim tooling I will post about it, and happy to see what others make.