Skip to content

feature: using nvim-cmp completion, typing - and then autocompleting should place a space between - and [ #292

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

Closed
danielyrovas opened this issue Jan 10, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@danielyrovas
Copy link

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

Triggering the autocompletion via - and then accepting an item does not produce the expect result - [x].
It produces -[x] which is not valid syntax for a checkbox in markdown.

Describe the solution you'd like

a space should be inserted if one does not already exist prior to the cursor

Describe alternatives you've considered

Typing space manually every time.

Additional information

No response

@danielyrovas danielyrovas added the enhancement New feature or request label Jan 10, 2025
MeanderingProgrammer added a commit that referenced this issue Jan 10, 2025
## Details

Issue: #292

Updates the logic of completion text to check if the marker node (for
both list items and block quotes) ends in a space. If it does not
then include a space in the completions.

Also adds a call to treesitter parser `parse` method for current row
to remove various edge cases with treesitter not being up to date after
text is inserted depending on when completion plugin runs each
completion source. Should not have a noticeable performance impact since
we limit range to current row.
@MeanderingProgrammer
Copy link
Owner

Updated behavior here: d7b646f

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