Giter Site home page Giter Site logo

idris-sublime's Introduction

Sublime Text plugin for Idris2 language

  • Syntax definition is developed based on the SublimeHaskell plugin using the AAAPackageDev plugin for converting YAML to tmLanguage.
  • [Interactive editing] Based on idris2-vim https://github.com/edwinb/idris2-vim/blob/master/doc/idris2-vim.txt#L41 functionality:
    • It calls idris2 --find-ipkg with commands like :cs!, just writing to your file.
    • The following commands are added to the Command Palette:
      • ` or T Idris: Show type (:t for current symbol)
      • R Idris: Reload
      • C Idris: Case split (:cs! for current symbol)
      • V Idris: Add clause (:ac! for current symbol)
      • J Idris: Add clause (pattern-matching proof) (:apc! for current symbol)
      • M Idris: Add missing clauses (:am! for current symbol)
      • Y Idris: Refine item (:ref! for current symbol)
      • S Idris: Proof search (:ps! for current symbol)
      • O Idris: Proof search with hints (:ps! for current symbol)
      • A Idris: Generate definition (:gd! for current symbol)
      • L Idris: Make lemma (:ml! for current symbol)
      • E Idris: Evaluate expression (any command for the REPL)
      • W Idris: Make with pattern (:ml! for current symbol)
      • N Idris: Make case (:mc! for current symbol)
      • H Idris: Documentation (:doc! for current symbol)

Installation (with Sublime Package Control)

  1. Add this repository to Sublime Package Control. To do this, open up the command pallete with Ctrl/Cmd + P, start typing "repository" and choose the option "Package Control: Add Repository" when it comes up. Then paste the url (https://github.com/idris-hackers/idris-sublime) into the field at the bottom and press enter.

  2. Install the package. To do this, open the command pallete again, select "Package Control: Install Package", and choose idris-sublime.

  3. Re-open any .idr source files, and they will now be recognized as Idris source files.

TODO list

Things that would be nice to have:

idris-sublime's People

Contributors

bmwant avatar jfdm avatar laughedelic avatar leifw avatar lynn avatar melted avatar mikeyhew avatar normalcoder avatar raineorshine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

idris-sublime's Issues

Highlighting is highly incorrect

Missing features:

  • interface, implementation, namespace, export, and rewrite … in … are not colored as keywords
  • Identifier names ending with multiple 's will cause all text after it being colored as string.
  • Does not support 'identifier, "label-as-type".

cc. @edwinb

Please consider re-licensing this repository

Hello there, we'd love to use this library to syntax-highlight files on GitHub but in order to do so we need this library to have a more permissive license.

If you don't have any particular reason for choosing GPL would you be willing to consider switching this to a more permissive license such as MIT, BSD or Apache 2?

Many thanks
Arfon (GitHub Staff)

Consider using Idris's IDE mode

Idris has a machine-readable REPL designed to make editor integration easy. Vim doesn't use it due to limitations in running subprocesses, but Atom and Emacs do. It provides things like richer semantic information for compiler output (tooltips with docstrings on names), extra commands, Agda-style semantic highlighting of source code, etc. I think this enables a nicer editor mode than --client.

Docs are here. If you're interested, I'm happy to answer questions, make tweaks that make your life easier, or improve the docs.

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.