# Defold.nvim - Batteries-included development environment for the Defold game engine, powered by Neovim

**URL:** <https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605>\
**Category:** The Defoldmine\
**Created:** [September 21, 2025, 9:53am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605 "2025-09-21T09:53:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![atomicptr](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/atomicptr/32/40349_2.png) [@atomicptr](https://forum.defold.com/u/atomicptr)\
**Post date:** [September 21, 2025, 9:53am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/1 "2025-09-21T09:53:59Z")

</div>

Or “How to turn Neovim into a Defold IDE” 🙂

I’ve been wanting to use Neovim with Defold and I couldn’t get other solutions I’ve found to run so I made my own which my brother and I have been using for a while now and I thought its perhaps a good time to share the project.

## Features

- **Code Hot-Reloading** : Make code tweaks and see them live in Defold, no waiting.
- **Defold Control from Neovim** : Run Defold commands right from Neovim with custom shortcuts.
- **LSP Integration** : Get Defold API hints and autocomplete in Neovim’s built-in LSP.
- **Dependency Annotations** : Auto-load LSP annotations for your Defold dependencies.
- **Debugger** : Step through your code and dig into issues with ease.
- **Snippets** : Insert pre-made code snippets to save time.

Supports Linux, macOS and Windows although I’m only using Linux so mac and Windows might still be a bit rough. I’ve done some testing in VMs but would appreciate some feedback

> **[GitHub - atomicptr/defold.nvim: Batteries-included development environment for the...](https://github.com/atomicptr/defold.nvim)**
>
> Batteries-included development environment for the Defold game engine, powered by Neovim

Just follow the install and setup instructions in the README and you should be good to go (if not write me a message and I try to get it fixed).

The most annoying part here was getting the debugger to run, the Defold editor is using [MobDebug](https://github.com/pkulchenko/MobDebug) internally so I thought it would be a good idea if we’d use that too which turned out to take a bit of effort. Neovim similar to VSCode uses the Debug Adapter Protocol these days (nvim-dap) so the fastest way was to implement a sort of bridge between MobDebug and Neovim using a custom DAP implementation which you can find here [GitHub - atomicptr/mobdap: Debug adapter implementation for Lua / ModDebug · GitHub](https://github.com/atomicptr/mobdap) which perhaps can be of use for other editor projects god knows :).

![](https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExdjlqMHJ3NWNyY2l2MXB6emYzcWtmaG5oM24yamxobzV4cHZtNHJhciZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/SGRIFmSmzXyBThYM9k/giphy.gif)

I wrote a comprehensive guide on how to setup Defold.nvim for Neovim 0.12 & vim.pack: [From Scratch: Turning Neovim into a Defold IDE | dev://atomicptr](https://atomicptr.dev/blog/turning-neovim-into-a-defold-ide-from-scratch/)

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [September 22, 2025, 7:35am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/2 "2025-09-22T07:35:37Z")

</div>

> [@atomicptr](#):
>
> Debug Adapter Protocol these days (nvim-dap) so the fastest way was to implement a sort of bridge between MobDebug and Neovim using a custom DAP implementation which you can find here [GitHub - atomicptr/mobdap: Debug adapter implementation for Lua / ModDebug](https://github.com/atomicptr/mobdap) which perhaps can be of use for other editor projects god knows :).

Cool! We would like to make Defold compatible with DAP as it’s used in a lot of other IDEs.

---

<div class="post-metadata">

**Author:** ![nv.huan21](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/nv.huan21/32/42995_2.png) [@nv.huan21](https://forum.defold.com/u/nv.huan21)\
**Post date:** [March 28, 2026, 5:17pm UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/3 "2026-03-28T17:17:30Z")

</div>

hi, I’m a newbie in both defold and neovim and I find your plugin is really awesome, I try to install your plugin with lazyvim but it come with error:

> no field package.preload[‘defold\_nvim\_sidecar’]  
> cache\_loader: module ‘defold\_nvim\_sidecar’ not found  
> cache\_loader\_lib: module ‘defold\_nvim\_sidecar’ not found

can you help me with this issue, thank you very much!

---

<div class="post-metadata">

**Author:** ![atomicptr](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/atomicptr/32/40349_2.png) [@atomicptr](https://forum.defold.com/u/atomicptr)\
**Post date:** [March 28, 2026, 5:30pm UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/4 "2026-03-28T17:30:55Z")

</div>

Can you show me your plugin configuration (of defold.nvim)?

It sounds like you might not have included the build section (which is required to download the sidecar)

```lua
-- Example from https://github.com/atomicptr/defold.nvim
{
    "atomicptr/defold.nvim",
    version = '*',
    lazy = false,

    dependencies = {
        -- (Optional) Required when using the debugger
        "mfussenegger/nvim-dap",

        -- (Optional) Required when using snippets
        "L3MON4D3/LuaSnip",
    },

    -- This makes sure the native library downloads at installation
    build = function()
        require("defold").download()
    end,

    opts = {
        -- config options, see below
    },
}

```

---

<div class="post-metadata">

**Author:** ![nv.huan21](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/nv.huan21/32/42995_2.png) [@nv.huan21](https://forum.defold.com/u/nv.huan21)\
**Post date:** [March 29, 2026, 1:22am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/5 "2026-03-29T01:22:29Z")

</div>

yes, this is my config of plugin, I copy it from your github and modified a bit in opts to config terminal

```lua
{
“atomicptr/defold.nvim”,
version = “*”,
lazy = false,

dependencies = {
  -- (Optional) Required when using the debugger
  "mfussenegger/nvim-dap",

  -- (Optional) Required when using snippets
  "L3MON4D3/LuaSnip",
},

-- This makes sure the native library downloads at installation
build = function()
  require("defold").download()
end,

opts = {
  -- config options, see below
  launcher = {
    type = "terminal",
    executable = "ghostty",
  },
},
},

```

---

<div class="post-metadata">

**Author:** ![atomicptr](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/atomicptr/32/40349_2.png) [@atomicptr](https://forum.defold.com/u/atomicptr)\
**Post date:** [March 29, 2026, 8:39am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/6 "2026-03-29T08:39:23Z")

</div>

Ok that looks correct,

Can you try executing (neovim command prompt) `:lua require("defold").download()` manually? And then `:messages` in hopes that this throws an error 🙂

If that doesn’t give us anything, there is a log file available, use `:= require("defold.service.os").cache_dir()` that should give you the cache directory we’re using which contains a “logs” directory, could you send me the plugin.log file? On my setup its at `$HOME/.cache/defold.nvim/logs/plugin.log`

---

<div class="post-metadata">

**Author:** ![nv.huan21](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/nv.huan21/32/42995_2.png) [@nv.huan21](https://forum.defold.com/u/nv.huan21)\
**Post date:** [March 29, 2026, 10:57am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/7 "2026-03-29T10:57:40Z")

</div>

I checked the log and see a bunch of this messages  
`[ERROR] 2026-03-29 17:56:24: unsupported platform: macos using unknown`

I’m using MacOS Sonoma 14.5

---

<div class="post-metadata">

**Author:** ![atomicptr](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/atomicptr/32/40349_2.png) [@atomicptr](https://forum.defold.com/u/atomicptr)\
**Post date:** [March 29, 2026, 11:16am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/8 "2026-03-29T11:16:42Z")

</div>

Interesting, I’ve never tested this on ARM macs (only have an old Intel mac)

Can you show me what `:= vim.loop.os_uname()` returns? Presumably I have a check wrong if it shows “unknown” there

---

<div class="post-metadata">

**Author:** ![atomicptr](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/atomicptr/32/40349_2.png) [@atomicptr](https://forum.defold.com/u/atomicptr)\
**Post date:** [March 29, 2026, 11:56am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/9 "2026-03-29T11:56:07Z")

</div>

I might’ve found the issue, there was a problem with detecting the architecture that should now be resolved in 0.3.2, can you update and confirm if it works now?

( `:Lazy` and then `U`), restart and using `:= require("defold.sidecar").version` should now return `"0.3.2"`

---

<div class="post-metadata">

**Author:** ![nv.huan21](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/nv.huan21/32/42995_2.png) [@nv.huan21](https://forum.defold.com/u/nv.huan21)\
**Post date:** [March 29, 2026, 3:06pm UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/10 "2026-03-29T15:06:58Z")

</div>

You’re awesome 👏 , after upgrade to 0.3.2 issue have fixed and now I can completely use my neovim as an IDE for defold, thank you so much about your plugin and your help 🙏

---

<div class="post-metadata">

**Author:** ![GuiltyRed](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/g/3be4f8/32.png) [@GuiltyRed](https://forum.defold.com/u/GuiltyRed)\
**Post date:** [May 12, 2026, 11:12pm UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/11 "2026-05-12T23:12:00Z")

</div>

Hi, this project looks great! Am very impressed the extent you have gone to integrate Neovim and Defold.  
However I am running into issues on MacOS and Neovim 0.12 using vim.pack

I mostly followed your guide here [From Scratch: Turning Neovim into a Defold IDE | dev://atomicptr](https://atomicptr.dev/blog/turning-neovim-into-a-defold-ide-from-scratch/)

```lua
:checkhealth defold is showing all green

```

Main issue I am having is that debugging from Neovim will start the game, but it will not stop at breakpoints. I have tested that it does stop at the breakpoint with the Defold Editor debugger.

EDIT: I was able to figure the debugger issue out with the help of Gemini, I had the breakpoint in an init function so it executed before the debugger could handshake 🫠

The other issue I am having, not sure it is related but the Defold Editor will not launch Neovim. Nothing happens at all, no errors etc. I tried to run the “run.sh” file manually and that does work. Tried with neovide and Ghostty.

Any ideas would be great. Again, really appreciate the work you’ve done on this project so far.

---

<div class="post-metadata">

**Author:** ![BlackFlyPress](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/blackflypress/32/30368_2.png) [@BlackFlyPress](https://forum.defold.com/u/BlackFlyPress)\
**Post date:** [May 13, 2026, 12:16am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/12 "2026-05-13T00:16:06Z")

</div>

Oh man! thats super cool! Good job! I used to use Helix more than Neovim, and boy do I miss navigating via the keyboard.

---

<div class="post-metadata">

**Author:** ![atomicptr](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/atomicptr/32/40349_2.png) [@atomicptr](https://forum.defold.com/u/atomicptr)\
**Post date:** [May 13, 2026, 7:42am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/13 "2026-05-13T07:42:12Z")

</div>

Hey, after trying to launch via the editor, can you share the logs created at the cache dir? (Its ~/.cache/defold.nvim/logs/bridge.log for me)

Showing some sort of error when the pass off from the Defold editor goes wrong is an open issue: [Show error popup when something went wrong · Issue #54 · atomicptr/defold.nvim · GitHub](https://github.com/atomicptr/defold.nvim/issues/54)

Can you also try opening Neovim directly in the project directory and then clicking a file in the Defold editor? That should open a new buffer there

---

<div class="post-metadata">

**Author:** ![GuiltyRed](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/g/3be4f8/32.png) [@GuiltyRed](https://forum.defold.com/u/GuiltyRed)\
**Post date:** [May 13, 2026, 7:32pm UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/14 "2026-05-13T19:32:23Z")

</div>

I didn’t have a logs folder in ~/.cache/defold.nvim/ only a ~/.cache/ **nvim** /defold.nvim/logs which only has one file “plugin.log” no “bridge.log”

Opening nevoide directly and clicking a file again does nothing unfortunately. Running the run.sh file from the terminal does open the file in the existing Neovide instance though.

EDIT: Think I figured it out, I modified the bash script to echo the error to a file and got “Error: cannot find binary path”  
I tried to also echo $PATH and got “/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin” which is missing the home-brew paths.. so I think that is why it is not finding neovide installed via home-brew

---

<div class="post-metadata">

**Author:** ![atomicptr](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/atomicptr/32/40349_2.png) [@atomicptr](https://forum.defold.com/u/atomicptr)\
**Post date:** [May 13, 2026, 9:18pm UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/15 "2026-05-13T21:18:43Z")

</div>

Hm, I wonder if this would work if we run the script with zsh instead

I made an issue for this [Run script on Mac doesn't properly include PATH · Issue #59 · atomicptr/defold.nvim · GitHub](https://github.com/atomicptr/defold.nvim/issues/59)

---

<div class="post-metadata">

**Author:** ![GuiltyRed](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/g/3be4f8/32.png) [@GuiltyRed](https://forum.defold.com/u/GuiltyRed)\
**Post date:** [May 15, 2026, 3:31am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/16 "2026-05-15T03:31:18Z")

</div>

I’ll reply in the issue you created

---

<div class="post-metadata">

**Author:** ![gamedevshrimp](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/gamedevshrimp/32/44402_2.png) [@gamedevshrimp](https://forum.defold.com/u/gamedevshrimp)\
**Post date:** [August 6, 2026, 10:35am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/17 "2026-08-06T10:35:37Z")

</div>

Hello! When I try to fetch the library, I get an error

 ![Screenshot 2026-08-06 at 13.28.21](https://forum-defold-uploads.b-cdn.net/original/3X/5/6/566f3ea2930853cc4394c384d96640964d7fef8d.png)

I use Defold 1.13.0 on a Mac with an Apple Silicon processor. Other libraries fetch well. Could you help to investigate the problem?

---

<div class="post-metadata">

**Author:** ![atomicptr](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/atomicptr/32/40349_2.png) [@atomicptr](https://forum.defold.com/u/atomicptr)\
**Post date:** [August 6, 2026, 11:14am UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/18 "2026-08-06T11:14:17Z")

</div>

defold.nvim is not a Defold package but a Neovim package so instead of adding it to Defold you need to add it to Neovim

See: [GitHub - atomicptr/defold.nvim: Batteries-included development environment for the Defold game engine, powered by Neovim · GitHub](https://github.com/atomicptr/defold.nvim#install)

I also wrote an article on the installation process here: [From Scratch: Turning Neovim into a Defold IDE | dev://atomicptr](https://atomicptr.dev/blog/turning-neovim-into-a-defold-ide-from-scratch/)

---

<div class="post-metadata">

**Author:** ![gamedevshrimp](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/gamedevshrimp/32/44402_2.png) [@gamedevshrimp](https://forum.defold.com/u/gamedevshrimp)\
**Post date:** [August 6, 2026, 3:55pm UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/19 "2026-08-06T15:55:02Z")

</div>

Thank you! Now it is working well. Regarding your article — I don’t know if it is your idea or a CSS mistake. But on your site, all text is almost invisible (black text on a dark background.) So the only way to read it, is to select it.  
 ![dark_site](https://forum-defold-uploads.b-cdn.net/original/3X/e/e/ee353592038542b03ba2db85867bff300b10ee8d.gif)

---

<div class="post-metadata">

**Author:** ![atomicptr](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/atomicptr/32/40349_2.png) [@atomicptr](https://forum.defold.com/u/atomicptr)\
**Post date:** [August 6, 2026, 5:16pm UTC](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605/20 "2026-08-06T17:16:53Z")

</div>

Oh! I’ve never tested this on a browser which has preferred theme set to light mode before apparently whoops, thanks for the note should be fixed now 😅

[Next page](https://forum.defold.com/t/defold-nvim-batteries-included-development-environment-for-the-defold-game-engine-powered-by-neovim/81605.md?page=2)
