LuaLS / LuaLS/lua-language-server
Neovim: using the builtin formatter erases virtual lines
Nobody has claimed this yet.
- 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?
Formatting
Expected Behaviour
Virtual lines should be preserved. Here is an example (by @whynothugo) with using StyLua as a formatter instead.
Actual Behaviour
Virtual lines get erased. The diagnostics are still there, though. Here is an example of how it looks.
Reproduction steps
- Setup the
nvim-lspconfigandlsp_linesplugins - Make sure you see the virtual lines, then format the code
- Are the virtual lines still there?
Additional Notes
Both examples are demonstrated by using @WhyNotHugo's lsp_lines Neovim plugin. There is a downstream issue.
Log File
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using nvim-lspconfig and the lsp_lines plugin, following the listed formatting steps and comparing virtual lines before and after formatting. Investigate the language server's formatting response and integration behavior; done means formatting preserves virtual lines while diagnostics remain visible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100