Giter Club home page Giter Club logo

atom-sbt-client's Introduction

Atom sbt client

This is an Atom plugin integrating sbt server with the Atom IDE interface.

It connects to a running sbt instance and communicates with it using Language Server Protocol. Atom sends event notifications to sbt (like didSave), in response sbt recompiles the project and sends back information about warnings and errors which are displayed in Atom:

Installation

You can install it using Atom interface or by running this command:

apm install atom-sbt-client

On the first launch it will automatically install its dependencies if needed:

Usage

  1. Go to a Scala project and launch sbt (project/build.properties should set sbt version to 1.1.0 or higher)
  2. Open this project in Atom, open any Scala file and save it.

It should trigger compilation and if there are any errors, you should see them in the gutter and in the diagnostics panel.

Another feature is jump-to-definition, which works for some types in the project.

Note that despite the debug logging in the sbt shell, you can still use it directly. It's just a normal sbt shell which additionally communicates with Atom.

Related links

atom-sbt-client's People

Contributors

laughedelic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

acidburn0zzz

atom-sbt-client's Issues

Needs an invalidation or clean mechanism

Hi,

Context in case it matters, I'm doing Scala.js work.

Generally, the plugin is very stable. From time to time though, Atom or the SBT client plugin gets very confused about it's incremental compile state. SBT itself is quite happy (I run SBT in a terminal in the background, which I vastly prefer to the VSCode version that tries to run it for me!).

This happens a lot running unit tests with ScalaTest where instead of getting a nice error message when your tests are run, you actually get a linking error in JS. This is usually resolved by running clean, possibly with test:compile in the running SBT session.

Another instance where this happens is when you use global find and replace in Atom and it touches lots of files with auto-save. The diagnostics show errors where there are none and can only be invalidated with a hard restart of everything. I imagine a similar thing would happen with a big version control change, but I haven't tried it to know for sure.

For now I'd be overjoyed with a blunt "sbt: clean" task in the Atom command palette if such a thing is possible?

Dave

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.