LuaLS / LuaLS/lua-language-server
wrong document SymbolKind?
Open
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?
MacOS
What is the issue affecting?
Annotations
Expected Behaviour
correct document symbol kinds as per https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#symbolKind
such as
- function parameter (
function(opts) end)opts:Variable if: no symbol kind
Actual Behaviour
seemingly wrong symbol kinds
such as
opts:Constantif:Package
Reproduction steps
- create
example.luafile
local function config(opts)
if opts then
print('hello world')
end
end
- inspect LSP document symbols (I used
:Telescope lsp_document_symbols) - notice wrong types for
optsandif
Additional Notes
No response
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 in example.lua using :Telescope lsp_document_symbols, then trace the language server's document-symbol generation and its mapping to LSP 3.17 SymbolKind values. Done means opts is reported as Variable and the if statement is omitted rather than reported as Package.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100