Commit Graph
372 Commits
Author SHA1 Message Date
Nate Butler df00aeb3b4 Add job post to Zed.dev 2021-12-23 23:22:57 -05:00
Nathan Sobo 3dac439643 Add an endpoint for creating an access token for a GitHub login 2021-12-21 13:05:32 -07:00
Nathan Sobo 24c14a15b1 Add the fetching of user JSON by github login with a token header 2021-12-19 09:43:13 -07:00
Nathan Sobo 0f475ebe18 Relocate admin routes to make room for API
I want to use the top-level /users route for the API that we'll access from the front-end site running on Vercel, and this is the easiest way to make space. Eventually we won't have admin pages, but I want to be additive for now.
2021-12-19 09:06:57 -07:00
Nathan Sobo d831c18326 Fix journal format strings 2021-12-18 12:15:07 -07:00
Nathan Sobo 051c574744 Pad single-digit months, days, and minutes with a leading zero 2021-12-18 11:11:04 -07:00
Nathan Sobo 0ddef7d526 Fix warnings and tests 2021-12-18 11:06:07 -07:00
Nathan Sobo 0fdc955732 Insert a time heading when creating a journal entry 2021-12-18 10:38:54 -07:00
Nathan Sobo 86eb1a155f Return item handles when opening items
This will support interacting with the opened item. Although I think I should probably return the ItemView rather than the Item. Next commit.
2021-12-18 08:26:57 -07:00
Nathan Sobo b9a83e5ade Add journal crate and move supporting logic into workspace crate
I needed to interact with the workspace to open a file from the journal crate, so I moved a bunch of logic out of main related to opening new workspaces and paths.
2021-12-18 08:12:59 -07:00
Nathan Sobo 712552cfa3 Halt keystroke dispatch immediately when we call a global action handler
Someday, we may want to define a global action context that allows us to propagate the action, but this isn't currently supported. Previous to this commit, we were invoking the same global action handler multiple times, once for each view in the responder chain.
2021-12-18 08:12:08 -07:00
Max Brunsfeld 8a49e9b98d Don't pass GH auth header when following redirects for release assets 2021-12-07 12:34:55 -08:00
Max Brunsfeld df4e452e28 Add tree-sitter-markdown, set up simple markdown higlighting 2021-12-05 21:37:31 -08:00
Max Brunsfeld f831277317 Upgrade tree-sitter to 0.20.1 2021-12-05 21:37:08 -08:00
Antonio Scandurra 0ad6b0c1f6 Use 16-bit float to store path windings
Previously, we were using a normalized 8-bit unsigned integer which forced us
to represent each increment of the winding number as a fraction of the max
value (1 / 255) which we would then add up using additive alpha blending.

This had three major drawbacks:

- The max winding number could not be greater than 255.
- Adding up (1 / 255) several times could result in a loss of precision.
- Due to also computing anti-aliasing as a fractional winding number, we had to
  reduce the max winding number to 32. This was still not good enough because
  we would multiply a fractional value with `1 / 32`, thus introducing more and
  more loss of precision.

This commit changes the texture type to an `f16` which doesn't require the
division by 255 and enables greater precision in the computation of the
anti-aliased parts of a curve. Note how this also removes the limitation of 255
windings at most per curve. The tradeoff is paying twice as much memory for
storing the texture, but that seems totally valid to achieve rendering accuracy.

Note that this kind of texture should be compatible with WebGL2 once we start
working on a web version of Zed.
2021-12-05 11:17:26 +01:00
Antonio ScandurraandNathan Sobo 102c1ec10d Clear pending keystrokes after dispatching an action
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-03 17:59:46 +01:00
Antonio ScandurraandNathan Sobo 4ca4313b49 In add_option_view, avoid bumping view's ref counts if view is None
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-03 17:52:39 +01:00
Nathan SoboandMax Brunsfeld 8e3630df62 Fix alignment of blocks adjacent to other blocks
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-01 17:58:44 -07:00
Nathan SoboandMax Brunsfeld 26ab95eae9 Get all tests passing with new blocks API
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-01 17:52:34 -07:00
Nathan SoboandMax Brunsfeld 26a4b9cca6 Use new BlockMap API to render diagnostics
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-01 17:22:40 -07:00
Max BrunsfeldandNathan Sobo cf3093aace Start work on generalizing the BlockMap to allow arbitrary elements
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-01 15:25:55 -08:00
Antonio ScandurraandNathan Sobo ca383df31e Avoid allocating a Patch just to check if there are no edits
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-01 16:47:04 +01:00
Antonio ScandurraandNathan Sobo 9fb5b384dc Use the new buffer subscription API to keep DisplayMap in sync
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-01 16:08:53 +01:00
Antonio ScandurraandNathan Sobo 137a1969bd Introduce text::Buffer::subscribe
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-01 15:55:05 +01:00
Antonio Scandurra 8bb9cb3953 Bump FoldMap's version in FoldMap::sync (and not in DisplayMap) 2021-12-01 12:05:02 +01:00
Antonio Scandurra f849b33b2d Don't produce invalid intermediate edits in Patch::compose 2021-12-01 11:44:33 +01:00
Max BrunsfeldandNathan Sobo 80a05508ba WIP - maintain foldmap with Buffer::edits_since
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-30 17:23:02 -08:00
Max Brunsfeld a0cb583fcb Use &Snapshot directly instead of impl Into<Content<'a>>
The text::Buffer and its snapshot already used the same representation
for their content, so we can just make Buffer deref to a Snapshot.
2021-11-30 13:32:11 -08:00
Nathan SoboandMax Brunsfeld 93322a4858 Name the root file of every crate after the crate to ease navigation
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-30 12:46:39 -07:00
Nathan SoboandMax Brunsfeld 087fe38e38 Fix warning
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-30 12:27:00 -07:00
Nathan SoboandMax Brunsfeld 811689d234 Rename buffer crate to text and name its entrypoint after the crate
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-30 12:26:12 -07:00
Nathan Sobo 71a08ab719 Bump versions in preparation for release 2021-11-30 09:43:51 -07:00
Nathan SoboandAntonio Scandurra 539698ec40 Avoid building up pending edits when soft wrapping is disabled
This was causing us to get slower over time as we stacked up hundreds of thousands of pending edits whenever soft wrap was disabled.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-11-30 08:28:29 -07:00
Antonio Scandurra 11ab5ed3a7 Use display coordinates for the highlighted row in "go to line" 2021-11-30 11:40:53 +01:00
Nathan SoboandMax Brunsfeld b1680df715 Fix randomized test failures by waiting for client_b to be added to worktree_a
We perform an async fetch of client_b's user data on worktree_a, which ends up holding a handle that prevents worktree_a from being released later in the test. By waiting for this fetch to finish before proceeding, we can be sure worktree_a actually gets released.

A more comprehensive fix would be some way to ensure we actually perform a release if an entity is fully dropped outside of an update cycle, but this fixes the issue for now.

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-11-29 16:48:09 -07:00
Max BrunsfeldandNathan Sobo 9ddae3c4d4 Introduce a collections crate w/ deterministic hashmap, hashset in tests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-29 15:22:45 -08:00
Max BrunsfeldandNathan Sobo d51c033b98 Consolidate pending effects logic into MutableAppContext::update
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-29 14:16:19 -08:00
Max BrunsfeldandNathan Sobo ca11c68a19 Introduce weak_handle methods on ModelContext and ViewContext
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-29 14:13:22 -08:00
Max Brunsfeld b70cc651e5 Paint highlighted lines correctly when horizontally scrolled 2021-11-29 11:28:43 -08:00
Antonio Scandurra ef4ae138e6 Fix test assertions 2021-11-29 18:15:03 +01:00
Antonio Scandurra 43583e1e80 Embed a plain text grammar and override settings for that too 2021-11-29 18:01:51 +01:00
Antonio ScandurraandNathan Sobo c9e4f7a7eb Introduce a new Grammar struct and allow it to be optional
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-29 17:38:59 +01:00
Antonio ScandurraandNathan Sobo 4e5db4815f Make settings fields that can be overridden private
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-11-29 17:08:43 +01:00
Antonio Scandurra e22acd4b44 Add a sample markdown grammar to honor the new soft wrap override 2021-11-29 09:39:16 +01:00
Antonio Scandurra f1ef633508 Allow overriding editor settings on a per-language basis 2021-11-29 09:39:13 +01:00
Nathan Sobo a3d5e9d9b8 Give avatar ribbons a rounded top 2021-11-28 14:04:31 -07:00
Nathan Sobo 19dd12e1c6 Associate collaborator avatars with "ribbons" corresponding to their cursor color 2021-11-28 13:25:05 -07:00
Nathan Sobo 30084531ed Tweak avatar sizes in titlebar 2021-11-28 12:41:46 -07:00
Nathan Sobo 03b114d593 Render active worktree collaborator avatars in the titlebar 2021-11-28 12:28:10 -07:00
Nathan Sobo f34b494fef Introduce a TestClient and associate it with a PeerId
This makes it easier to integration test peer interactions because now we know their PeerIds.
2021-11-27 12:33:25 -07:00