r/neovim • u/asmodeus812 • 12h ago
Plugin Coc extensions for Java, Spring, Maven, SonarQube
I've used coc.nvim for Java work for a while, and for a few things I wanted a more expressive/working java eco system. So I ported some core VS Code extensions to coc, and kept them maintained for a while now. Six of them are ports, the last one (coc-htmlview) is new. They're all on GitHub and npm, in case they're useful to anyone else on coc.
coc-sonarlint
Port of SonarSource/sonarlint-vscode.
SonarQube for IDE (formerly SonarLint): runs Sonar's language server and reports quality and security issues as you type.
- Languages: C, C++, Java, Go, JavaScript, TypeScript, Python, PHP, HTML, CSS, CloudFormation/Kubernetes/ARM YAML and JSON, and secrets in any file
- Connected Mode: uses the rule sets and project settings of a SonarQube Server or SonarQube Cloud project
- Rule descriptions, hotspot details and connection details open in a split or float, styled like a browser page, with tabs you switch with
<CR> - A findings tree for the workspace, quick fixes as code actions
- Language server and analyzers ship with the extension, you only need a Java 17+ runtime
coc-springboot
Port of vscode-spring-boot from spring-projects/sts4.
Spring Boot support: runs the Spring Boot language server of the Spring Tools project.
- Spring-aware completion, hover and validation in Java files,
application.properties,application.ymland*.factories - Symbol search for request mappings and beans
- Live data from running Spring Boot apps: hovers over Spring annotations show data from the running app
- Language server bundled, needs coc-java and Java 21+
coc-maven
Port of microsoft/vscode-maven.
Maven support: a project explorer, goal runner and pom.xml editing features.
- Project explorer: modules, dependencies, plugins and their goals, profiles
- Run goals, lifecycle phases and saved favorite command lines in a terminal, with a history per pom
pom.xmlcompletion (including group/artifact/version from Maven Central and your local repository), hover, go-to-definition, code actions and dependency conflict diagnostics- Effective pom and dependency tree in read-only buffers
- Create projects and modules from archetypes, and find the artifact behind an unresolved Java type
coc-java-explorer
Port of microsoft/vscode-java-dependency.
Java project explorer: a tree of the Java projects in the workspace.
- Source roots, packages, classes, the JRE, Maven/Gradle dependencies and referenced libraries
- Create classes and packages, rename and delete from the tree
- Add or remove referenced libraries, create projects, export jars
coc-spring-dashboard
Port of microsoft/vscode-spring-boot-dashboard.
Spring Boot dashboard: run the apps of the workspace and look into them while they run.
- Tree views of the Spring Boot apps in the workspace: start, stop and debug them
- Live beans, endpoint mappings, properties and memory of running apps
- Signs on bean definitions and request mappings in the code
- Attach to apps running elsewhere
coc-spring-initializr
Port of microsoft/vscode-spring-initializr.
Spring Initializr: create new Spring Boot projects and add starters to existing ones.
- Generate a Maven, Gradle or Gradle Kotlin DSL project from start.spring.io: Boot version, language, coordinates, packaging, Java version, dependencies
- Search dependencies, reuse the ones from the last project
- Add starters to the
pom.xmlof an existing project
coc-htmlview
Not a port, written for these extensions.
HTML viewer: renders HTML and CSS into a Neovim buffer, so other coc extensions can show formatted docs (coc-sonarlint uses it for rule descriptions).
- A real CSS cascade, with specificity and
!important - Tables, lists, borders, flex rows and inline blocks on a character grid
- Code blocks highlighted with treesitter, colors follow your colorscheme
Install: :CocInstall coc-<ext>. The Java and Spring ones expect coc-java for the Java language server. Each extension has a :help page that covers commands and settings. They're written and tested on Neovim mostly.
Bug reports and issues are welcome on GitHub.
