Closed meck closed 2 years ago
Oh, null-ls looks neat, would you prefer having both the bytespan as well as line/col info? Or would you say bytespan data is useless?
For this use case line/col is prob preferable as it would end up calling something likenvim_buf_set_text({buffer}, {start_row}, {start_col}, {end_row},{end_col}, {replacement})
null-sp is a good stopgap, I guess the proper thing would be to integrate with nix LSP
The latest release improves JSON outputs:
{
"file": "../tests/c.nix",
"report": [
{
"note": "Assignment instead of inherit",
"code": 3,
"diagnostics": [
{
"at": {
"from": {
"line": 11,
"column": 3
},
"to": {
"line": 11,
"column": 13
}
},
"message": "This assignment is better written with `inherit`",
"suggestion": {
"at": {
"from": {
"line": 11,
"column": 3
},
"to": {
"line": 11,
"column": 13
}
},
"fix": "inherit foo;"
}
}
]
}
]
}
at
now includes an object with from
and to
, which in turn include line
and column
info. Hope that works!
FYI, the config for null-ls is available if you want to add a note in the docs.
Thank you! I will add a section about editor integrations to the readme, soon.
Nice tool! I was trying to integrate with null-ls using the json output, however the location output is a bit hard to parse it seems to be character position, an additional row/col output would be nice.