helix icon indicating copy to clipboard operation
helix copied to clipboard

compilation-mode or vim :make

Open darrigu opened this issue 3 years ago • 3 comments

Idea

Have an emacs-like compilation-mode or a :make command like in vim (we should change the make command)

darrigu avatar Jul 01 '22 12:07 darrigu

This is too young to consider integrating any time soon but Build Server Protocol (BSP) looks like a possible way to support this similar to LSP/DAP. From what I can tell, it's primarily meant to help the Language Server but editors can be clients as well.

the-mikedavis avatar Jul 01 '22 14:07 the-mikedavis

Please

Hazielf avatar Jun 15 '25 23:06 Hazielf

This would be a gamechanger for me

Hazielf avatar Jun 16 '25 03:06 Hazielf

Build Server Protocol support would be huge for me as well. Bazel is a popular build tool, and BSP support would let me have error-underlines in Bazel projects that are incompatible with the LSPs for whatever languages the projects use.

sepiatonal avatar Jun 21 '25 21:06 sepiatonal

It still seems that BSP is immature. Their implementations page only lists servers for JVM languages and an inactive repo for working with Rust.

I think it would be premature to select a solution before it is shown to work broadly as is the case with tree-sitter and LSP.

A good measure of maturity, in my opinion, is if the solution can integrate with Bazel, make, cmake, and a good handful of languages that use individual build tools, such as Rust, Go, and Haskell.

CalebLarsen avatar Jun 24 '25 22:06 CalebLarsen

I presume the BSP solution would only work for build tools that support it, but that rules out environments where there is only a small build tool that won't add support for it, or none at all. For example: command runners, script-based builds and one-line build commands. In these cases, the only solution is what Emacs does: parsing the build output with Regex. This might not be as bad as it first sounds, especially since many languages use the "Unix" style of error messages. For reference, the Emacs compilation error regex list has 65 entries in total, which is not completely unreasonable to implement in the first place, but many of them can be dropped, added later, added through configuration, etc...

diniamo avatar Aug 06 '25 15:08 diniamo

I've been working on a prototype of how something like a make command could be implemented, its still pretty basic and for now only supports gcc/clang output formatting, its not done using regex, but i dont think it would be really hard to switch to regex based parsing

for now it works like this :make --format clang your-command

it then parses the ouput and puts it in a picker list i also plan to implement a lsp diagnostic like display for the errors from the list

heres the repo https://github.com/szulf/helix/tree/make-list

(its entirely possible that this code is shit, since im a junior, and have almost no rust experience)

szulf avatar Aug 21 '25 13:08 szulf