Split the monolithic init.lua into multiple files for better organization and maintainability.
Created separate modules for configuration (config.lua), commands (commands.lua), autocommands (autocommands.lua), and utilities (utils.lua).
Enhanced Configuration Management:
Centralized configuration settings in config.lua.
Simplified the setup process by initializing configurations and setting up autocommands in the main entry point init.lua.
Updated GitHub Actions Workflow:
Refined the release.yml to include the new workflow steps, ensuring proper setup and testing of the plugin.
Ensured compatibility with the latest GitHub Actions environment variable handling by updating the way paths are set in the workflow.
Detailed Changes
init.lua: Simplified to handle only the setup process by requiring the config and autocommands modules.
autocommands.lua: Responsible for setting up all relevant autocommands and user commands.
commands.lua: Contains all the core functionality and commands for enabling, disabling, and toggling Typewriter mode, as well as centering the cursor and aligning code blocks.
config.lua: Manages default and user configurations.
utils.lua: Includes utility functions like notifications and horizontal scrolling.
Instructions for Reviewers
Please review the following:
Verify the correctness of the new horizontal scrolling feature.
Ensure the modularized code structure is logically organized and maintains the functionality of the plugin.
Check the updated release.yml for any potential issues with the GitHub Actions workflow.
For more details, please refer to the updated README and the new configuration options.
Note: This pull request aims to improve the maintainability and extendibility of the Typewriter.nvim plugin while adding the new horizontal scrolling feature. Your feedback and suggestions are highly appreciated.
This PR closes Issue #3 by adding horizontal scrolling and refactoring the code for better maintainability.
Pull Request Description
This pull request introduces several significant changes to the Typewriter.nvim plugin, including a new feature inspired by and addressing Issue #3.
New Features
enable_horizontal_scroll
to enable or disable horizontal scrolling in Typewriter mode.Code Refactoring and Modularization
Modularized the Plugin Structure:
init.lua
into multiple files for better organization and maintainability.config.lua
), commands (commands.lua
), autocommands (autocommands.lua
), and utilities (utils.lua
).Enhanced Configuration Management:
config.lua
.init.lua
.Updated GitHub Actions Workflow:
release.yml
to include the new workflow steps, ensuring proper setup and testing of the plugin.Detailed Changes
init.lua
: Simplified to handle only the setup process by requiring theconfig
andautocommands
modules.autocommands.lua
: Responsible for setting up all relevant autocommands and user commands.commands.lua
: Contains all the core functionality and commands for enabling, disabling, and toggling Typewriter mode, as well as centering the cursor and aligning code blocks.config.lua
: Manages default and user configurations.utils.lua
: Includes utility functions like notifications and horizontal scrolling.Instructions for Reviewers
Please review the following:
release.yml
for any potential issues with the GitHub Actions workflow.For more details, please refer to the updated README and the new configuration options.
Note: This pull request aims to improve the maintainability and extendibility of the Typewriter.nvim plugin while adding the new horizontal scrolling feature. Your feedback and suggestions are highly appreciated.
This PR closes Issue #3 by adding horizontal scrolling and refactoring the code for better maintainability.