Git Product home page Git Product logo

ceylon-mode's People

Contributors

lucaswerkmeister avatar purcell avatar wammkd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ceylon-mode's Issues

Improve error handling of format functions

The ceylon-format-* functions wipe the region/buffer empty if there is an error (e. g. because the selection was not a valid declaration), because shell-command-on-region replaces the region regardless of error and ceylon format --pipe doesn’t write anything to stdout in that case. It’s easy enough to undo (C-x u), but still not ideal.

Originally part of #8.

Run ceylon.formatter from correct directory

Currently, ceylon format is run from the directory that contains the file being edited. If we instead run it from the project root, it should automatically pick up formatting settings.

Logic to discover the project root should be shared with #7.

Originally part of #8.

Add function to format region/file

Pipe it through ceylon format --pipe.

If ceylon format isn’t available, it’s probably better to just bail out rather than install one version from ceylon-mode, otherwise an outdated ceylon-mode will install old ceylon.formatter versions.

  • format region
    • remove trailing line break if not present in original region
    • prepend indentation of region beginning to formatted lines
  • format buffer
  • improve error handling: #9
  • run from project root directory so that formatting settings are applied correctly: #10

Change license to AGPL

I’d like to change the license from GPLv3+ to AGPLv3+ – this isn’t primarily a program run over a network, but if someone runs an “Emacs in your browser” website or something like that, I’d still like to protect their users’ freedom.

@purcell, as the only other contributor: do you agree to make your contribution (#11) available under that license as well?

Add function to compile module

  • Check if there’s a package.ceylon in the current directory. If not, abort.
  • Traverse the parent directories until a module.ceylon is found. (Make sure not to infinite loop when reaching the root directory.)
  • If the module.ceylon specifies a native annotation (a very crude heuristic will do – native *("jvm") as regex, for instance), remember that, otherwise default to compiling for JVM.
  • Walk one directory up. (TODO: do we need to cater for different source layouts, e. g. src/main/ceylon/?)
  • Run ceylon compile/compile-js.

Improve syntax

Recognizing string literals with regexes is just shitty, and it doesn’t work (try opening Iterable.ceylon – the long doc comment of the class isn’t recognized). Instead, we should probably override syntax-propertize-function. Look into how Python mode does this (/usr/share/emacs/24.5/lisp/progmodes/python.el.gz).

(I’m assigning myself to this issue, but if anyone else wants to take a shot at this, go ahead.)

Indentation in string literals

The indentation function should be improved to indent correctly within string literals. What we currently have works for the third line and subsequent lines, but the second line should be aligned to the quotes in the first line.

ceylon-mode does not work without (require 'cl)

Loading ceylon-mode in vanilla emacs does not work (fails complaining that "concatenate" is not defined). Executing (require 'cl) before loading ceylon-mode in .emacs gets rid of the error.. but it feels a bit overkill to load another lisp to get it to work 😜

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.