Closed Milly closed 2 months ago
The changes involve significant updates to the option handling system, enhancing type definitions and refining the scope of various options. New types such as BufferLocalOption
, WindowLocalOption
, and others have been introduced, while existing options have been updated to reflect their specific contexts. Improvements in error handling, option processing, and the overall structure of the code have also been implemented to ensure better management and clarity.
Files | Change Summary |
---|---|
.scripts/gen-option/format.ts |
Updated formatOption to use a new Context type, refactored option type determination logic. |
.scripts/gen-option/parse.ts |
Enhanced error handling in parse , modified parseBlock to always return an Option object. |
.scripts/gen-option/types.ts |
Introduced new types and constants for option handling, replaced function declarations with constants. |
option/_generated.ts |
Updated various option types for specificity, changing from LocalOption to more specific types. |
option/_utils.ts |
Expanded OptionImpl class to implement multiple option interfaces, enhancing flexibility. |
option/nvim/_generated.ts |
Changed option types to reflect buffer and window specificity, improving clarity. |
option/types.ts |
Added new interfaces for local options and refined existing type definitions for better control. |
option/vim/_generated.ts |
Updated option declarations to improve specificity and control over option scopes. |
Objective | Addressed | Explanation |
---|---|---|
Users may access options in an unintended way (#267) | ❌ | The issue regarding getBuffer() method remains unaddressed. |
🐇 Hop, hop, hooray for changes bright,
New options sprout, taking flight!
Buffer and window, all in their place,
Clarity shines, a joyful embrace!
With types so neat, we dance and play,
In the land of code, it's a splendid day! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Blocked by #269.
error: TS2339 [ERROR]: Property 'getBuffer' does not exist on type 'WindowLocalOption<string>'.
op.foldmethod.getBuffer(denops, bufnr),
~~~~~~~~~
at file:///deno-denops-std/buffer/buffer.ts:526:21
@coderabbitai review
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.60%. Comparing base (
afa88b7
) to head (75e7696
). Report is 3 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Fixes #267 Fixes some #268
getTabPage()
orsetTabPage()
is not implemented. See https://github.com/vim-denops/deno-denops-std/issues/268#issuecomment-2316587922Summary by CodeRabbit
New Features
Context
type for better management of option types and constructors.Bug Fixes
Documentation
Refactor