I'd prefer to use an everyday-language I work in for scripting, which rules out Vimscript, Lua or Lisp. I'd be most happy with any of Ruby, Python, Go or Rust. Ideas?
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.
https://github.com/orgs/neovim/repositories?type=all&q=Clien...
Emacs is a text manipulation environment, and it's incredibly powerful to be able to run any elisp code. In org-mode, I use plain lists and checkboxes often, and after inserting the checkbox, I always need to move my cursor 2 spaces to the right. Well, with Emacs and elisp, I can do that:
(defun my-org-toggle-checkbox-and-move-right ()
"Toggle checkbox and move cursor 2 spaces to the right."
(interactive)
(org-toggle-checkbox)
(forward-char 2))
;; Bind the function to a key if desired
;; (global-set-key (kbd "C-c t") 'my-org-toggle-checkbox-and-move-right)
Other examples: https://www.reddit.com/r/emacs/comments/1bgyq3y/wrote_my_fir... or https://blog.thomasheartman.com/posts/my-first-emacs-lisp or https://emacs.stackexchange.com/questions/54602/how-do-i-def...And of course, because your config is text/code you can version control it, which allows rollbacks if you make a mistake ;)
I used to think that it would be better to have a lot of scripting and automation built into my editor, but there are so many well-built, connect-able tools already available in a unix shell that it's usually easier to write scripts in that context, instead. There are often easy ways to pull the outputs of those scripts into your editor or use your editor as a thin, pass-thru layer to run shell scripts on certain selected bits of text in a file.
I think the best IDE scripting experience I know of right now is IntelliJ (or other Jetbrains IDEs) with the Live Plugin extension. You can write simple scripts in Kotlin or Groovy. They're similar langs but the latter is dynamically typed. And then you can just do things like register menu items, explore the language AST, edit buffers, trigger refactorings, access remote machines. Anything, really.
As your script gets too big, you just convert it to a 'real' plugin project with multiple files, can use libraries, etc.
Then you can upload it to the Marketplace so people can find it.
And if your plugin ends up being really good, Jetbrains run a monetization system so you can sell it easily. They handle all the billing, tax, licensing etc for you, so you can focus on your plugin.
It's pretty rad. That said, in years of working with IntelliJ I never felt a need to extend it for my own personal use. It's not like emacs where every user ends up with piles of elisp. The defaults are pretty good, and many features where in other IDEs you'd be forced to write a script can be done entirely via the GUI. For example if you want to define templates that auto-expand and where the cursor moves between 'slots', you can do that using a mini templating language without needing to do any coding. There's a thing called Structural Search & Replace which is similar - it lets you create templates that match against ASTs and do transforms on them.
That said, while I've not done so, it _is_ possible to write Neovim extensions in Python. Check out this project for details: https://github.com/neovim/pynvim
While there are obviously many editors out there these days, IMO the ubiquity of [n]vim and emacs make them strong leaders. Convincing me to use anything else would be difficult.
I love Neovim, and it fits my needs well - but my choosing it over emacs was largely arbitrary. Now I'm in a position where I understand Neovim very well but lack that knowledge of emacs. As far as I know they're on par with each other.
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.
Personally I use macros in an editor for "text manipulation", and drop to Python/sed/awk for "text processing". I don't find I have a need for anything in-between.
I'm still a happy camper on VSCode but if it ever begins to crumble/rot/overbloat (by subjective criteria), I'd hop onto that. Lua is (for my purposes here) no better/worse than JS/TS. Save for those darned 1-based array indexings!
LSP-capable too, last I heard, else it'd be a non-option for me in 2024. https://orbitalquark.github.io/textadept/
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!
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.
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.
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.
I will say that Lua is extremely easy to pick up, and as far as hacking on an IDE I think that simplicity might make it an ideal language.
VSCode is a joke, you can't use javascript, worse, you need to compile your scripts, and you need to restart the editor whenever you change your "scripts"