GithubHelp home page GithubHelp logo

nclaeys / intellij-leiningen-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from derkork/intellij-leiningen-plugin

0.0 2.0 0.0 254 KB

A plugin for JetBrains' IntelliJ IDE supporting the Leiningen build system.

Clojure 4.30% Java 95.70%

intellij-leiningen-plugin's Introduction

Status notice

This project is no longer actively maintained by me. If you’re looking for a Clojure development environment based
on IntelliJ and with Leiningen support, check out Cursive . If you want to add new
functionality to this plugin, feel free to fork and modify it as you like.

The IntelliJ Leiningen Plugin

This plugin integrates Leiningen into IntelliJ. It is supposed to work with both the Ultimate and Community Edition
of IntelliJ.

Features

  • Import leiningen projects into IntelliJ IDEA.
  • Directly open a leiningen project file (just like you can open maven POMs).
  • Dependencies from the leiningen project file are set up as libraries in IntelliJ.
  • Run the mostly used actions (like compile, jar, uberjar, etc.) with a single click.
  • Create run configurations for less used or parametrized actions.

Usage

Install the plugin via the plugin manager of IntelliJ. Then go to Settings > Leiningen and set up the location of
Leiningen. Now you can run Leiningen targets in the Leiningen tool window on the right side of the IntelliJ main
window by doubleclicking on the target name.

When you open a project that has a project.clj file in it’s root, it is automatically added to the list of
Leiningen projects in the Leiningen tool window. If you have multiple project.clj files in your project tree (e.g. a
project with subprojects) you can add these manually by pressing the plus icon in the Leiningen tool window.

Compiling the source code

  • Grab the latest version from http://github.com/derkork/intellij-leiningen-plugin.
  • Setup an IntelliJ SDK
    • I suggest using an IntelliJ Community Edition as SDK base, to ensure that the plugin will run on the Community Edition as well.
  • Create a new project from scratch and add a Plugin Module which points at the root directory of the intellij-leiningen-plugin source.
    • When it asks for a Project SDK, point it at the Community Edition SDK you have just set up.
    • Once the project and module have been created:
      • Add the resources directory as a source root to the plugin module.
      • Add the test directory as a test root to the plugin module.
  • Setup the dependency on the leiningen interop library which is written in Clojure:
    • Using leiningen 2.0 or higher, navigate on the command line to the interop subdirectory
      • Run ‘lein uberjar’ – this will generate a standalone jar file.
      • Add this jar to the plugin module’s dependency list
  • Add a new Plugin Run Configuration to the project and tell it to use the classpath of your plugin module
    • Run the plugin using the configuration you just created!

Adding the interop directory as a module.

If you wish to add the interop module to the project do the following:

  • Using leiningen 2.0 or higher, navigate on the command line to the interop subdirectory
    • Run ‘lein pom’ – this will generate a pom.xml file.
  • Navigate to the pom.xml file in IDEA’s project manager
  • Right click on the pom.xml – Select ‘Add as Maven Project’
    • Maven plugin needs to be enabled for this
    • This will create a module named interop in your project
    • Add this module as a module dependency to the plugin module.

Building the plugin distribution

To build a deployable Jar file:

  • From the program menus, select Build → Prepare plugin-module [plugin-module-name] for Deployment.
    • This will create a Jar file that you can deploy into your IntelliJ plugins folder.

Submitting patches

Patches can be submitted via email to janthomae at janthomae dot de or using GitHub’s fork and pull request facility.

intellij-leiningen-plugin's People

Contributors

64bitchris avatar derkork avatar markmandel avatar netvl avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.