Comments (2)
This is good feedback; I'll have to adjust the docs to make this clearer. At the moment, setting values in the quickfix relies on having a "diagnostics" field on the result object, which you would typically set using an output parser (see the docs on parsing output). In your example, you're running the command, nothing is parsing the output, then you have two components looking for
diagnostics
, but that value hasn't been set. All this assumes that you want to extract certain lines as build errors, warnings, or similar.If you instead want to dump all output into the quickfix, have a look at #4. It has a draft API for two ways to accomplish that. Feedback is welcome (encouraged, even). I have been and will be super busy for some weeks (moving and other life events), but I'll be cleaning up that API and merging it as soon as I am able.
Thanks a lot Steve! With your inspiration I managed to do what I wanted to do (which is an amazing thing to be able to do!!!!).
For posterity:
overseer.register_template({
name = "piobuild",
builder = function(params)
return {
cmd = {'pio'},
args = {"run", "--verbose"},
name = "piobuild",
cwd = "",
env = {},
components = {
"default",
{"on_output_parse", parser = {
-- Put the parser results into the 'diagnostics' field on the task result
diagnostics = {
-- Extract fields using lua patterns
{
"extract",
"^([^%s].+):(%d+):(%d+): (.+)$",
"filename",
"lnum",
"col",
"text"
},
}
}},
"on_result_diagnostics",
{"on_result_diagnostics_quickfix", {
open = true
}}
},
metadata = {},
}
end,
desc = "Build a platformio project",
tags = {overseer.TAG.BUILD},
params = { },
priority = 50,
condition = {
filetype = {"c", "cpp", "ino", "h", "hpp", "ini"},
callback = function(search)
return isdir(search.dir .. "/.pio")
end
},
})
from overseer.nvim.
This is good feedback; I'll have to adjust the docs to make this clearer. At the moment, setting values in the quickfix relies on having a "diagnostics" field on the result object, which you would typically set using an output parser (see the docs on parsing output). In your example, you're running the command, nothing is parsing the output, then you have two components looking for diagnostics
, but that value hasn't been set. All this assumes that you want to extract certain lines as build errors, warnings, or similar.
If you instead want to dump all output into the quickfix, have a look at #4. It has a draft API for two ways to accomplish that. Feedback is welcome (encouraged, even). I have been and will be super busy for some weeks (moving and other life events), but I'll be cleaning up that API and merging it as soon as I am able.
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 HOT 1
- 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.