Neovim Lua config via home-manager

Well, it turns out it wasn’t an installation problem, but rather a syntax error.

For some reason, the above syntax worked when I used nvim on Fedora and backed up the init.lua directly. However, on NixOS, I had to change it to look like this:

require("mason-lspconfig").setup({
    ensure_installed = {
        "lua_ls", 
        "clangd",
        "marksman",
        "nil_ls",
        "jedi_language_server",
        "svelte",
        "taplo",
        "yamlls",
        "bashls",
    },
})

The only difference with the above being that the {} block is passed as a parameter to setup(), which has me wonder how it could work in the original config, since it shouldn’t be valid syntax. Most likely, the bump in the nvim version is the cause of the problem.

1 Like