Git Product home page Git Product logo

intellij-leiningen-plugin's Introduction

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 empty project: File→New Project, select Empty Project and select the directory where you left the code.
  • When it opens the Project Structure window, click + and select Import Module. Select leiningenplugin.iml.
  • Select Project SDK for the module, and in the Project tab select your SDK.
  • Open the Leiningen toolwindow, and click +. Select the project.clj.
  • In Settings→Compiler→Clojure Compiler set:
    • Compile Clojure files to no
    • Copy Clojure source files to yes
  • In Settings→Compiler:
    • If you have Use external build set, change the Resource pattern from !?.clj to ?.clj
  • 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!

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 using Plugins→Install plugin from disk.

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 cmf avatar derkork avatar netvl avatar

Watchers

 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.