Comments (5)
Hmmm...this will take some more thought. We don't want to automatically add the on_output_quickfix
component to all the cargo tasks, but we would like to provide a default value for errorformat
if the component is added. We would also like to use that in the "set quickfix" action. I have the seeds of an idea for this; will play around with it and see if it works out.
from overseer.nvim.
How are you sending the output to the quickfix? The on_output_quickfix component has a parameter to customize the errorformat.
I also just added some better utilities for customizing the components of a template or template provider.
overseer.nvim/lua/overseer/init.lua
Lines 308 to 320 in d410e8f
All together, I think this should do what you want:
overseer.hook_template("cargo", function(task_defn, util)
util.add_component(task_defn, {
"on_output_quickfix",
errorformat = [[%Eerror: %\%%(aborting %\|could not compile%\)%\@!%m,]]
.. [[%Eerror[E%n]: %m,]]
.. [[%Inote: %m,]]
.. [[%Wwarning: %\%%(%.%# warning%\)%\@!%m,]]
.. [[%C %#--> %f:%l:%c,]]
.. [[%E left:%m,%C right:%m %f:%l:%c,%Z,]]
.. [[%.%#panicked at \'%m\'\, %f:%l:%c]]
})
end)
from overseer.nvim.
How are you sending the output to the quickfix?
I just used an action on task from Telescope.
All together, I think this should do what you want:
Thank you!
Should we hook this by default? Otherwise Cargo messages will have wrong filenames capture.
from overseer.nvim.
I've committed a feature for this. Tasks can now have a default_component_params
table:
overseer.nvim/lua/overseer/template/cargo.lua
Lines 17 to 28 in a40811d
These values will be used as the default for any params on any components that are both not supplied by the user and defined as default_from_task = true
overseer.nvim/lua/overseer/component/on_output_quickfix.lua
Lines 4 to 9 in a40811d
The "open output in quickfix" action will also search here for the errorformat to use.
from overseer.nvim.
Thank you a lot, a very convenient feature!
from overseer.nvim.
Related Issues (20)
- bug: `$eslint-stylish` triggers error HOT 2
- feature request: ToggleTerm strategy - go to previous window on terminal close
- feature request: Is there any way to create custom strategy?
- feature request: strategy to read output from a log file instead of stdout and stderr
- bug: The sidebar buffer doesn't render after opening overseer before job start HOT 2
- bug: The scroll doesn't work with the toggleterm strategy when opening a preview
- feature request: Hidden vscode tasks HOT 3
- bug: Wrong autocomplete parameters with enum type
- bug: Orchestrator strategy undefined behavior
- bug: open vsplit doesn't open (split) on the right HOT 1
- bug: telescope picker not shown but a fallback HOT 1
- feature request: [windows] remove (nonstandard?) escape sequences
- on_result_diagnostics_quickfix.set_empty_results not clearing diagnostics list
- -
- bug: Targets from included Makefile only visible on first execution HOT 1
- bug: shell escape single quote
- bug: How to keep in task log window
- feature request: OverseerToggle!top
- How to change select multi parameters( TAB is no effect)
- bug: ephemeral docker containers do not stop HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from overseer.nvim.