Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO #2

Open
30 of 39 tasks
ChrisPenner opened this issue Nov 19, 2016 · 12 comments
Open
30 of 39 tasks

TODO #2

ChrisPenner opened this issue Nov 19, 2016 · 12 comments

Comments

@ChrisPenner
Copy link
Owner

ChrisPenner commented Nov 19, 2016

  • ALL THE DOCS (Ongoing)
  • Switch Input Events to use adapter system
  • Switch Output Display to use adapter system
  • Add capacity for user plugins
  • Allow Plugins to maintain their own independent state
  • Add tests for TextLens
  • Switch to using Prisms for search-related TextLens' to signify whether a result was found.
  • Use monad transformers to allow modules to push side effects up to top level (like 'write file' or 'exit')
  • Modularize directive system so that editor core is "just another plugin"
  • Add 'Save'
  • Support Dependencies between plugins
  • Generalize cursor interface as an Extension
  • Expose API for setting text Attributes
  • Hide 'editor' and 'buffer' structures within Store and only expose direct-access lenses.
  • Allow extensions to maintain buffer-local state?
  • Somehow initialize extensions so they're not empty
  • Extension for multiple cursors
  • Improve interface for one-off scripts
  • Investigate Yi.Rope as possible text data-structure for performance.
  • Add logging modes
  • Extensible Event/Hook system
  • Asynchronous Action Execution
  • Windowing concepts (maybe using recursion-schemes)
  • Add buffer reference system
  • Allow embedding Actions in BufActions, but not the other way around.
  • Add Scrolling/Window support
  • Allow event listeners to be 'callbacks'
  • Per Buffer event/hook system
  • Expose API for expressing rendering preferences (I.E. Buffer size, location, or visibility)
  • Add ability for Buffer 'Views'
  • In-editor help interface
  • Extension for cmdline (like vim/emacs)
  • Extension to 'Shell out'
  • Extension to generalize notion of 'motions' and 'operators' over lenses.
  • Add 'Open'
  • Extension for syntax highlighting support (read Vim/emacs syntax files?)
  • Quick-fix style list
  • Add timer API for timer related tasks
  • Allow plugins to 'cancel' events
@ChrisPenner
Copy link
Owner Author

@Dtatoo Let me know when you have questions, I'm sure there'll be a few!

@noughtmare
Copy link

noughtmare commented Jan 7, 2017

Switch to DYRE??

I recommend against doing this (at least in the current state of dyre). Yi does this, but it has been a source of many problems that newcomers have. I wrote a post about it here.

My main points are:

  • Dyre doesn't handle exceptions smoothly.
  • Dyre doesn't rebuild with cabal or stack (i.e. you just have a single haskell source file as configuration file). This causes a lot of issues related to missing dependencies (like this one).
  • It is often unclear whether dyre has actually recompiled or not.

I think dyre is an awesome concept, but it still needs more development until its ready to use.

@ChrisPenner
Copy link
Owner Author

Those are some great points; thanks @noughtmare!

You're not the first to voice concerns about Dyre; and it definitely wasn't at the top of the priority list anyways. Looks like it's not a great idea, I'll remove it from the list!

I appreciate your feedback on this!

@clojj
Copy link
Contributor

clojj commented Jan 12, 2017

Hi,

Maybe for "Per Buffer event/hook system" or a separate TODO entry...

It would be nice to have some kind of BufferChanged event, indicating some deletion/insertion/.. in text-buffers.
That could be beneficial to any kind of analysis/parsing/lexing extension.

I'd love to help out, if you can point me to the relevant places...

@ChrisPenner
Copy link
Owner Author

Hey there @clojj! That sounds like a good idea!

My plan is to limit the API for editing buffers to the operations available using this [range lens]. If you're willing to work on it that would be a great place to start!

Continue the discussion here: #20 I've added some bullet points that should help you get started! Post there if you have any questions, or drop into our Gitter chat

@clojj
Copy link
Contributor

clojj commented Jan 12, 2017

Great.
btw. I am pondering what phase is best for colorizing/styling the buffer, after the lexer has tokenized.. ?

I would think that is beforeRender, or ?

@ChrisPenner
Copy link
Owner Author

ChrisPenner commented Jan 12, 2017

beforeRender is correct yup 😁; it's after text-changes have occurred, but before they're rendered to the screen. You can see how the cursors extension renders the cursor here .

This uses elements from rasa-ext-style to signal to renderers how to display other ranges.

We'll likely have to make a few small changes to the way styles are rendered to allow optimizing performance for things like syntax highlighting; having a bufferChanged event is going to be useful for that 😁

@clojj
Copy link
Contributor

clojj commented Jan 13, 2017

So here is the basic setup of what I am trying to do...
https://github.com/clojj/rasa/blob/master/rasa-example-config/app/Main.hs#L54

I'd like to setup the (Chan String, Chan [Located Token]) in onInit of course,
but storing this in ext (btw, is Rasa.Internal.Editor.ext the editor-global state ? opposed to bufExt) is not easy.

As far as it goes, it is working.. I get all tokens inside the beforeRender handler (lexHaskell)
Lots of todo's for sure :)

@clojj
Copy link
Contributor

clojj commented Jan 13, 2017

ok, easier than I thought
https://github.com/clojj/rasa/blob/master/rasa-example-config/app/Main.hs#L84

newtypes galore !

@ChrisPenner
Copy link
Owner Author

Let's continue the discussion here: #24; Looks like you've done a lot of work on this! I'll definitely read it over this weekend!

@jmatsushita
Copy link
Collaborator

jmatsushita commented Nov 7, 2018

@ChrisPenner Here are some possible new action items to sort through after our gitter pow-wow.

In order to introduce widgets for autocomplete, file browsing and so on, there seems to be a need to extend the widget functionality to render them elsewhere than at the top/bottom/left/right of a View.

  • Allow Widgets rendering to be:
    • floating (overlaid maybe above/below/right/left of a specific position in text?)
    • block (inserted/embedded inside a text block)

Seems that making the Widgets depend on a text position would allow to not leak the rendering abstractions. Does that work?

Also, work in progress on rasa-ext-syntax some questions come up about managing file types, language syntax, key maps per language and user configuration.

  • Allow Buffers to have types by introducing data BufTypeChanged bufType = BufTypeChanged
    • BufTypeChanged ReadOnlyBuffer for read-only buffers in rasa-ext-files (rasa -R example.txt)
    • BufTypeChanged (EditorBuffer languageType) for specifying syntax choice in rasa-ext-syntax. Allowing to make syntax modular by having for instance a markdown syntax extension listen to BufferTypeChanged (EditorBuffer MarkdownLanguage).
    • BufTypeChanged FileBrowser for a file browser in a new
  • Dispatch FileOpened FilePath SomeOtherUsefulStuff in rasa-ext-files
  • Introduce an extension (and probably some UserConfig a event to read user configuration in dhall for:
    • file type to language syntax mappings
    • file type to key bindings
    • key bindings

Should the BufTypeChanged type be introduced in Rasa.Internal.Events or in an extension? Should BufAdded be extended also to include the BufType in addition to the BufRef?

@ChrisPenner
Copy link
Owner Author

Great! I made issues for each of those and put them in a milestone 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants