coc-spring-initializr
asmodeus812Coc extension for creating spring & other projects
Published Package Summary
coc-spring-initializr
Create Spring Boot projects from Neovim with a Spring Initializr service, and add Spring Boot starters to an existing Maven project. This is the coc.nvim port of the VS Code extension Spring Initializr Java Support.
- Generate a Maven, Gradle or Gradle Kotlin DSL project: Spring Boot version, language, group id, artifact id, package name, packaging, Java version and dependencies.
- Search the dependencies, and reuse the ones of the last generated project.
- Add starters to the
pom.xmlof a Maven Spring Boot project. <Esc>,<C-c>or an empty answer at any wizard step (pickers and text inputs) cancels the wizard quietly.
How to use it inside Neovim, every command and every message you can see:
:help coc-spring-initializr.
Requirements
- Neovim or Vim with coc.nvim 0.0.82 or newer.
- Network access to the Spring Initializr service, https://start.spring.io by default.
- A JDK, and Maven or Gradle, to build the generated project. The extension itself does not need them.
Installation
:CocInstall coc-spring-initializr
From source:
git clone <repository> coc-spring-initializr
cd coc-spring-initializr
npm ci
npm run build
Then add the folder to the runtimepath, for example
set runtimepath^=~/src/coc-spring-initializr in your vimrc, and restart.
Troubleshooting
- "Failed to fetch metadata.": the service is not reachable. Check the network,
a proxy, and
spring.initializr.serviceUrl. - "Failed to create a project." followed by the service's message: the service rejected the chosen values. Pick another Spring Boot or Java version.
:help coc-spring-initializris missing: look for "Unable to register the help page" in the messages; the data folder of coc must be writable.
Every message is explained in :help coc-spring-initializr-messages.
Development
npm ci
npm run build # bundle into lib/
npm run watch # rebuild on change
npm run typecheck # type check without emitting
License
This extension is licensed under the MIT License.
Contributing
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
- Coc extension for creating spring & other projects
- *
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for coc-spring-initializr@0.1.4.
| Command (:CocCommand) | Description |
|---|---|
| spring.initializr.addStarters | Add Spring Boot Starters |
| spring.initializr.createProject | Create Spring Boot Project |
| spring.initializr.maven-project | Generate Maven Project (Initializr) |
| spring.initializr.gradle-project | Generate Gradle Project (Initializr) |
| spring.initializr.gradle-project-kotlin | Generate Gradle Kotlin Project (Initializr) |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
Raw JSON Schema
{
"type": [
"string",
"array"
],
"scope": "window",
"default": [
"https://start.spring.io"
],
"pattern": "https?://.+",
"description": "Spring Initializr Service URL(s). If more than one url is specified, it requires you to select one every time you create a project."
}Raw JSON Schema
{
"enum": [
"artifactId",
"none"
],
"type": "string",
"scope": "window",
"default": "artifactId",
"description": "Controls if a new sub-folder should be created for the newly generated project.",
"enumDescriptions": [
"Place project in a folder named after Artifact Id",
"Do not create a folder for the project"
]
}Raw JSON Schema
{
"type": "string",
"scope": "window",
"default": "com.example",
"description": "Default value for Group Id."
}Raw JSON Schema
{
"enum": [
"",
"Java",
"Kotlin",
"Groovy"
],
"type": "string",
"scope": "window",
"default": "",
"description": "Default language."
}Raw JSON Schema
{
"enum": [
"",
"JAR",
"WAR"
],
"type": "string",
"scope": "window",
"default": "",
"description": "Default packaging."
}Raw JSON Schema
{
"type": "string",
"scope": "window",
"default": "demo",
"description": "Default value for Artifact Id."
}Raw JSON Schema
{
"enum": [
"",
"27",
"25",
"21",
"17"
],
"type": "string",
"scope": "window",
"default": "",
"description": "Default Java version."
}Raw JSON Schema
{
"enum": [
"always",
"current",
"never"
],
"type": "string",
"default": "always",
"description": "Where the cursor goes after addStarters edits the pom: always shows the pom on the first added dependency, current only moves the cursor when the pom is the current buffer, never leaves it alone."
}Raw JSON Schema
{
"enum": [
"",
"Open",
"Cancel"
],
"type": "string",
"scope": "window",
"default": "",
"description": "Default action for newly generated projects"
}