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

refactor(utils): replace utils.open() with vim.open() #891

Merged

Conversation

troiganto
Copy link
Contributor

Summary

This PR removes the function utils.open() and replaces it with vim.ui.open().

As far as I can tell, this helper was only used in export.lua. Hyperlinks used vim.ui.open() from the start.

The utils function does basically the same as the built-in, except:

  1. doesn't return an awaitable object
  2. doesn't search for executables as thoroughly.

Related Issues

Extracted from #878

Changes

  • replaced utils.open() in export.lua with vim.ui.open()
  • removed the function itself

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.

Copy link
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this util was for Neovim < 0.10 or some older version that didn't have vim.ui.open. It can be removed now since it's 0.10+.

Thanks for these cleanup PRs!

@kristijanhusak kristijanhusak merged commit d7b4b60 into nvim-orgmode:master Feb 5, 2025
6 checks passed
@troiganto troiganto deleted the refactor/remove-utils-open branch February 5, 2025 21:39
# 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