1 posts
Custom 4Coder
Edited by tkjone on
Thank you Allen (and all other parties involved) for making 4Coder happen. Awesome work!

C++ is a hobby language while my days are spent coding in Clojure (a lisp). In order to switch over to 4Coder during my day job I would need to build out the following features through the customization layer:


- syntax highlighting
- parinfer (https://shaunlebron.github.io/parinfer/)

Nice to Have

- in-editor repl/evalutation (https://atom.io/packages/proto-repl)
- jump to function

My question is how many of the above features could I achieve through the customization layer (My OS is macos)? If these are possible, which of the default customization example code should I study?

For further context, I currently have a customization layer setup. I just want to make sure that I don't go too far with customization without understanding the expected capabilities.
Simon Anciaux
1092 posts
Custom 4Coder
Syntax highlighting: You can use the render caller hook to highlight what you want (4coder_default_hooks.h, default_render_caller function). But if you want to highlight function names, variable names ... you'll need to have or implement a Clojure parser.

Parinfer: seems to only be adding characters (parenthesis, curly brackets...) and spaces so it should be possible to implement. (4coder_auto_indent.cpp, auto_tab_range function).

in-editor repl/evalutation: there is no facilities for that kind of thing, but since it's C++ I believe you could call os functions to open a window and do whatever you want in there.

Jump to function: you'd need to parse Clojure yourself to do that. Another way is to use 4coder text search/lister function. You can make a wraper to search for "defn name" (if that's how you define a function in clojure, I actually have no idea).