diff options
| -rw-r--r-- | Cargo.toml | 4 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | src/lib.rs | 6 |
3 files changed, 9 insertions, 3 deletions
@@ -22,6 +22,10 @@ two-face = { version = "0.4", default-features = false, features = [ git = "https://github.com/pml68/iced" branch = "feat/rehighlight-on-redraw" +[dev-dependencies.iced] +git = "https://github.com/pml68/iced" +branch = "feat/rehighlight-on-redraw" + [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"] all-features = true @@ -1,5 +1,7 @@ # iced_custom_highlighter +[](https://builds.sr.ht/~pml68/iced_custom_highlighter) + A custom syntax highlighter for iced. It uses the colors from your app's Theme, based on a styling method (like `default_style`) @@ -12,7 +12,7 @@ //! #[derive(Default)] //! struct State { //! content: text_editor::Content, -//! theme: Theme, +//! theme: Option<Theme>, //! } //! //! #[derive(Debug, Clone)] @@ -34,7 +34,7 @@ //! ) //! .push(pick_list( //! Theme::ALL, -//! Some(state.theme), +//! state.theme.clone(), //! Message::ChangeTheme, //! )) //! .into() @@ -47,7 +47,7 @@ //! } //! //! Message::ChangeTheme(theme) => { -//! state.theme = theme; +//! state.theme = Some(theme); //! } //! } //! } |
