Lua MIT

love2d.nvim

♡ A simple Neovim plugin to build games with LÖVE

S

S1M0N38

Dernière activité 7 juil. 2026
S1M0N38/love2d.nvim

215

étoiles

15

forks

1

issues ouvertes

love2dneovimnvim-plugin

Ce README est souvent en anglais.

♡  LÖVE 2D  ♡

GitHub release LuaRocks release Reddit post LÖVE Cookbook guide


Important

Version 3.0.0 introduces breaking changes. If you prefer the old API, pin your installation to version 2.*. See CHANGELOG.md for the full list.

💡 Idea

I wanted to experiment with LÖVE. After reading this Reddit post, 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 configuration, but it's usually a very niche thing and I can't find many examples about it. Moreover, the ${3rd} libraries will be deprecated 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

📦 Installation

Using vim.pack:

vim.pack.add({
  {
    src = 'https://github.com/S1M0N38/love2d.nvim',
    version = vim.version.range('3'),
  },
})
require('love2d').setup({})
vim.keymap.set('n', '<leader>vr', '<cmd>Love run<cr>',    { desc = 'Run LÖVE' })
vim.keymap.set('n', '<leader>vw', '<cmd>Love watch<cr>',  { desc = 'Watch LÖVE' })
vim.keymap.set('n', '<leader>vi', '<cmd>Love info<cr>',   { desc = 'Info LÖVE' })
vim.keymap.set('n', '<leader>vs', '<cmd>Love stop<cr>',   { desc = 'Stop LÖVE' })
vim.keymap.set('n', '<leader>vo', '<cmd>Love output<cr>', { desc = 'Output panel' })

Using lazy.nvim:

{
  'S1M0N38/love2d.nvim',
  version = '3.*',
  event = 'VeryLazy',
  opts = {},
  keys = {
    { '<leader>v',  '',                     desc = 'LÖVE' },
    { '<leader>vr', '<cmd>Love run<cr>',    desc = 'Run LÖVE' },
    { '<leader>vw', '<cmd>Love watch<cr>',  desc = 'Watch LÖVE' },
    { '<leader>vi', '<cmd>Love info<cr>',   desc = 'Info LÖVE' },
    { '<leader>vs', '<cmd>Love stop<cr>',   desc = 'Stop LÖVE' },
    { '<leader>vo', '<cmd>Love output<cr>', desc = 'Output panel' },
  },
}

🚀 Usage

Read the documentation with :help love2d

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

Projets similaires

LÖVE is an awesome 2D game framework for Lua.

C++game-developmentgamedevlove2d
Llove2d
8,8 k étoiles645

Library of 45+ independent Lua modules improving Neovim experience with minimal effort

Lualuamini-nvimneovim
Nnvim-mini
9,6 k étoiles311

AstroNvim is an aesthetic and feature-rich neovim config that is extensible and easy to use with a great set of plugins

Luaastronvimastrovimhacktoberfest
AAstroNvim
14,4 k étoiles943