Skip to content

Conversation

@vogella
Copy link
Member

@vogella vogella commented Nov 14, 2025

Added code completion template for WARNING admonition blocks in the AsciiDoc LSP server. When users type "WA" and press CTRL+Space, they will now see a completion option that inserts:

[WARNING]

CURSOR HERE

The cursor will be positioned inside the block for immediate content entry.

Added code completion template for WARNING admonition blocks in the AsciiDoc LSP server. When users type "WA" and press CTRL+Space, they will now see a completion option that inserts:

[WARNING]
====
*CURSOR HERE*
====

The cursor will be positioned inside the block for immediate content entry.
@gemini-code-assist
Copy link

Summary of Changes

Hello @vogella, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the AsciiDoc Language Server Protocol (LSP) by introducing a convenient code completion snippet for WARNING admonition blocks. This feature aims to improve developer productivity and ensure consistency when authoring AsciiDoc documents by providing a quick and standardized way to insert these common block types.

Highlights

  • New Code Completion: A new code completion template has been added for AsciiDoc WARNING admonition blocks.
  • Snippet Functionality: Users can now type 'WA' and press CTRL+Space to insert a WARNING block, with the cursor automatically positioned inside for immediate content entry.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a code completion snippet for Asciidoc's [WARNING] admonition block. The implementation is straightforward and follows existing patterns in the file. My review identifies one issue where the completion may not be triggered as described in the pull request. I've provided a suggestion to align the implementation with the intended behavior.

items.add(include);

// WARNING admonition block
CompletionItem warning = new CompletionItem("[WARNING]");

Choose a reason for hiding this comment

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

high

The completion item label "[WARNING]" does not align with the goal of triggering this completion by typing WA, as described in the pull request. The server filters completions by checking if the label starts with the typed text. With "[WARNING]" as the label, a user would need to type [ or [W to trigger this completion, not WA.

To fix this and match the intended behavior, the label should be "WARNING". The insertText property will still correctly insert the full [WARNING] block.

Suggested change
CompletionItem warning = new CompletionItem("[WARNING]");
CompletionItem warning = new CompletionItem("WARNING");

Changed the completion item label from "[WARNING]" to "WARNING" so that
typing "WA" will correctly trigger the completion. The insertText still
contains the full [WARNING] block syntax, but the label is now properly
filtered by the prefix matching logic.
@vogella vogella merged commit ee7cf1b into main Nov 16, 2025
1 check passed
@vogella vogella deleted the claude/add-warning-completion-template-01FPHchpA8qLxQb5YUd8oVXZ branch November 16, 2025 10:38
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