Skip to content

fix(emmylua_ls): move settings under emmylua section#4447

Merged
justinmk merged 1 commit into
neovim:masterfrom
marcuscaisey:emmylua-settings
Jun 3, 2026
Merged

fix(emmylua_ls): move settings under emmylua section#4447
justinmk merged 1 commit into
neovim:masterfrom
marcuscaisey:emmylua-settings

Conversation

@marcuscaisey

Copy link
Copy Markdown
Contributor

Problem

EmmyLua requests configuration from the "emmylua" section, but the current configuration doesn't expose the settings under that section.

Example request and response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "workspace/configuration",
  "params": {
    "items": [
      {
        "scopeUri": "file:///Users/marcus/.dotfiles",
        "section": "emmylua"
      }
    ]
  }
}
{
  "result": [
    null
  ],
  "id": 1,
  "jsonrpc": "2.0"
}

Solution

Move the settings under the "emmylua" section.

After these changes:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "workspace/configuration",
  "params": {
    "items": [
      {
        "scopeUri": "file:///Users/marcus/.dotfiles",
        "section": "emmylua"
      }
    ]
  }
}
{
  "result": [
    {
      "hint": {
        "enable": true
      },
      "codeLens": {
        "enable": true
      }
    }
  ],
  "id": 1,
  "jsonrpc": "2.0"
}

Problem:
EmmyLua requests configuration from the "emmylua" section, but the
current configuration doesn't expose the settings under that section.

Example request and response:
```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "workspace/configuration",
  "params": {
    "items": [
      {
        "scopeUri": "file:///Users/marcus/.dotfiles",
        "section": "emmylua"
      }
    ]
  }
}
```
```json
{
  "result": [
    null
  ],
  "id": 1,
  "jsonrpc": "2.0"
}
```

Solution:
Move the settings under the "emmylua" section.

After these changes:
```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "workspace/configuration",
  "params": {
    "items": [
      {
        "scopeUri": "file:///Users/marcus/.dotfiles",
        "section": "emmylua"
      }
    ]
  }
}
```
```json
{
  "result": [
    {
      "hint": {
        "enable": true
      },
      "codeLens": {
        "enable": true
      }
    }
  ],
  "id": 1,
  "jsonrpc": "2.0"
}
```
@justinmk

justinmk commented Jun 3, 2026

Copy link
Copy Markdown
Member

oh, this was missed in #4426 😅

thanks!

@justinmk justinmk merged commit be7b24e into neovim:master Jun 3, 2026
5 checks passed
@sharpchen

sharpchen commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Looks like this breaks lazydev.nvim as it uses Lua = .... See https://github.com/folke/lazydev.nvim/blob/ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d/lua/lazydev/workspace.lua#L189-L200

This is a slightly breaking for users used to have Lua = ... in their setting.

Is it new design of emmylua? I am using 0.22.0, maybe we should use Lua = ... if it's still compatible with emmylua.

EDIT: ah I saw there's already a pr for this: folke/lazydev.nvim#141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants