Skip to content
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

fix(amazonq): users not able to auto trigger Q inline suggestion on systemVerilog files #5990

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

Will-ShaoHua
Copy link
Contributor

@Will-ShaoHua Will-ShaoHua commented Nov 13, 2024

Problem

within inline suggestion code path, isLanguageSupported() relies on vscode.editor.document.langaugeId to determine whether the given language is supported Q inline suggestion functionality. However, it's possible that some languages are not recognized by VSCode IDE itself without 3rd party extensions, for example: VSCode doesn't recognize .sv, svh, vh files which is bound to SystemVerilog language if users do not have the 3rd party extension installed and enabled, in this case, vscode.editor.document.languageId will simply return plaintext.

This is the root cause why autotrigger doesn't work for systemverilog files, because at the beginning, we don't even register keyStrokeHandler for files with .sv, svh, vh files.

Solution

if language check return false, we should also check file extension


License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

… the provided file, should fallback to determine if the provided file is supported or not by file extension
@Will-ShaoHua Will-ShaoHua requested review from a team as code owners November 13, 2024 00:52
Copy link

  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

Comment on lines +111 to +114
h: 'c',
cpp: 'cpp',
cc: 'cpp',
'c++': 'cpp',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@justinmk3 justinmk3 merged commit 16e8a77 into aws:master Nov 13, 2024
45 of 55 checks passed
@Will-ShaoHua Will-ShaoHua deleted the lang branch November 13, 2024 18:41
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.

3 participants