Skip to content

Conversation

@deepfuriya
Copy link
Contributor

Description of changes:

  • Enabled document based indentation which will overwrite EditorSettings if customer has auto-indentation settings enabled in IDE.
  • Created an IndentationManager which will handle all the indentation across the server.
  • Removed all subscriptions from providers and recentered the logic for handling the indentation updates in SettingsManager which helps to update the indentation on server side whenever settings are updated.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@deepfuriya deepfuriya requested a review from a team as a code owner October 4, 2025 04:02
@deepfuriya deepfuriya requested a review from Copilot October 4, 2025 04:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Implements document-based indentation detection to override EditorSettings when auto-indentation is enabled in the IDE. The PR introduces an IndentationManager to centralize indentation handling and removes completion provider subscriptions, moving the indentation update logic to SettingsManager.

  • Created IndentationDetectionManager for document-specific indentation detection
  • Updated completion providers to use document-specific settings via SettingsManager
  • Added new detectIndentation setting to EditorSettings with default value true

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/settings/IndentationDetectionManager.ts New module for detecting and caching document-specific indentation settings
src/settings/SettingsManager.ts Enhanced to handle document-specific editor settings with indentation detection
src/settings/Settings.ts Added detectIndentation boolean field to EditorSettings
src/autocomplete/TopLevelSectionCompletionProvider.ts Removed settings subscription, now uses SettingsManager for document-specific indentation
src/autocomplete/ResourceStateCompletionProvider.ts Updated to use document-specific settings from SettingsManager
src/autocomplete/ResourceEntityCompletionProvider.ts Modified to get document-specific settings for snippet generation
src/autocomplete/CompletionRouter.ts Updated to pass SettingsManager to providers and formatter
src/autocomplete/CompletionFormatter.ts Removed settings subscription, now receives settings per formatting operation
src/server/ServerComponents.ts Reordered initialization and removed direct completion provider references
Test files Updated to include new detectIndentation setting and mock configurations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@deepfuriya deepfuriya force-pushed the fix/indentation-spacing-issue branch 2 times, most recently from c603d64 to bfe446a Compare October 6, 2025 20:39
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

Package Line Rate Branch Rate Complexity Health
ai 22% 80% 0
ai.llm 53% 80% 0
app 0% 0% 0
artifacts 100% 100% 0
auth 87% 92% 0
autocomplete 93% 91% 0
context 96% 95% 0
context.semantic 98% 97% 0
context.semantic.parameter 100% 95% 0
context.syntaxtree 89% 90% 0
context.syntaxtree.utils 86% 91% 0
datastore 77% 97% 0
definition 100% 100% 0
document 91% 91% 0
documentSymbol 93% 81% 0
handlers 75% 88% 0
hover 85% 86% 0
protocol 96% 100% 0
resourceState 76% 80% 0
schema 88% 87% 0
schema.transformers 87% 85% 0
server 97% 95% 0
services 67% 89% 0
services.cfnLint 72% 91% 0
services.guard 95% 79% 0
services.guard.assets 81% 77% 0
settings 97% 87% 0
stacks 100% 100% 0
telemetry 58% 78% 0
templates 89% 85% 0
utils 91% 92% 0
Summary 86% (17101 / 19818) 89% (3530 / 3967) 0

@deepfuriya deepfuriya force-pushed the fix/indentation-spacing-issue branch from bfe446a to 62b3125 Compare October 7, 2025 19:48
@deepfuriya deepfuriya force-pushed the fix/indentation-spacing-issue branch from 98a9b6d to c7a5a21 Compare October 9, 2025 15:28
@deepfuriya deepfuriya merged commit 596e40c into main Oct 9, 2025
8 checks passed
@deepfuriya deepfuriya deleted the fix/indentation-spacing-issue branch October 9, 2025 15:58
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.

4 participants