Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One thing I'd love to see, is a TUI editor that focuses on providing hooks for developers to build deeper integration with various frameworks into the editor and it's autocomplete.

This is something I've wanted back when I was doing professional PHP development, when life was still in black and white. I still reckon it would be useful today.

I started to build exactly that myself, in Nim, but got distracted building the editor itself and eventually moved on to other personal projects. Maybe I should revisit it.

An example, based on the current HN home page, would be htmx integration in HTML editing, that is aware of the rest of your project and how htmx works to give excellent, powerful autocomplete within your bindings. Maybe even have it be able to be aware of the backends route set!



> One thing I'd love to see, is a TUI editor that focuses on providing hooks for developers to build deeper integration with various frameworks into the editor and it's autocomplete.

But... Don't they already do that? I am a daily vim user and there is a million plugins that were created using those "hooks" you talk about. I guess that's the case with emacs too.

Just two days ago I jumped into a huge bazel project and needed a good way to navigate through 100s of files that are connected through @funny//labels/across/directories/and.files. By only reading vim's :help, I was able to write that 10lines of code which hooks into the existing "go-to-file" or "find-where-this-is-defined" functionality.

(In fact, after "implementing" this feature, I was wondering how I'd do this as a user (not as a plug in author) in any other editors.)


Vim and Emacs are the closest, but not quite what I had in mind either -- LSPs get closer, though have issues with mix-mode files (as does nearly every editor really). I have a design doc I wrote up somewhere, I should dig it out.

It was borne specifically out of my difficulty extending Vim to do what I was after when working with PHP frameworks!


Vim is amazing.


Consider taking a look at: https://orbitalquark.github.io/textadept/. It's a rather "old kid on the block" actually, it's quite minimal ("Relentlessly optimized for speed and minimalism over the years, the editor consists of less than 2000 lines of C code and less than 4000 lines of Lua code") and it is crazy extensible; actually in my experience trying it, I found it too much extensible - it was too easy for me to break it while trying to configure it. Anyway, IMO it's a project definitely worth taking a look at. (Note: if it's not immediately obvious from the website, it does have a terminal UI version.)


Indeed, Textadept was one of my go-to editors for this, and scripting it in Lua was fantastic! But again, it's not quite what I am after, and I'm obviously explaining it badly :)

Basically, I'd like the editor to understand the AST of the language(s, including mixed-language files, which is really hard) and be able to hook into parts of that AST to say "while this is a string, it's really this weird DSL that hooks into Javascript, so look for symbols here, here and here".

Its definitely possible to make Vim, Emacs and TA work this way, but its a lot more work than I had in mind, when I tried to extend them (well, not Emacs. It might be best at this, I'm just not a good emacs user) to achieve what I was after at the time, which was understanding the dependency injection annotation patterns from Symfony in PHP.

I think one could get pretty close with LSPs and the powerful AST parsers we have nowadays. Though doing it fast might be difficult!


See also: Lite, written in C and Lua https://news.ycombinator.com/item?id=23126458

I use the lite-xl fork https://lite-xl.com/


Shouldn't autocomplete be provided by LSP these days? It's an interoperable framework, so you can implement it just once for your preferred language/workflow and then just use it anywhere.


> One thing I'd love to see, is a TUI editor that focuses on providing hooks for developers to build deeper integration with various frameworks into the editor and it's autocomplete.

Neovim?


> One thing I'd love to see, is a TUI editor that focuses on providing hooks for developers to build deeper integration with various frameworks into the editor and it's autocomplete.

Sounds like emacs in text mode




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: