Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: resolve links to symbols in markdown descriptions #2656

Merged
merged 8 commits into from
May 25, 2024

Conversation

carsakiller
Copy link
Collaborator

@carsakiller carsakiller commented May 8, 2024

Links like [mySymbol](lua://mySymbol) in a comment will now be resolved to a URI pointing to the actual file where mySymbol can be found.

I would also like to add highlighting and completion while you are writing so that [something](lua:// triggers completion of symbols – but I'm not sure where to even start for that.

This change will result in @see being pretty much useless. I never really used @see much due to formatting issues and it not looking quite right. Perhaps @see should be removed?

Closes #2175

Links like [mySymbol](lua://mySymbol) in a comment will now be resolved to a URI pointing to the actual file where `mySymbol` can be found.
@carsakiller carsakiller added the feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats) label May 8, 2024
@carsakiller
Copy link
Collaborator Author

@sumneko, would you be able to assist me in adding completion to the [mySymbol](lua://) syntax? From what I can gather, changes will need to be made to the parser to parse out the above from comments. I am not sure how this can be done and how it would then interface with the language server in order to allow us to provide suggestions.

@sumneko
Copy link
Collaborator

sumneko commented May 22, 2024

See

local function tryLuaDoc(state, position, results)

script/core/completion/completion.lua Outdated Show resolved Hide resolved
script/core/completion/completion.lua Outdated Show resolved Hide resolved
@carsakiller carsakiller marked this pull request as ready for review May 23, 2024 06:22
@carsakiller carsakiller requested a review from sumneko May 23, 2024 06:22
@carsakiller
Copy link
Collaborator Author

Okay, should be good to go 🙂

@sumneko sumneko merged commit 789f06b into LuaLS:master May 25, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refering to a symbol from luadoc
2 participants