# Use Neovim and Sublime Text 4 to edit Defold scripts

**URL:** <https://forum.defold.com/t/use-neovim-and-sublime-text-4-to-edit-defold-scripts/82819>\
**Category:** Showcases\
**Created:** [May 20, 2026, 8:01am UTC](https://forum.defold.com/t/use-neovim-and-sublime-text-4-to-edit-defold-scripts/82819 "2026-05-20T08:01:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JuLongZhiLu](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/julongzhilu/32/42720_2.png) [@JuLongZhiLu](https://forum.defold.com/u/JuLongZhiLu)\
**Post date:** [May 20, 2026, 8:01am UTC](https://forum.defold.com/t/use-neovim-and-sublime-text-4-to-edit-defold-scripts/82819/1 "2026-05-20T08:01:59Z")

</div>

# Neovim

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/8/4/84c2167f816ddecf9dd8f637dcbbe6827c2ccb85.png)

My Neovim ` init.lua` on Windows

```lua
vim.pack.add({
    "https://github.com/mfussenegger/nvim-dap",
    "https://github.com/L3MON4D3/LuaSnip",
    "https://github.com/neovim/nvim-lspconfig",
    "https://github.com/williamboman/mason.nvim",
})

vim.pack.add({ 'https://github.com/saghen/blink.lib', 'https://github.com/saghen/blink.cmp' })
local cmp = require('blink.cmp')
cmp.build():wait(60000)
cmp.setup()

require("mason").setup()

vim.lsp.config('lua_ls', {
    settings = {
        Lua = {
            runtime = {
                version = "Lua 5.1",
            },

            workspace = {
                library = {
                    vim.fn.expand("E:\\defold-nvim-api\\defold_api"),
                    vim.fn.expand("E:\\Defold_Projects\\defold-sublime-test\\.internal\\lua-annotations"),
                },
                checkThirdParty = false,
            },

            diagnostics = {
                globals = {
                    "go",
                    "msg",
                    "gui",
                    "vmath",
                    "hash",
                    "pprint",
                    "sprite",
                    "factory"
                },
            },
        },
    },
})

vim.lsp.enable('lua_ls')

vim.filetype.add({
    extension = {
        script = "lua",
        gui_script = "lua",
        render_script = "lua",
    },
})

vim.g.mapleader = " "

vim.pack.add({
    "https://github.com/nvim-neo-tree/neo-tree.nvim",
    "https://github.com/nvim-lua/plenary.nvim",
    "https://github.com/nvim-tree/nvim-web-devicons",
    "https://github.com/MunifTanjim/nui.nvim",
})

require("neo-tree").setup({})

vim.keymap.set("n", "<leader>e", ":Neotree toggle<CR>")

```

Use Meson to install lua-language-server

You have to install rust for using blink plugin

`E:\\defold-nvim-api\\defold_api` I download it from

> **[Releases · astrochili/defold-annotations](https://github.com/astrochili/defold-annotations/releases)**
>
> Defold annotations generator for Lua Language Server - astrochili/defold-annotations

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/c/9/c9b9c6ba0f7eb5ea4eb2413804fd93a0f3df6637.png)

`E:\\Defold_Projects\\defold-sublime-test\\.internal\\lua-annotations` you can find it from your defold project

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/5/1/518b37366532c3d76595977eb5af26e638525f22.png)

* * *

# Sublime Text 4

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/3/1/3167a284beffe06dfc6d6e2d90141b99195e454b.png)

[https://github.com/selimanac/defold-sublime-text](https://github.com/selimanac/defold-sublime-text)

Note: you can add your defold project’s `.internal\lua-annotations ` path to the LSP-Lua setting so that LSP-Lua can know these extensions’ APIs.

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/b/a/ba5c38054133649dda19cc5fbc3363c39fb8e44f.png)

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/e/4/e49ff483159b13e0f072d8c02f7a39ef1c9a4197.png)

Or if you don’t want to change the lua-language-server’s global settings , you can create a `.luarc.json`on your project

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/b/1/b1e13c4fb0631341c3e060fe715578eb50e46317.png)

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/7/b/7b7d8b0b27cdd2c8ef3e4a071ebcca6c899a7d70.png)

```lua
{
        "Lua.workspace.library":
        [
            "C:\\Users\\cw\\AppData\\Roaming\\Sublime Text\\Packages\\Defold\\annotations\\defold_api",
            "E:\\Your Project Path\\.internal\\lua-annotations"
        ]    
}

```

* * *

By the way, the VSCode is also a great choice. But it is too beautiful, powerful and heavy that I can’t focus on coding and my computer will become slow.

* * *

I highly recommend use Sublime Text 4 to edit Defold scripts because it is more comfortable than neovim on windows and is more concise than VS Code.

* * *

But finally, I decided only use Defold Editor because I don’t want to waste time in comparing which external editor is better. I want to focus on gamedev itself.

---

<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:** [May 20, 2026, 11:29am UTC](https://forum.defold.com/t/use-neovim-and-sublime-text-4-to-edit-defold-scripts/82819/2 "2026-05-20T11:29:39Z")

</div>

It’s great that you are showcasing this, but please also share links to the plugins/packages to make this possible so that other’s can try!

---

<div class="post-metadata">

**Author:** ![JuLongZhiLu](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/julongzhilu/32/42720_2.png) [@JuLongZhiLu](https://forum.defold.com/u/JuLongZhiLu)\
**Post date:** [May 20, 2026, 12:02pm UTC](https://forum.defold.com/t/use-neovim-and-sublime-text-4-to-edit-defold-scripts/82819/3 "2026-05-20T12:02:06Z")

</div>

Absolutely, I just added tutorial so others can easily try it out too.
