fix: add Bicep and Bicepparam file extension mappings#15634
Open
hobostay wants to merge 2 commits intoanomalyco:devfrom
Open
fix: add Bicep and Bicepparam file extension mappings#15634hobostay wants to merge 2 commits intoanomalyco:devfrom
hobostay wants to merge 2 commits intoanomalyco:devfrom
Conversation
Adds `.bicep` and `.bicepparam` file extensions to the LANGUAGE_EXTENSIONS mapping in lsp/language.ts. This allows custom configured Bicep LSP to work correctly, instead of falling back to plaintext. Fixes anomalyco#15569
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found:
Why they're related: Both PRs address the same issue (#15569) by adding Bicep file extension mappings to the language configuration. PR #15570 appears to be an existing attempt to fix the exact same problem that PR #15634 is addressing. |
The official Bicep LSP source code defines the language ID for .bicepparam files as "bicep-params", not "bicepparam". Reference: https://github.com/Azure/bicep/blob/main/src/Bicep.Core/LanguageConstants.cs - public const string ParamsLanguageId = "bicep-params"; Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #15569
Type of change
What does this PR do?
Fixes missing Bicep diagnostics in custom LSP setups by sending the correct language IDs for Bicep files.
The official Bicep LSP server defines specific language IDs in its source code (
LanguageConstants.cs):.bicepfiles use language ID:bicep.bicepparamfiles use language ID:bicep-paramsWithout these mappings, custom configured Bicep LSP falls back to plaintext, causing diagnostics to return
{}on errors.This PR adds the correct extension-to-language mappings:
.bicep→bicep.bicepparam→bicep-paramsReference: https://github.com/Azure/bicep/blob/main/src/Bicep.Core/LanguageConstants.cs
How did you verify your code works?
Verified the official language IDs by inspecting the Bicep source code:
public const string LanguageId = "bicep";public const string ParamsLanguageId = "bicep-params";Confirmed the mapping follows the existing pattern in
language.ts:.tfvarsmaps toterraform-varsChecklist