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

Add CsvViewToggle command #6

Merged
merged 3 commits into from
Sep 8, 2024
Merged

Conversation

hat0uma
Copy link
Owner

@hat0uma hat0uma commented Sep 8, 2024

This PR introduces a new feature and refactoring changes to enhance the csvview plugin:

New Feature: CsvViewToggle Command

  • Added a new CsvViewToggle command that allows users to toggle the CSV view on and off with a single command.
  • Updated the Lua API to include:
    • require('csvview').toggle(): Toggle CSV view.
    • require('csvview').is_enabled(): Check if CSV view is enabled.

- Moved buffer event logic to `buffer_event.lua`.
- Simplified event registration and unregistration in `init.lua`.
- Improved buffer enable/disable checks and event detachment.
- Cleaned up view handling and removed redundant notifications.
- Add `toggle` function to enable or disable the CSV table view.
- Add new user command `CsvViewToggle` to toggle the view state.
@hat0uma hat0uma linked an issue Sep 8, 2024 that may be closed by this pull request
@hat0uma hat0uma merged commit ba1d620 into main Sep 8, 2024
1 check passed
@hat0uma hat0uma deleted the 5-feature-request-toggle-table branch January 8, 2025 16:41
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.

Feature request: Toggle table
1 participant