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

tests: support testing with Neovim #84

Merged
merged 3 commits into from
Apr 30, 2024
Merged

tests: support testing with Neovim #84

merged 3 commits into from
Apr 30, 2024

Conversation

laniakea64
Copy link
Collaborator

@laniakea64 laniakea64 commented Apr 6, 2024

This adds TEST_VIM env var setting, which can be set to point to the Vim or Neovim executable to test with. If the specified executable's file_stem contains "nvim", the test runner will treat it as Neovim. Otherwise, the test runner will treat it as Vim. If this env var is not set, run vim same as before.

To avoid Neovim creating .local/state/nvim in the repo, not sure whether is better to use a tempdir for $XDG_STATE_HOME, as this patch does now, or to instead set NVIM_LOG_FILE to something like /dev/null?

Not seeing any measurable performance regression in testing with Vim.

Closes #80

Edit: Also added fix for #86 per #86 (comment)

Fixes handling of non-highlighted (cleared) trailing whitespace.  Also restores compatibility with the upcoming Neovim 0.10.
@laniakea64 laniakea64 linked an issue Apr 10, 2024 that may be closed by this pull request
@laniakea64
Copy link
Collaborator Author

@NoahTheDuke Sorry, forgot to mention that the reason for requesting your review before merge was not just the question about .local/state/nvim, it's for the Rust code changes in general as that was a slight stretch of my current Rust knowledge level.

@laniakea64
Copy link
Collaborator Author

Hi @NoahTheDuke might you be able to review these Rust code changes soon? Would be good to get this merged before just adds new syntaxes, there's some backlog in just PRs and past experience suggests things could move quickly at the moment casey finds time to get back to just. Thanks

tests/src/common.rs Outdated Show resolved Hide resolved
Copy link
Owner

@NoahTheDuke NoahTheDuke left a comment

Choose a reason for hiding this comment

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

left two comments, otherwise it's good to go.

Copy link
Owner

@NoahTheDuke NoahTheDuke left a comment

Choose a reason for hiding this comment

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

:shipit:

@laniakea64 laniakea64 merged commit cd9bc6f into main Apr 30, 2024
1 check passed
@laniakea64 laniakea64 deleted the test-nvim branch April 30, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

:TOhtml will be subject to breaking changes Allow running tests with Neovim?
2 participants