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

How to create TOC #2

Closed
AlexRainHao opened this issue Apr 15, 2023 · 2 comments
Closed

How to create TOC #2

AlexRainHao opened this issue Apr 15, 2023 · 2 comments
Labels
question Further information is requested

Comments

@AlexRainHao
Copy link

I noticed artempyanykh/marksman#17 brought the feature of creating table of content, or TOC.
But I have no idea how to use coc-marksman to create it.

@yaegassy
Copy link
Owner

Upon investigation, it seems that this CodeAction can be displayed by mapping <Plug>(coc-codeaction-source) and executing it in coc.nvim. Please refer to the README of coc.nvim for an example of setting up the mapping.

If you want to execute it directly from the ex command without mapping, it appears to be as follows.

:call CocActionAsync('codeAction', '', ['source'], v:true)

Action:

coc-marksman-2-1

Done:

coc-marksman-2-2

@yaegassy yaegassy added the question Further information is requested label Apr 15, 2023
@AlexRainHao
Copy link
Author

AlexRainHao commented Apr 15, 2023

Great! I tried it and succeeded, thanks for your working and reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants