Commit graph

38 commits

Author SHA1 Message Date
Piotr
a46e992396 add method to set syntax highlighting by file extension 2024-06-12 09:56:59 -06:00
Jeremy Soller
93a7df859a Allow for undefined buffer width and/or height, fixes #70 2024-06-12 09:14:56 -06:00
Pavel Strakhov
a3a6262e5d Add Edit::cursor_position 2024-06-10 10:39:58 -06:00
Pavel Strakhov
10ae9a9b16 Add an option to set selected text color 2024-06-10 10:15:09 -06:00
Jeremy Soller
3c94352f3f Support expanding tabs 2024-06-10 08:12:42 -06:00
Jeremy Soller
56812a8348 Make vertical scroll by pixels instead of layout lines 2024-06-10 08:05:27 -06:00
Jeremy Soller
0a11fb1045 Make Editor::buffer_ref accessible, rename lifetimes 2024-01-17 13:31:03 -07:00
Jeremy Soller
cbbf6f0d8f Allow Editor to use reference or Arc of Buffer 2024-01-17 13:31:03 -07:00
Jeremy Soller
ae030e9885 Move color and x_opt out of Cursor 2024-01-17 13:31:03 -07:00
Jeremy Soller
d0b4b4635e Refactor of scroll and shaping
- Scroll is identified by line index and layout index, instead of just
  layout index
- Shaping has the option to prune, where caches outside of the scroll
  view are cleared
- Syntax editor no longer requires layout of all lines, only of lines
  inside scroll
- BufferLine has a metadata field that can be used by other abstractions
  to know when text was changed
2024-01-17 13:31:03 -07:00
Jeremy Soller
b877f873df BufferLine: remove wrap from struct, as wrap is passed to layout 2024-01-17 13:31:03 -07:00
Jeremy Soller
c247e0527c Only apply attrs to range in syntect editor if it does not match default 2024-01-17 13:31:03 -07:00
Jeremy Soller
de6f2c7fbe
Editor: make delete_range and insert_at methods public 2023-12-05 10:04:50 -07:00
Jeremy Soller
cbd567d238
Support line selection 2023-11-28 10:42:50 -07:00
Jeremy Soller
7d21045b2f
Add primitive auto indent 2023-11-16 08:59:43 -07:00
Jeremy Soller
1207fd6d80
Edit: use u16 for tab_width 2023-11-16 08:38:48 -07:00
Jeremy Soller
5352fdee94
Undo/redo support in ViEditor 2023-11-13 13:31:06 -07:00
Jeremy Soller
7830f4107c
Enable external change tracking 2023-11-13 12:37:07 -07:00
Jeremy Soller
b3c5f14e47
Remove two-face (it can be added by user of library) 2023-11-13 10:42:03 -07:00
Jeremy Soller
e62fea5efd
SyntaxEditor: Support using two-face syntax definitions 2023-11-02 13:38:25 -06:00
Jeremy Soller
ac389d9eeb
SyntaxEditor: Allow retrieving syntax theme, optimize updates to theme 2023-11-02 12:55:45 -06:00
Jeremy Soller
241c4ca357
Buffer::set_rich_text: Only add attrs if they don't match the defaults 2023-11-02 10:24:28 -06:00
Jeremy Soller
6196d72266
Syntax highlight on demand 2023-11-02 09:57:24 -06:00
Jeremy Soller
7855dce09d
Add indent action and tab width 2023-11-01 13:31:53 -06:00
Héctor Ramón Jiménez
6235716beb
Make Edit::copy_selection immutable 2023-09-16 16:18:56 +02:00
John Nunley
440d24ffa0
Add more Debug implementations
I generally like to implement Debug on these kind of types.
2023-07-07 21:44:21 -07:00
0hypercube
bc1a327371 Add light syntax highligher to libcosmic example 2023-06-25 11:58:10 +01:00
Dima Rets
6dba04df08 allow setting cursor 2023-06-10 12:53:34 +01:00
Héctor Ramón Jiménez
a5c548b12f
Fix syntect module 2023-04-21 20:29:56 +02:00
Edgar Geier
3331f41d7a
Improve documentation 2023-03-12 10:39:57 +01:00
Edgar Geier
384c5c1fdc
Remove Mutex from FontSystem 2023-03-12 10:39:56 +01:00
Edgar Geier
057b5b6fa9
Extract borrow of FontSystem from Buffer 2023-03-12 10:39:54 +01:00
Jeremy Soller
8cc988d374 Run cargo fmt 2023-01-04 20:03:03 -07:00
Jeremy Soller
00bc4d1e88 Fix tests 2023-01-04 20:02:00 -07:00
Hojjat
b9fef72f76 Added an enum with the option for "No Wraping" 2022-12-20 13:38:34 -07:00
Hojjat
cd64388451 Added BiDi example to demonstrate reordering works
and disabled `wrap simple` since it's not working properly.
2022-12-02 08:30:16 -07:00
Jeremy Soller
2342bf0eae
Add more vi commands 2022-11-21 15:49:12 -07:00
Jeremy Soller
ee54e7626b
Vi-style editor and other editor improvements (#40)
* WIP VI wrapper for editor

* WIP: block cursor

* Create Edit trait, run CI on all feature options

* Add prints describing build steps to ci.sh

* Custom rendering for Vi editor

* Clippy fixes

* More clippy fixes

* Show clippy results in CI

* Fix for Redox

* Fix clippy lint

* Add vi feature to enable vi-style editor

* Add escape to libcosmic text box
2022-11-15 12:26:59 -07:00
Renamed from src/syntect.rs (Browse further)