eclipse / lsp4mp

Technology lsp4mp
Eclipse Public License 2.0
22 stars 27 forks source link

Improve again completion result of microprofile-config.properties #410

Closed angelozerr closed 1 year ago

angelozerr commented 1 year ago

Here a sample of completion item result:

{
      "label": "quarkus.management.filter.{*}.matches",
      "kind": 10,
      "filterText": "quarkus.management.filter.${1:key}.matches",
      "textEditText": "quarkus.management.filter.${1:key}.matches=$0",
      "data": {
          "propertyName": "quarkus.management.filter.{*}.matches",
          "uri": "file:///c%3A/Users/azerr/git/quarkus-blast/src/main/resources/application.properties"
      }
  }

I think we can improve again the result to have a lower JSON result since completion for microprofile-config.properties can return a lot of items.

It should be nice to return only:

{
      "label": "quarkus.management.filter.{*}.matches",
      "kind": 10,
      "textEditText": "quarkus.management.filter.${1:key}.matches=$0"
  }

@JessicaJHee what do you think about that?

JessicaJHee commented 1 year ago

I'm interested in working on this!

rgrunber commented 1 year ago

Just something to be aware of because I noticed you mention attempting to de-duplicate data fields of a completion item, https://github.com/eclipse/eclipse.jdt.ls/issues/2621#issuecomment-1524259869 . So even if data were supported (it isn't for vscode-languageclient), the behaviour is not to merge data fields, but to have the more specific (eg. item.data override list.itemDefaults.data)