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

[Feature Request]: Warn user about missing feature #399

Open
przepompownia opened this issue May 10, 2021 · 10 comments · Fixed by #406
Open

[Feature Request]: Warn user about missing feature #399

przepompownia opened this issue May 10, 2021 · 10 comments · Fixed by #406
Labels
enhancement New feature or request needs votes +1 the issue or vote on the trollo card if you would like this
Projects

Comments

@przepompownia
Copy link
Contributor

I found (by inspecting the code of both sides) that vscode-php-debug does not support variable completion yet. The documentation of this adapter does not mention explicitly about it. On the other side Vimspector silently returns an empty result in such case.

Please warn user about missing feature (echomsg with echohl for example).

if not self._server_capabilities.get( 'supportsCompletionsRequest' ):
return []

@puremourning
Copy link
Owner

I’m not sure about this. What is the user supposed to do in response to the warning? Well there isn’t anything they can do. The result is that there are no completions available. Which is true whatever the reason for that.

I mean feel free to try it, but I’m not sure spamming the user with warning they can’t actually fix is such a great solution.

@przepompownia
Copy link
Contributor Author

przepompownia commented May 11, 2021

What do you think about creating a separate command to display summary of supported and unsupported features for given debug adapter?

See the output from:checkhealth nvim_treesitter for example (from https://github.com/nvim-treesitter/nvim-treesitter):

image

@puremourning
Copy link
Owner

Funny I was actually thinking about exactly that recently for a different reason. I have an idea for this to create a VimspectorDebugInfo command (like YcmDebugInfo) that does some diagnostics, which would include printing the server capabilities.

@przepompownia
Copy link
Contributor Author

From a beginner's (in this topic) point of view it could save time needed to ensure that some disability comes from a missing feature and it is neither Vimspector nor nvim/vim bug.

@przepompownia
Copy link
Contributor Author

I didn't notified by GitHub about #406 before it was merged.

Thanks. Info about supportsCompletionsRequest still remains missing.

--------------------------------------------------------------------------------
Server Capabilities: 
--------------------------------------------------------------------------------
{
  "supportsConfigurationDoneRequest": true,
  "supportsEvaluateForHovers": false,
  "supportsConditionalBreakpoints": true,
  "supportsFunctionBreakpoints": true,
  "exceptionBreakpointFilters": [
    {
      "filter": "Notice",
      "label": "Notices"
    },
    {
      "filter": "Warning",
      "label": "Warnings"
    },
    {
      "filter": "Error",
      "label": "Errors"
    },
    {
      "filter": "Exception",
      "label": "Exceptions"
    },
    {
      "filter": "*",
      "label": "Everything",
      "default": true
    }
  ],
  "supportTerminateDebuggee": true
}
--------------------------------------------------------------------------------

@puremourning
Copy link
Owner

Missing means ‘false’

@przepompownia
Copy link
Contributor Author

There is no "supportsCompletionsRequest": false. I guess this capability isn't reported by PHP XDebug adapter explicitly.

@puremourning
Copy link
Owner

Exactly. If the entry is not there, it means the adapter doesn't support it.

@przepompownia
Copy link
Contributor Author

Less advanced users (and me in case of possibly other capabilities) can be still confused as to why, for example, completion does not work (without browsing the code of Vimspector and the adapter).

It would be good to list all the capabilities supported by Vimspector.

@puremourning puremourning reopened this May 19, 2021
@puremourning puremourning added this to To do in QoL May 19, 2021
@puremourning puremourning added enhancement New feature or request needs votes +1 the issue or vote on the trollo card if you would like this labels May 19, 2021
@puremourning
Copy link
Owner

it's a bunch of work that is quite low value imo, but I've added it to the backlog anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs votes +1 the issue or vote on the trollo card if you would like this
Projects
QoL
To do
Development

Successfully merging a pull request may close this issue.

2 participants