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

Create/Update Quarkus snippets #227

Closed
lordofthejars opened this issue Mar 13, 2020 · 9 comments · Fixed by redhat-developer/quarkus-ls#310
Closed

Create/Update Quarkus snippets #227

lordofthejars opened this issue Mar 13, 2020 · 9 comments · Fixed by redhat-developer/quarkus-ls#310
Assignees
Labels
Milestone

Comments

@lordofthejars
Copy link

Create new snippets for the new container-image extension: https://github.com/quarkusio/quarkus/blob/master/docs/src/main/asciidoc/container-image.adoc

So the configuration to push a container image to a remote registry is automatically set.

Update the snippet for defining a data source to the latest changes using db-kind instead of a driver. https://github.com/quarkusio/quarkus/blob/master/docs/src/main/asciidoc/datasource.adoc#jdbc-datasource

@angelozerr
Copy link
Contributor

@lordofthejars thanks for this issue. I would like to manage snippet on server side (and not on vscode client side) because :

  • all client (vscode, Eclipse IDE) could benefit with that
  • we will able to provide those snippet only when project will have the proper dependency.

See #119

I have already managed that in an another project (XML maven extension), the idea is that you describe your snippet in json file with the same format than vscode, but you host those files in the server side with a condition (in the Quarkus context, the condition is the extension name). If you have time to write those snippets in a PR (I mean just writing snippets, not the package.json declaration, it should be very cool). Thanks

@angelozerr
Copy link
Contributor

@lordofthejars is there any chance that you write vscode snippets and after that we will able to integrate on MicroProfile Language Server ?

@lordofthejars
Copy link
Author

Ok, I'll do it ASAP, no worries.

@angelozerr
Copy link
Contributor

Ok, I'll do it ASAP, no worries.

Thanks!

@lordofthejars
Copy link
Author

For container images:

"Add Container Image properties": {
		"prefix": "cip",
		"body": [
			"quarkus.container-image.group=$1",
			"quarkus.container-image.registry=${2:quay.io}",
			"quarkus.kubernetes.expose=${3|true,false|}",
			"#quarkus.container-image.username=$4",
			"#quarkus.container-image.password=$5"
		]
	}

DataSource:

"Add Panache properties": {
		"prefix": "qpm",
		"body": [
			"quarkus.datasource.url=${1:jdbc:mariadb://localhost:3306/mydb}",
			"quarkus.datasource.db-kind=${2|h2,derby,mariadb,mssql,mysql,postgresql|}",
			"quarkus.datasource.username=${3:developer}",
			"quarkus.datasource.password=${4:developer}",
			"quarkus.hibernate-orm.database.generation=${4:update}"
		],
		"description": "Configure Quarkus Panache"
	},

@fbricon
Copy link
Collaborator

fbricon commented Apr 7, 2020

We already have the datasource snippet (see #90 and #92). Triggered with qds

@lordofthejars
Copy link
Author

@fbricon See that a new property has been added, this was what I was showing here so driver is not required anymore.

@fbricon fbricon added this to the 1.5.0 milestone Apr 22, 2020
@angelozerr
Copy link
Contributor

@fbricon
Copy link
Collaborator

fbricon commented Apr 29, 2020

So only the datasource snippet was updated, as the container story is not ready yet. See redhat-developer/quarkus-ls#310 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants