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 ignore error feature for PHPDoc tag comment #16

Merged
merged 1 commit into from Dec 22, 2021

Conversation

yaegassy
Copy link
Owner

@yaegassy yaegassy commented Dec 22, 2021

Description

At this time, intelephense language server does not have a comment tag feature to ignore errors.

See:


coc-intelephense has added its own features.

I made it an ignore comment like phpstan, Please refer to this page for usage. https://phpstan.org/user-guide/ignoring-errors#ignoring-in-code-using-phpdocs

Tags:

  • @intelephense-ignore-line
  • @intelephense-ignore-next-line

DEMO (mp4)

Works with <Plug>(coc-codeaction-line)

Example key mapping:

nmap <silent> ga <Plug>(coc-codeaction-line)
coc-intelephense-ignore-error-feature.mp4

Add configuration

The default is false.

  • intelephense.client.diagnosticsIgnoreErrorFeature: Whether to enable the PHPDoc tag (@intelephense-ignore-line, @intelephense-ignore-next-line) feature and ignore errors, default: false

Add code action

  • Add @intelephense-ignore-line
  • Add @intelephense-ignore-next-line

Misc

This feature will be removed when the dedicated feature is added in the upstream's vscode-intelephense or intelephense language server.

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.

None yet

1 participant