coc-groovy
v1.5.0
Published
Groovy langauage extension for coc.nvim
Maintainers
Readme
coc-groovy
An extension for coc.nvim to enable Groovy language server support.
Features
- Maven and Gradle project support
- Code Completion
- Find References
- Go to Definition
- Highlights
- Refactor Rename
- Signature Hover
Quick Start
Download and install a recent Java Development Kit (latest Java 8 is the minimum requirement).
Install this extension by running this command in Vim:
:CocInstall coc-groovyThis extension is activated when you first open a Groovy file.
Dependencies
Maven Projects
Maven project support requires having the Maven Wrapper installed in your project or having Maven installed on your environment path.
Available commands
The following coc.nvim commands are available:
groovy.project.config.update: This is available when the editor is focused on a Groovy file. It forces project configuration/classpath updates (eg. dependency changes) according to the project build descriptor.
Supported settings
The following settings are supported:
groovy.enable: Enable the coc-groovy extension, default:truegroovy.java.home: The absolute path to the JDK 8+ home directory. This is used to launch the Groovy language server. Requires a coc server restart.groovy.ls.vmargs: Extra Java VM arguments used to launch the Groovy language server. Requires a coc server restart.groovy.ls.home: The absolute path to the Groovy language server. This would be used instead of the bundled server when specified.groovy.project.referencedLibraries: Configure additional paths (jar file or directory) for referencing libraries in a Groovy project. Note, Maven and Gradle projects will have their classpath automatically added.- Example:
["/path/to/lib.jar", "/path/to/lib/*"]
- Example:
groovy.trace.server: Traces the communication between the coc-groovy extension and the Groovy language server.groovy.noRoot(Experimental): Enables language server features for standalone Groovy files (for when no Maven or Gradle project root is available). Set this in the global CoC configuration. Default:false
Setting the JDK
The path to the Java Development Kit is searched in the following order:
- The
groovy.java.homesetting in coc.nvim settings (workspace then user settings). - The
JDK_HOMEenvironment variable. - The
JAVA_HOMEenvironment variable. - The current system path.
License
EPL 2.0, See LICENSE for more information.
