Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s1m0n38/love2d.nvim
♡ A simple Neovim plugin to build games with LÖVE
https://github.com/s1m0n38/love2d.nvim
love2d neovim nvim-plugin
Last synced: 1 day ago
JSON representation
♡ A simple Neovim plugin to build games with LÖVE
- Host: GitHub
- URL: https://github.com/s1m0n38/love2d.nvim
- Owner: S1M0N38
- License: mit
- Created: 2024-02-09T12:28:09.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-10T16:53:12.000Z (2 months ago)
- Last Synced: 2024-11-14T21:04:14.963Z (1 day ago)
- Topics: love2d, neovim, nvim-plugin
- Language: Lua
- Homepage:
- Size: 61.5 KB
- Stars: 72
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
♡ LÖVE 2D ♡
______________________________________________________________________
## 💡 Idea
I wanted to experiment with [LÖVE](https://love2d.org/). After reading this [Reddit post](https://www.reddit.com/r/neovim/comments/1727alu/anyone_actively_using_love2d_with_neovim_and), I realized that it's not so easy to get started with LÖVE and Neovim. Perhaps the trickiest part is getting LSP to work with LÖVE. It's just one line in the LSP, but it's usually a very niche thing and I can't find many examples about it; moreover, the `${3rd}` libraries will be [deprecated](https://github.com/LuaLS/lua-language-server/discussions/1950#discussion-4900461) in favor of Addons.
Being able to start and stop the game directly from Neovim (with keybindings) is also quite handy. So I decided to pack these functionalities (LSP LÖVE config and game start/stop) into a dead simple plugin (so simple that it can barely be considered a plugin).
However, I believe that providing this simple codebase to explore can be a good introduction to the inner workings of Neovim plugins. People using LÖVE know Lua, so the language barrier boils down to the Neovim specific API.
## ⚡️ Requirements
- Neovim >= **0.9**
- [LÖVE](https://www.love2d.org/)
- [lua_ls](https://luals.github.io/) configured with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) (optional)## 📦 Installation
```lua
-- using lazy.nvim
{
"S1M0N38/love2d.nvim",
cmd = "LoveRun",
opts = { },
keys = {
{ "v", ft = "lua", desc = "LÖVE" },
{ "vv", "LoveRun", ft = "lua", desc = "Run LÖVE" },
{ "vs", "LoveStop", ft = "lua", desc = "Stop LÖVE" },
},
}
```## 🚀 Usage
Read the documentation with [`:help love2d`](https://github.com/S1M0N38/love2d.nvim/blob/main/doc/love2d.txt)
> Vim/Neovim plugins are usually shipped with :help documentation. Learning how to navigate it is a really valuable skill. If you are not familiar with it, start with `:help` and read the first 20 lines.
## 🙏 Acknowledgments
- [Reddit post](https://www.reddit.com/r/neovim/comments/1727alu/anyone_actively_using_love2d_with_neovim_and) for the idea
- Lua Language Server [LÖVE addon](https://github.com/LuaCATS/love2d)
- My Awesome Plugin [template](https://github.com/S1M0N38/my-awesome-plugin.nvim)