joshuadanpeterson / typewriter.nvim

A Neovim plugin that emulates a typewriter, keeping the cursor centered on the screen for a focused writing experience.
MIT License
23 stars 0 forks source link

Add Horizontal Scrolling and Modularize Typewriter.nvim #4

Closed joshuadanpeterson closed 2 months ago

joshuadanpeterson commented 2 months ago

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

  1. Horizontal Scrolling:
    • Added a new configuration option enable_horizontal_scroll to enable or disable horizontal scrolling in Typewriter mode.
    • Implemented the function to center the cursor horizontally within the window when the feature is enabled.
    • This feature is in direct response to Issue #3.

Code Refactoring and Modularization

  1. Modularized the Plugin Structure:

    • 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).
  2. 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.
  3. 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

Instructions for Reviewers

Please review the following:

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.