Skip to content

add: resolve links to symbols in markdown descriptions - #2656

Merged
sumneko merged 8 commits into
LuaLS:masterfrom
carsakiller:2175-md-symbol-reference
May 25, 2024
Merged

sumneko merged 8 commits into
LuaLS:masterfrom
carsakiller:2175-md-symbol-reference

Conversation

@carsakiller

@carsakiller carsakiller commented May 8, 2024 •

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

sumneko commented May 22, 2024

Copy link
Copy Markdown
Collaborator

See

local function tryLuaDoc(state, position, results)

@carsakiller
carsakiller force-pushed the 2175-md-symbol-reference branch from 6d18020 to 1f3a500 Compare May 23, 2024 05:50
Comment thread script/core/completion/completion.lua Outdated
Comment thread script/core/completion/completion.lua Outdated
@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
Copy Markdown
Collaborator Author

Okay, should be good to go 🙂

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