Johann150
8a0fc021bc
change error types ( #295 )
...
- move error to files module; removed the special error types from codespan-lsp
- use error type in codespan and codespan-lsp
- make dependency on codespan-reporting non-optional
2020-10-07 14:01:20 +02:00
Johann150
b2223d45b3
Make diagnostic locus point to the first primary label ( #260 )
2020-07-13 08:13:16 +10:00
Brendan Zabarauskas
26b44be9d4
Add notes to multifile examples
2020-04-28 18:44:02 +10:00
Brendan Zabarauskas
401b907902
Merge pull request #219 from brendanzab/svg-improvements
...
Svg generation improvements
2020-03-28 12:54:56 +11:00
Brendan Zabarauskas
b59ee9b85e
Compute height of SVG dynamically
2020-03-28 12:44:42 +11:00
Boomber
19c09dec1c
Update codespan-reporting/examples/reusable_diagnostic.rs
2020-03-26 07:18:14 +07:00
Boomber
92fc3518c2
Commit all other suggestions
...
I really need to learn how to do pull request
Co-Authored-By: Brendan Zabarauskas <bjzaba@yahoo.com.au >
2020-03-26 07:11:51 +07:00
Boomber
fa3d90957b
Grammar
...
Co-Authored-By: Brendan Zabarauskas <bjzaba@yahoo.com.au >
2020-03-26 07:09:00 +07:00
Boomber
68f9fe7d49
Change indentation
2020-03-26 06:27:47 +07:00
Boomber
67d9dde85e
Reusable Diagnostic Example
2020-03-26 06:17:06 +07:00
Brendan Zabarauskas
687d9cb67e
Implement a rudimentary escaper in svg example
...
Just for fun!
2020-03-25 12:19:57 +11:00
Brendan Zabarauskas
d116d39f3b
Fix formatting in example
2020-03-24 19:46:19 +11:00
Brendan Zabarauskas
5c5d4e84e0
Use "<repl>" as the file name in the calculator repl
2020-03-12 21:20:39 +11:00
Brendan Zabarauskas
edc204b3bd
Improve example documentation
2020-03-12 21:17:20 +11:00
Brendan Zabarauskas
3c0dacb35f
Rename readme preview example
2020-03-11 14:19:16 +11:00
Brendan Zabarauskas
ca07d8dac4
Style improvements
2020-03-10 20:10:39 +11:00
Brendan Zabarauskas
c3adc80f68
Add peg example
...
Adds an example using the peg parser generator crate
2020-03-10 20:06:46 +11:00
Brendan Zabarauskas
823a148839
Use anyhow::Result in examples
2020-03-10 18:50:33 +11:00
Brendan Zabarauskas
d8e08f4f24
Implement a custom file example
2020-03-10 16:32:44 +11:00
Brendan Zabarauskas
db92f88642
SVG preview cleanups
...
This removes the box shadow which was clipping wierdly, and makes the SVG size a bit less confusing. The width of the SVG is set to 882 in order to be consistent with Github’s content width.
2020-03-09 18:16:09 +11:00
Brendan Zabarauskas
21a2e61135
Add SVG sample to README
...
Closes #87
2020-03-09 17:42:11 +11:00
Brendan Zabarauskas
1e79e1b4e2
Minor improvements to multilabel rendering
...
Working towards #100 , this slightly cleans up the rendering of diagnostics with multiple labels.
2020-03-09 14:09:54 +11:00
Brendan Zabarauskas
82e0a495e8
Diagnostic API cleanups
2020-02-29 13:43:26 +11:00
Brendan Zabarauskas
8d2a2f29ae
Move file-related items into a submodule
2020-02-27 09:54:23 +11:00
Brendan Zabarauskas
3820b9535a
Add SimpleFile and SimpleFiles structs
...
This adds the `SimpleFile` and `SimpleFiles` structures to the `codespan_reporting` crate to get people started with their programming languages. It also inverts the dependency between `codespan` and `codespan_reporting`. That way users of `codespan_reporting` no longer have to depend on `codespan` if they don’t want to.
2020-02-26 21:42:19 +11:00
Brendan Zabarauskas
bd2d88f5a3
Improve type inference for Files::{add, update}
...
This removes the implicit conversions for the `Files::{add, update}` methods now that we parameterise `Files` by the source type (see #144 ).
2020-01-06 11:06:54 +11:00
Ryan Cumming
4fc78c102a
Update reporting & lsp crates for generic source
...
This ports `codespan-reporting` and `codespan-lsp` to use `Files`'s new
`Source` generic parameter.
2020-01-05 12:20:03 +11:00
Brendan Zabarauskas
55908f4541
Update structopt and unicode-segmentation
2019-12-18 10:40:47 +11:00
Brendan Zabarauskas
7abf867cb5
Rename ‘emitter’ module to ‘term’
2019-06-23 13:51:26 +10:00
Brendan Zabarauskas
a88874cac5
Use submodules rather than reexporting
2019-06-23 13:24:38 +10:00
Brendan Zabarauskas
5547d5cf31
Make example more succinct
2019-06-07 00:08:42 +10:00
Brendan Zabarauskas
d6e5f8f264
Break up emitter module
2019-06-06 16:50:01 +10:00
Brendan Zabarauskas
7faa830c82
Add additional notes to primary source section
...
Closes #74
2019-06-06 14:53:00 +10:00
Brendan Zabarauskas
4fa5b660db
Add case example to emitter
2019-06-06 14:23:22 +10:00
Brendan Zabarauskas
1504cedbe2
Add a multifile example and fix unicode width
...
Fixes #41
2019-06-06 12:40:26 +10:00
Brendan Zabarauskas
e139d7f872
Use unindent to clean up example
2019-06-06 11:26:14 +10:00
Brendan Zabarauskas
f9ef36d3fa
Rendering tweaks
...
It seems that the half-line box drawing characters aren’t as widely supported, so I’m avoiding this for now. Using a border style inspired by hedgehog: https://hedgehog.qa/article/haskell-state-machine .
2019-06-05 14:26:25 +10:00
Brendan Zabarauskas
eab3339b56
Make example error messages more like rustc’s
2019-06-04 18:57:38 +10:00
Brendan Zabarauskas
ea509a106e
Add range operator overload
2019-06-04 18:47:23 +10:00
Brendan Zabarauskas
066b015733
Remove filespan type
2019-06-04 18:39:10 +10:00
Brendan Zabarauskas
2992ed54dc
Use file id instead of global byte indices
2019-06-04 15:12:05 +10:00
Brendan Zabarauskas
f3741745f2
Rename CodeMap to Files
2019-06-01 23:26:38 +10:00
Brendan Zabarauskas
753200eb85
Rename FileMap to File
2019-06-01 23:23:53 +10:00
Brendan Zabarauskas
f87fcaa925
Make diagnostics look closer to what the LSP expects
2019-05-30 21:54:07 +10:00
Brendan Zabarauskas
aa11ccd2b0
Add color configuration
2019-05-30 13:51:29 +10:00
Markus Westerlind
e0d780c02d
Update the edition to 2018
2019-04-30 08:45:33 +02:00
Louis Pilfold
e78a1bf03d
Support multi-line diagnostics
...
Closes https://github.com/brendanzab/codespan/issues/23
2019-02-24 20:18:57 +00:00
Brendan Zabarauskas
d82bd9b64b
Run rustfmt
2018-11-29 12:35:21 +11:00
Gary Tierney
ed15cf85d4
Update emitter example to use a diagnostic code
2018-06-30 17:27:24 +01:00
Brendan Zabarauskas
bab3c2bf6b
Fix structopt application naming
2018-04-18 22:13:46 +10:00