LuaLS / LuaLS/lua-language-server

From 3.6.5 on, luarc is not being modified properly

Open
#1,859 35 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Info Needed
Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

How are you using the lua-language-server?

NeoVim

Which OS are you using?

Linux

What is the issue affecting?

Libraries

Expected Behaviour

I expect my workspace libraries to be added to .luarc.json.

Actual Behaviour

.luarc.json is not being created nor modified at all. It also prompts for luassert addition to workspace, where I answer 1, yes and modify settings. It does not modifies them.

Reproduction steps
  1. Open a lua file having workspace setting set up.
  2. It will look for all workspace.
  3. It should write in .luarc.json all the content.
Additional Notes

I tried and 3.6.4 was working, 3.6.5 and so on not. Maybe due to https://github.com/sumneko/lua-language-server/blob/4a9ab5b1ae9889e9732b53ad8cdf3b6db5394c3b/changelog.md?plain=1#L33

This is my config on nvim lspconfig:

Lua = {
  runtime = { version = "LuaJIT" },
  diagnostics = { globals = { "vim" } },
  workspace = { library = vim.api.nvim_get_runtime_file("", true) },
},
Log File

No response

Contributor guide

Open the contributing guide

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.

Research direction

Reproduce the regression in Neovim using the shown Lua workspace configuration, comparing version 3.6.4 with 3.6.5 and later. Check the referenced changelog.md entry and observe whether .luarc.json is created or updated after workspace libraries and luassert are accepted. Done means the expected workspace settings are written to .luarc.json.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.