Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

File/folder renames where only capitalization changes causes assumed duplication

Open
#3,478 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
lua
Domain
backend

Research direction

Start by tracing how the language server tracks an open file when its path changes only in capitalization, using the reproduction steps with a.lua renamed to A.lua on Windows. The report does not name a source file or test, so locate the file tracking and duplicate-field diagnostic entry points, then add a regression test for the rename case. Done when the class fields are no longer reported as duplicates after the rename.

Written by the indexing model from the issue text.

Description

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Diagnostics/Syntax Checking

Expected Behaviour

When a file or folder is renamed from, for example, test to Test, the language server should not suddenly mark everything as Duplicate-Defined-Field/etc.

Actual Behaviour
Image

All fields within classes are marked as duplicates.

Reproduction steps
  1. Create a file, a.lua.
  2. Open the file so it's an opened tab in the editor.
  3. Rename it to A.lua.
  4. Write a basic class definition into it.
---@class X
---@field Y string
local x = {}

function x.new() end
  1. Observe the bug.
Additional Notes

Windows treats paths containing different capitalization as the same file, unlike linux. a.lua in Windows is the same as A.lua. I believe there is an assumption somewhere that a.lua does not equal A.lua and it causes the language server to bug out.

Log File

I just want to report this then sleep. If nobody else is able to reproduce/get logs, I will do so tomorrow.

Dominant language
Lua
Stars
4.4k
Forks
449
Avg merge
15d 6h
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LuaLS/lua-language-server

All issues in LuaLS/lua-language-server

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.