Skip to content

Indentation configuration from modes #135

@mkh-user

Description

@mkh-user

Eligibility

  • I confirm that I am a developer, contributor, or maintainer

Is there an existing issue or proposal for this?

  • I have searched the existing issues/proposals

Feature summary

Allow modes to control indent settings, including type (space/tab) and size (usually 2 or 4).

Motivation

Currently, we should change indention type and size each time we need changes manually, but some modes (like YAML) needs space based indentation and some modes (like Python) work better with tabs.

Proposed design

  • Add two parameters for modes in TextForgeMode class to define indentation type and size.
  • Add ability to restore custom indentation settings based on mode.
  • Add ability to reset indentation settings to mode-provided settings.
  • Add ability to lock indentation settings.

Acceptance criteria

  • Modes can change indentation settings at initialization.
  • Users can lock indentation settings to keep them at mode changing (Legacy mode).
  • EditorAPI can restore custom settings for each mode.
  • Users can reset indentation settings for each mode to defined settings in mode.

Related issues / discussions

No response

Implementation notes (Optional)

No response

Localization & Accessibility

No response

Community feedback (Optional)

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Completed

Relationships

None yet

Development

No branches or pull requests

Issue actions