Skip to content

feat: add type annotations and prevent diff on dirty buffers #104

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

Conversation

ThomasK33
Copy link
Member

@ThomasK33 ThomasK33 commented Aug 3, 2025

Remove .luarc.json and Improve Type Annotations

This PR removes the .luarc.json file and adds comprehensive LuaLS type annotations throughout the codebase. The changes improve code quality and maintainability by:

  1. Adding proper module documentation with ---@module annotations
  2. Adding detailed type definitions for configuration objects and function parameters
  3. Improving function documentation with consistent ---@param and ---@return annotations
  4. Fixing return type annotations to properly indicate optional values with ? suffix
  5. Updating keyboard shortcut in dev-config from <leader>ab to <leader>as for adding current buffer
  6. Adding dirty buffer detection to prevent diff operations on unsaved files
  7. Removing the Vim meta definitions file in favor of proper inline annotations

The PR also includes a comprehensive test for the new dirty buffer detection functionality to ensure it works correctly in various scenarios.

Copy link
Member Author

ThomasK33 commented Aug 3, 2025

@ThomasK33 ThomasK33 marked this pull request as ready for review August 3, 2025 20:00
@ThomasK33 ThomasK33 force-pushed the thomask33/feat_add_keep_terminal_focus_option_for_diff_views branch from 0e864f3 to fe2d961 Compare August 4, 2025 08:49
@ThomasK33 ThomasK33 force-pushed the thomask33/feat_add_type_annotations_and_prevent_diff_on_dirty_buffers branch from 18443f6 to 810667f Compare August 4, 2025 08:49
Base automatically changed from thomask33/feat_add_keep_terminal_focus_option_for_diff_views to main August 4, 2025 08:56
@ThomasK33 ThomasK33 force-pushed the thomask33/feat_add_type_annotations_and_prevent_diff_on_dirty_buffers branch from 810667f to efaebab Compare August 4, 2025 08:58
Change-Id: I3bdd815d22a9571b35161f26fdf9b4abb8941a1d
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33 ThomasK33 force-pushed the thomask33/feat_add_type_annotations_and_prevent_diff_on_dirty_buffers branch from efaebab to 0216382 Compare August 4, 2025 09:35
@ThomasK33 ThomasK33 merged commit 7b7ce38 into main Aug 4, 2025
4 checks passed
@ThomasK33 ThomasK33 deleted the thomask33/feat_add_type_annotations_and_prevent_diff_on_dirty_buffers branch August 4, 2025 09:39
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.

[BUG] Claude Code crashes with an error if the edited buffer has unsaved changes
1 participant