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

feat: add "autoCloseDocCommentDoSuggest" feature #24

Merged
merged 2 commits into from
Apr 5, 2022

Conversation

yaegassy
Copy link
Owner

@yaegassy yaegassy commented Apr 5, 2022

Description

"intelephense" will suggest the completion item /** [Intelephense PHPDoc] */ in the case of /**| */.

In vscode-intelephense, */ is automatically inserted in the "Language Configuration" function of the VSCode itself. https://code.visualstudio.com/api/language-extensions/language-configuration-guide

This is not a problem with vscode-intelephense, but it is a problem when used from Vim. Completion items are also suggested in the following cases, but there is a glitch.

Before:

| is the cursor.

    /**|
    public function dummy1()
    {
      // ...snip
    }

    /**
     *
     */
    public function dummy2()
    {
      // ...snip
    }

After:

This is a bug that causes the dummy2 method to disappear... :(

    /**
     * 
     * @return void 
     */
    public function dummy1()
    {
        //
    }

Add feature

Added the ability to behave as follows.

  1. Auto insert */ by typing /**.
  2. Text will be /**| */. (| is the cursor)
  3. Automatically triggers completion at the current cursor position.
  4. /** [Intelephense PHPDoc] */ complemention items are suggested.

If this feature is not needed, it can be disabled. Set intelephense.client.autoCloseDocCommentDoSuggest to false.

@yaegassy
Copy link
Owner Author

yaegassy commented Apr 5, 2022

DEMO (mp4)

coc-intelephense-auto-close-doc-comment-do-suggest.mp4

@yaegassy yaegassy merged commit 3cbe30d into master Apr 5, 2022
@yaegassy yaegassy deleted the feat/auto-close-doc-comment-do-suggest branch April 5, 2022 03:06
@yaegassy yaegassy changed the title feat: add "autoCloseDocCommentDoSugesst" feature feat: add "autoCloseDocCommentDoSuggest" feature Apr 5, 2022
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.

1 participant