Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(ui): allow built-in completions in orgmode.ui.input #903

Merged

Conversation

troiganto
Copy link
Contributor

Summary

Allow ui.input to take not only functions for custom completion, but also strings for buil-in completion.

The org-attach feature uses both the dir built-in completion (to choose a directory to attach) and the buffer built-in completion (to choose a buffer whose contents are to be attached).

Related Issues

Extracted from #878

Changes

  • adjust type signature of orgmode.ui.input.open() to allow string-type completion arguments
  • special-case on type(completion) being a string.

Checklist

I confirm that I have:

  • Followed the Conventional Commits specification (e.g., feat: add new feature, fix: correct bug, docs: update documentation).
  • My PR title also follows the conventional commits specification.
  • Updated relevant documentation, if necessary.
  • Thoroughly tested my changes.
  • Added tests (if applicable) and verified existing tests pass with make test.
  • Checked for breaking changes and documented them, if any.

@troiganto
Copy link
Contributor Author

Last unrelated PR to be extracted from the org-attach feature, I think :slight_smile:

My next step will be to see if I can extract an MVP from the org-attach branch that is easier to review

@kristijanhusak kristijanhusak merged commit af90f8f into nvim-orgmode:master Feb 9, 2025
6 checks passed
@troiganto troiganto deleted the fix/input-builtin-completion branch February 9, 2025 21:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants