Skip to content

Fix name-style provider not using URI when loading config#3415

Open
D4isDAVID wants to merge 1 commit into
LuaLS:masterfrom
D4isDAVID:fix/namestyle-config
Open

Fix name-style provider not using URI when loading config#3415
D4isDAVID wants to merge 1 commit into
LuaLS:masterfrom
D4isDAVID:fix/namestyle-config

Conversation

@D4isDAVID
Copy link
Copy Markdown

Currently, the initial config.get call for Lua.nameStyle.config does not use the provided URI. This results in the initial name style config to be {}, ignoring any settings overrides.

This PR provides a simple fix that uses the URI for the initial config.get call.
Tested in Zed with a .luarc.json file.

Fixes #2643.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates script/provider/name-style.lua to pass the file's uri instead of nil when retrieving the Lua.nameStyle.config configuration. The reviewer pointed out that using a single global boolean flag m.loaded prevents proper configuration loading in multi-folder workspaces, as only the first folder's configuration is loaded. They suggested tracking the last loaded configuration value instead of a boolean flag to support multi-folder workspaces.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread script/provider/name-style.lua
@D4isDAVID D4isDAVID force-pushed the fix/namestyle-config branch from 854cfbd to ad4fdf9 Compare June 4, 2026 17:36
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.

.luarc.json file doesn't apply the nameStyle.config

1 participant