Live data from Hacker News

Ask HN: What code editors or IDEs are easily scriptable?

news.ycombinator.com

31–40 of 68 posts

Re: Ask HN: What code editors or IDEs are easily scriptable?

#31
https://RTCode.io is built on Monaco! It's incredibly easy to script!

0. Go to https://RTCode.io/x/

1. Type a number

2. Select the number

3. Press ↑/↓ keys

3. Open the context menu (right click/long tap)

4. Mess with Selections: or Eval menu items

Claude has helped with the selection actions!

See https://diff.rt.ht which is also built on Monaco!

For more advanced stuff visit: https://go.rt.ht and select the Backend or PDF starters and hover over the attributes!

Feel free to view the sources to see how I script it!

Re: Ask HN: What code editors or IDEs are easily scriptable?

#32
post #20

IMO, the language is only a small part of a deeper relationship with your IDE. The IDE needs a good debugger, a good introspection system, and good hooks to modify things (ideally anything). Emacs meets this criteria, but few others do. This is why there is a living corpus of 40+ year old elisp that can be drawn upon for functionality and inspiration.

Also ChatGPT is pretty good at writing elisp.

Re: Ask HN: What code editors or IDEs are easily scriptable?

#33
You shouldn't dismiss Lua outright, it's a language designed specifically for embedding, there's practically nothing to learn to begin using it productively.

See this presentation by a core Neovim maintainer that explains why Lua was chosen https://www.youtube.com/watch?v=IP3J56sKtn0.

See also http://lua-users.org/wiki/MechanismNotPolicy to understand Lua's core design.

Re: Ask HN: What code editors or IDEs are easily scriptable?

#34
For myself the attraction of the unix operating environment(aka the userland) is that now your operating system is your ide.

Now admittedly this is never as sleek or uniform as an actual Integrated Development Environment, but the extensibility, well the extensibility is unmatched. you can even have an ide in your ide.

Re: Ask HN: What code editors or IDEs are easily scriptable?

#35
To add a few less popular options, I really liked working with TextAdept. Almost the whole API is accessible via Lua and you can script the heck out of that editor.

The challenge with that is that you don't get a lot of items out of the box. The community is awesome though and the author of the project is very responsive in github.

There's also Lite XL, which is also a very hackable editor. Also hackable in Lua. The documentation for it is a bit lacking but one can jump into the code and start tweaking things in it.

There's also micro. This one also uses Lua for writing plugins and such. It's a terminal editor if that's something you are interested in.

Re: Ask HN: What code editors or IDEs are easily scriptable?

#36
Emacs ≥ VIM ≥ Neovim

Started on Emacs because that was what Prof required, after leaving school with a BS in CS, switched to VIM, years afterwards found a comfy place in Neovim managed in NixOS via Flakes & Home-Manager. A purely scriptable and declarative setup that can be reproduced on nearly any machine one might wish to work on. Scriptable interaction with Language Servers, Linters, Formatters and Debuggers in any language that is needed for work or fun (C, C++, Go, JavaScript, Lua, Python, Ruby, Rust, etc.)

Highly recommend.

Re: Ask HN: What code editors or IDEs are easily scriptable?

#37
post #6

Kakoune _barely_ has a scripting language. It has essentially a set of commands and some basic string substitution, one of which will let you drop to a shell (something akin to substitute this string with the result of evaluating its contents through bash). With this you can write your scripts in whatever language you like. My plugins are almost all in Rust, some are in bash.

The consequence of this is that kakoune forks for _everything_. In practice maybe this is fine but it seems wasteful

Re: Ask HN: What code editors or IDEs are easily scriptable?

#38
post #9

nvim has excellent lua scripting support.

OP said; "I'd prefer to use an everyday-language I work in for scripting, which rules out Vimscript, Lua or Lisp."

I'm a poor citizen of the internet today. Thanks for the callout, you're right.

Re: Ask HN: What code editors or IDEs are easily scriptable?

#39
post #2

Do VScode and Jetbrains's plug-ins /extensions satisfy your scripting needs? They're in JS and Java, I think.

For Jetbrains IDEs, I recommend using LivePlugin rather than building a full-blown plugin for every script: https://github.com/dkandalov/live-plugin

That's really awesome! As they support Groovy and Kotlin, they basically support most JVM languages too, so you can probably use this with Scala, Clojure etc.

I may give it a spin myself as I am pretty heavy user of IntelliJ.

By the way, I think Fleet, the new "Beta" editor by Jetbrains, is currently designing a custom plugin system to make it "nicer" to write plugins than for IntelliJ, but apparently it's not yet open for trials: https://www.jetbrains.com/help/fleet/managing-plugins.html

Re: Ask HN: What code editors or IDEs are easily scriptable?

#40
adding a few fun ones that I've used in the past:

TextAdept. The API is fully open to Lua and a bunch of stuff can be scripted in it. The author is super responsive on github and has a nice small welcoming community.

Lite XL is mostly written in Lua, less documentation than TextAdept but is not terribly hard to jump into the code and figure out how the editor works and modify it.

Micro uses Lua for plugins. It's a terminal only editor, which is a plus for some people, but still the mouse support is quite nice.

Post reply on HN