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

[LSP] auto-suggestion for template name/body should be meaningful #1678

Closed
hibrenda opened this issue Dec 2, 2019 · 5 comments
Closed

[LSP] auto-suggestion for template name/body should be meaningful #1678

hibrenda opened this issue Dec 2, 2019 · 5 comments
Assignees
Labels
R8 Release 8 - March 16th, 2020

Comments

@hibrenda
Copy link
Contributor

hibrenda commented Dec 2, 2019

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
Editing in LG all up view, when you type template name/body, it will auto suggest lots of irrelevant info .

Describe alternatives you've considered

  • For template name, should not auto-suggest or should auto-suggest based on the context
    eg. list out the template name during template editing , this could help user to avoid duplicate name definition across different dialog.
  • For body editing, only auto suggest pre-built function and the predefined template name to make the LG editing more productive.

Additional context
Add any other context or screenshots about the feature request here.

@sangwoohaan
Copy link
Contributor

I think there are three micro-contexts here

  1. Creating a new template: start with #
  2. Referring to a template or a property: @{
  3. Prebuilt function: Anytime
  1. should suggest nothing, 2) would only suggest other templates, then 3) suggests all the prebuilt functions(not templates). Would this make sense? @cwhitten @a-b-r-o-w-n

@a-b-r-o-w-n
Copy link
Contributor

3 would only make since in a template body I believe. Other than that, this makes sense.

@sangwoohaan
Copy link
Contributor

Ok, that makes sense. Could we also suggest known properties like dialog.XXX after @{? Would this potentially cause runtime errors?

@a-b-r-o-w-n
Copy link
Contributor

We should be able to do that eventually. The language server work should enable that, but I'm not sure what's required to do so.

@hibrenda hibrenda added the R8 Release 8 - March 16th, 2020 label Dec 11, 2019
@zhixzhan
Copy link
Contributor

In language server, we can recognize current context, and return proper suggestion list. I will take this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R8 Release 8 - March 16th, 2020
Projects
None yet
Development

No branches or pull requests

4 participants