Skip to content

Latest commit

 

History

History
139 lines (96 loc) · 4.63 KB

README.md

File metadata and controls

139 lines (96 loc) · 4.63 KB

LunarVim configurations.

Notice: This repository is no longer maintained.

We have transitioned to a new generation of Java development environment configurations. The new setup, called JVIM, is not based on Lunarvim but instead on a Neovim itself. All Java-related features are present and actively maintained.

Please visit the new repository: JVIM

Thank you for your understanding and continued support.

Introduction

This project aims to convert LunarVim to the fully usable Java IDE. It enables debugging, refactoring and other Java language related features.

Requirements

Installation

  1. Clone this configs into $HOME/.config/lvim/ folder.
git clone https://github.com/Israiloff/lvim-java-ide.git $HOME/.config/lvim/
  1. Clone and pack jdtls
git clone https://github.com/eclipse-jdtls/eclipse.jdt.ls.git $HOME/projects/nvim/jdtls/
cd $HOME/projects/nvim/jdtls/
./mvnw clean verify -DskipTests=true
  1. Clone, pack and install java debug
git clone https://github.com/microsoft/java-debug.git $HOME/projects/nvim/java-debug/
cd $HOME/projects/nvim/java-debug/
./mvnw clean install
  1. Clone and pack java test
git clone https://github.com/microsoft/vscode-java-test.git $HOME/projects/nvim/java-test/
cd $HOME/projects/nvim/java-test/
npm run build-plugin
  1. Clone and pack lemminx for XML support
git clone https://github.com/eclipse/lemminx.git $HOME/projects/nvim/lemminx/
cd $HOME/projects/nvim/lemminx/
./mvnw clean verify -DskipTests
  1. Download Lombok
curl -L https://projectlombok.org/downloads/lombok.jar -o $HOME/projects/nvim/lombok.jar
  1. Update Lvim and clear cache
lvim +LvimUpdate +LvimCacheReset +q

Plugins and Tools

Copilot

Copilot is a plugin for LunarVim that uses OpenAI's Codex to provide code completions and suggestions. Completions (alt+l) are available in insert mode and suggestions are available in normal mode in which-key menu.

To use it, follow these steps:

  • Run :Copilot setup and enter your Copilot account credentials.
  • Enable the plugin by running :Copilot enable

Open AI. Chat GPT-4

Chat GPT is a plugin for LunarVim that uses OpenAI's GPT-4 to provide code completions and suggestions.

To use it you need to have an OpenAI API key. Set the OPENAI_API_KEY environment variable in your shell and run :ChatGPT enable in LunarVim.

echo "export OPENAI_API_KEY=YOUR_PERSONAL_OPENAI_API_KEY" >> $HOME/.zshrc

All features are available in the which-key menu.

Docker Container

You can use the Docker container configured in a separate project in a few simple steps.

  • Pull the image
docker pull israiloff/lvim:latest
  • Run the container with only necessary ports
docker run -it -d -p 33235:33235 --name lvim israiloff/lvim:latest
  • Run the container with additional ports and access to docker itself
docker run -it -d -p 33235:33235 -p 8090-8099:8090-8099 -v /var/run/docker.sock:/var/run/docker.sock --name lvim israiloff/lvim:latest

Port 33235 is used for the markdown preview server. Ports 8090-8099 are additional ports for debugging and testing.

  • Enter the container
docker exec -it lvim /bin/zsh

Gallery

All screenshots are taken from the Windows 11 terminal.

Java code

Java

Java tests

Java tests

Java debug

Java debug Java debug object expanded

Which-key menu

Which-key menu

Chat GPT

Chat GPT