Dax89 / automaton.nvim

VSCode-Like Workspace Configuration Manager
MIT License
36 stars 3 forks source link

build task for quick fix list #8

Closed lobneroO closed 2 months ago

lobneroO commented 2 months ago

Sorry about opening 99% of your issues :)

I am just getting into the quickfix list. It's super useful to jump around it when having compile errors, so I'd like to start using it. From what I can see, there is a pattern in the gcc template, but when programming in Rust I do not really need that; neovim knows cargo as a compiler type. So is there a way to set ":compiler cargo" and pipe the build output to the quickfix list?

Dax89 commented 2 months ago

Sorry about opening 99% of your issues :)

Don't worry!

I am just getting into the quickfix list. It's super useful to jump around it when having compile errors, so I'd like to start using it. From what I can see, there is a pattern in the gcc template, but when programming in Rust I do not really need that; neovim knows cargo as a compiler type. So is there a way to set ":compiler cargo" and pipe the build output to the quickfix list?

Nice, I didn't know this command! Yes I can add that, it will be something like:

{
  ...
  compiler: "cargo", // or every value supported by :command
  ...
}

PS: I've noticed that there is also gcc, so I can remove the custom pattern!

Dax89 commented 2 months ago

I have added the compiler option, let me know if it works!

lobneroO commented 2 months ago

Quickfix list works like a charm, thank you very much. I noticed there is no colored output when building - I'm not sure there was some before, but I think so. That may also stem from my setup though, as before it was a terminal giving output and now it's the quickfix list I guess?

Dax89 commented 2 months ago

It depends, terminal mode have the same color like if you are running the command from...a terminal.

You can have both modes, it depends on what you need. The default mode il terminal, if you want the output in a quickfix list add quickfix: true

lobneroO commented 2 months ago

I have that quickfix: true part, which is what I meant that it works. It just doesn't display the output colored. However, calling :copen opens the quickfix list with coloured output. If I have seen this correctly, that's exactly the method automaton calls to open the quick fix list, so I don't know what's up there. Either way, you added support as requested, so thanks again :)