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

Create pairs for * and ** in markdown files #478

Open
gotmax23 opened this issue Oct 8, 2024 · 3 comments
Open

Create pairs for * and ** in markdown files #478

gotmax23 opened this issue Oct 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@gotmax23
Copy link

gotmax23 commented Oct 8, 2024

Is your feature request related to a problem? Please describe.

I would like for the plugin to autopair * and ** in markdown files.

Describe the solution you'd like

A built-in configuration for * and ** pairs in Markdown

Describe alternatives you've considered

A local configuration, but I'm not that familiar with the Rules API

@gotmax23 gotmax23 added the enhancement New feature or request label Oct 8, 2024
Copy link

stale bot commented Dec 8, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Dec 8, 2024
@gotmax23
Copy link
Author

I think this is still viable

@stale stale bot removed the wontfix This will not be worked on label Dec 12, 2024
@myypo
Copy link

myypo commented Dec 14, 2024

		local np = require("nvim-autopairs")

		local Rule = require("nvim-autopairs.rule")
		local cond = require("nvim-autopairs.conds")

		np.add_rules({
			Rule("*", "*", { "markdown" }):with_pair(cond.not_before_regex("\n")),
			Rule("_", "_", { "markdown" }):with_pair(cond.before_regex("%s")),
		})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants