rasa 0.1.1 → 0.1.3
raw patch · 3 files changed
+64/−5 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- README.md +51/−0
- rasa.cabal +4/−1
- src/Rasa/Ext.hs +9/−4
README.md view
@@ -2,9 +2,28 @@ ============== [](https://gitter.im/rasa-editor/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)+[](https://hackage.haskell.org/package/rasa) Embarrassingly modular customizable text editor built in Haskell. +++A Rasa editing session with multiple cursors.++Documentation+-------------+You can find hackage documentation for rasa and some extensions here:++- [rasa](https://hackage.haskell.org/package/rasa)+- [rasa-ext-cmd](https://hackage.haskell.org/package/rasa-ext-cmd)+- [rasa-ext-cursors](https://hackage.haskell.org/package/rasa-ext-cursors)+- [rasa-ext-files](https://hackage.haskell.org/package/rasa-ext-files)+- [rasa-ext-logger](https://hackage.haskell.org/package/rasa-ext-logger)+- [rasa-ext-slate](https://hackage.haskell.org/package/rasa-ext-slate)+- [rasa-ext-status-bar](https://hackage.haskell.org/package/rasa-ext-status-bar)+- [rasa-ext-style](https://hackage.haskell.org/package/rasa-ext-style)+- [rasa-ext-vim](https://hackage.haskell.org/package/rasa-ext-vim)+ What people are saying ---------------------- @@ -22,6 +41,38 @@ 1. Install [stack](http://seanhess.github.io/2015/08/04/practical-haskell-getting-started.html) 2. Clone this repo and `cd` into the directory 3. Run `stack build && stack exec rasa` (you may want to alias this to `rasa`)++### Troubleshooting++- You may need to install icu4c (`brew install icu4c`), it's a dependency of the rope library rasa uses.+- You'll need to point to the icu4c lib in your stack.yaml wherever it's stored on your system. If you install+ using brew on your Mac, then you can add the following to your stack.yaml:++```yaml+extra-lib-dirs:+- /usr/local/opt/icu4c/lib +extra-include-dirs:+- /usr/local/opt/icu4c/include+```++- Depending on which LTS you're on, you'll likely also have to add each rasa package you use to your stack.yaml as+ extra-deps, here's an example:++```yaml+# in stack.yaml+extra-deps:+- rasa-0.1.0.0+- rasa-ext-cursors-0.1.0.0+- rasa-ext-logger-0.1.0.0+- rasa-ext-status-bar-0.1.0.0+- rasa-ext-vim-0.1.0.0+- text-lens-0.1.0.0+- rasa-ext-files-0.1.0.0+- rasa-ext-cmd-0.1.0.0+- rasa-ext-slate-0.1.0.0+- rasa-ext-style-0.1.0.0+- vty-5.14+``` Getting started ---------------
rasa.cabal view
@@ -1,5 +1,5 @@ name: rasa-version: 0.1.1+version: 0.1.3 synopsis: A modular text editor homepage: https://github.com/ChrisPenner/rasa#readme license: MIT@@ -22,12 +22,15 @@ /Pros/ . * Implementing most core functionality as extensions ensures a powerful and elegant extension interface.+ . * Flexibility; don't like the default cursor implementation? Write your own!+ . * Adaptability; the core of Rasa is miniscule, you can mix and match extensions to build any editor you want. . /Cons/ . * Module cross-dependencies makes the community infrastructure more fragile; We'll likely have to develop a solution to this as a community as time goes on.+ . * Fragmentation; Not having a single implementation for a given feature means extensions that depend on a feature have to pick a specific implementation to augment. Over time data-structures and types will be standardized into Rasa's core to help alleviate this. . While highly experimental, I've found the current API to be quite expressive and adaptable;
src/Rasa/Ext.hs view
@@ -25,15 +25,20 @@ -- extensons do what they need to do. Read more here: 'Action', 'BufAction'. -- -- To sum it all up, Here's an example of a simple logging extension that--- simply writes each event to a file.+-- simply writes each keypress to a file. --+-- > logKeypress :: Keypress -> Action ()+-- > logKeypress (Keypress char _) = liftIO $ appendFile "logs" ("You pressed " ++ [char] ++ "\n")+-- > -- > logger :: Scheduler () -- > logger = do -- > onInit $ liftIO $ writeFile "logs" "==Logs==\n"--- > onEvent $ do--- > evts <- use events--- > mapM_ (liftIO . appendFile "logs" . (++ "\n") . show) evts+-- > eventListener logKeypress -- > onExit $ liftIO $ appendFile "logs" "==Done=="+--+-- Check out this tutorial on building extensions, it's also just a great way to learn+-- how the editor works: <https://github.com/ChrisPenner/rasa/blob/master/docs/Building-An-Extension.md Building an+-- Extension>. ---------------------------------------------------------------------------- module Rasa.Ext