Commit Graph
100 Commits
Author SHA1 Message Date
Nathan SoboandMax Brunsfeld 213aa36e1c WIP: Track down bugs with longest_row on wrap map
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-17 19:45:56 -07:00
Nathan SoboandMax Brunsfeld c5956a0363 Start at the end of the last transform when catching up to edits during wrapping
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-17 19:44:17 -07:00
Nathan SoboandMax Brunsfeld 18354c5e04 Hack in show next diagnostic command
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-16 16:51:38 -08:00
Nathan SoboandMax Brunsfeld 52a4c15c14 Eliminate non-highlighted chunks APIs
Now we only have a single code path for chunks across all layers, but highlighting is optional and controlled by a flag.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-16 16:51:38 -08:00
Nathan Sobo 7dd9b9539e WIP 2021-11-16 13:19:04 -07:00
Nathan SoboandMax Brunsfeld 092689ed56 WIP
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-16 13:10:06 -07:00
880b3f087f Insert empty isomorphic transforms on empty lines
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-11-16 12:14:00 -07:00
Nathan SoboandMax Brunsfeld 7d1ba6455b Implement BlockMapWriter::remove
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-15 17:09:26 -07:00
Nathan SoboandMax Brunsfeld 7b12c1c9e0 Enable soft wrap in randomized test of BlockMap
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-15 16:59:02 -07:00
Nathan SoboandMax Brunsfeld 862b988d56 Position blocks above/below buffer lines, even when the anchored line is soft-wrapped
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-15 16:45:51 -07:00
Nathan Sobo 3154ccbafe WIP 2021-11-14 16:24:40 -07:00
Nathan Sobo e644c0876e WIP: Start moving BlockMap to a 2d indexing scheme 2021-11-14 08:29:41 -07:00
Nathan Sobo 5832153712 Hack: Synthesize a newline before blocks below the last line of the buffer 2021-11-14 07:43:35 -07:00
Nathan Sobo b6e6dafca7 Account for trailing below blocks in BlockSnapshot::max_point 2021-11-13 19:50:42 -07:00
Nathan Sobo d6bc05cad0 Fix BlockMap unit test by skipping below blocks when advancing transforms 2021-11-13 18:19:21 -07:00
Nathan Sobo c9cbeafc05 Start on BlockSnapshot::clip_point
Not sure it works yet. Ran into another failure in the unit tests.
2021-11-13 17:44:09 -07:00
Nathan SoboandMax Brunsfeld e605a5ead2 Sketch an initial implementation for block_map::HighlightedChunks
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-12 14:51:25 -07:00
Nathan Sobo 068aa1adb3 WIP 2021-11-12 00:20:39 -07:00
Nathan Sobo 47ad9baebc wip 2021-11-12 00:03:47 -07:00
Nathan Sobo 84d789b8ac WIP 2021-11-11 23:28:45 -07:00
Nathan Sobo 118f137f18 WIP: Rework injection map to be focused solely on block injections 2021-11-10 20:49:06 -07:00
Nathan Sobo 0fff7d9166 WIP: Probably the wrong direction 2021-11-10 17:44:56 -07:00
Nathan Sobo 62ec105bff WIP 2021-11-10 14:00:51 -07:00
Nathan Sobo 2d6285a6e1 Start on a test for grouped diagnostics 2021-11-03 18:47:18 -06:00
Nathan SoboandMax Brunsfeld 44e0a00734 Only show the first line of diagnostic messages in the status bar
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-03 16:52:32 -06:00
Nathan Sobo 595dbd44ae Merge pull request #221 from zed-industries/status-bar-errors
Add a status bar that shows the cursor position and the error under the cursor
2021-11-03 15:46:33 -06:00
2c57703ad6 Explicitly shut down language servers when quitting the app
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-11-02 13:16:25 -06:00
Nathan Sobo 3228a55329 Fix test-support feature propagation for editor and workspace 2021-10-30 07:40:20 -06:00
Nathan SoboandMax Brunsfeld 9977248926 Adjust disk-based diagnostics based on edits since the last save
Still need to add tests... not sure if this is right yet.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-27 18:58:07 -06:00
Nathan Sobo 1a92a19954 Remove Anchor from protocol 2021-10-26 12:04:04 -06:00
Nathan Sobo ab4f90a20a Get language and project compiling 2021-10-25 09:26:36 -06:00
Nathan Sobo 60a8e74430 Get buffer compiling with new SelectionSets based on AnchorRangeMap
One test is failing however.
2021-10-22 14:12:16 -06:00
Nathan Sobo 6ba4af3e26 WIP: Start converting SelectionSet to use AnchorRangeMap 2021-10-22 13:19:19 -06:00
Nathan Sobo 3ae5ba09fd Implement TryFrom<proto::SelectionSet> on SelectionSet
More prep work for changing the selection set representation.
2021-10-22 12:46:02 -06:00
Nathan Sobo 401bdf0ba1 Simplify protocol messages related to selection sets
This prepares the way to switch to using AnchorRangeMaps to store and transmit selection sets.
2021-10-22 12:35:29 -06:00
Nathan Sobo 087ff28d0d Move SelectionSet and Into impl to selection module 2021-10-22 09:56:47 +02:00
Nathan Sobo 76774d6a3c Merge pull request #205 from zed-industries/autoindent
Autoindent
2021-10-19 14:23:04 +02:00
5558d553bb Insert an extra newline between brackets
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-19 13:17:16 +02:00
Nathan Sobo 561857fdf2 Restore all active selections when undoing/redoing autoindent
In the unlikely event that we're handling autoindent requests from multiple editors, we undo/redo selections from both editors. This is somewhat imperfect but probably good enough and easier than performing auto-indents on a per-editor basis.
2021-10-11 17:22:18 -06:00
Nathan Sobo 6531df2368 Improve auto-indenting of inserted lines
Still not working totally correctly with our new approach, but getting closer.
2021-10-08 22:07:01 -06:00
Nathan SoboandAntonio Scandurra b85ae89b7e Extend Rust where clauses past their final newline for indentation
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-10-08 10:32:15 -06:00
Nathan SoboandAntonio Scandurra 810315e04c Don't request auto-indent if there is no language assigned on the buffer
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-10-08 10:25:16 -06:00
Nathan SoboandAntonio Scandurra b4680144c5 Unconditionally preserve indentation when inserting newlines
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-10-08 10:25:00 -06:00
Nathan SoboandMax Brunsfeld d5b60ad124 Rename zrpc to rpc
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-04 13:28:00 -06:00
Nathan SoboandMax Brunsfeld fdfed3d7db Move all crates to a top-level crates folder
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-04 13:22:21 -06:00
Nathan SoboandMax Brunsfeld d768224182 Clean commented dependencies
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-04 13:15:45 -06:00
Nathan SoboandMax Brunsfeld c236b0828c Extract worktree, rpc_client, and util crates
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-04 13:07:35 -06:00
Nathan Sobo 5b75fcd0aa 💄 2021-10-02 19:46:07 -06:00
Nathan Sobo 6239b5ec60 Introduce ProjectPath and ProjectEntry structs
These replace tuples of (usize, Arc<Path>) and (usize, usize) respectively.
2021-10-02 19:39:04 -06:00
Nathan Sobo f00045544f Introduce a File trait object to buffer
This will remove the dependency of buffer on `worktree::File`
2021-10-02 19:01:29 -06:00
Nathan SoboandMax Brunsfeld 7728467790 Remove File::select_language
We want to make File a trait object defined in the buffer crate to decouple buffer from worktree, and this method is in the way.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 16:56:28 -07:00
Nathan SoboandMax Brunsfeld 90cc01a50a Select the language in Editor::save_as instead of Buffer::did_save
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 17:38:08 -06:00
Nathan SoboandMax Brunsfeld fcf6a9d58a Move Buffer::save_as to Editor
This removes buffer's dependency on Worktree, preparing the path for us to pull it into its own crate.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 17:32:22 -06:00
Nathan SoboandMax Brunsfeld 74a47a1384 Extract fuzzy module to its own crate
We still have a fuzzy module in the zed crate with some app-specific logic.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 17:08:19 -06:00
Nathan SoboandMax Brunsfeld 626fd2a2aa Fix warnings
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 16:45:24 -06:00
Nathan SoboandMax Brunsfeld 706925b781 Move fuzzy::match_paths to Project::match_paths
This prepares the way to extract the rest of fuzzy to its own crate.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 16:44:08 -06:00
Nathan SoboandMax Brunsfeld cf270b4dff Extract sum_tree to its own crate
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 15:55:21 -06:00
Nathan Sobo bd2d71a582 Merge pull request #194 from zed-industries/investigate-compile-time
Explore some ways to reduce Zed's compile time
2021-10-01 15:35:51 -06:00
Nathan SoboandMax Brunsfeld 514d1b66c3 Reduce generic instantiations in read/update_view/model
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 15:23:35 -06:00
Nathan Sobo 18a379f20c Scope the left and right bindings in the project panel 2021-09-30 10:50:58 -06:00
Nathan Sobo 99003ef2d1 Merge pull request #185 from zed-industries/site-v2
Update zed.dev to version 0.2.0
2021-09-28 16:00:48 -06:00
Nathan Sobo 5536bf6dcc Merge branch 'main' into site-v2 2021-09-28 15:33:44 -06:00
Nathan SoboandMax Brunsfeld bd7bf82d18 Load .gitignore files from the Fs object so we can test this with a FakeFs
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-28 13:21:19 -06:00
Nathan SoboandMax Brunsfeld dde782a006 Remove top/bottom padding from project panel
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-28 12:26:26 -06:00
Nathan SoboandMax Brunsfeld 14bc2c6857 Fix scrolling of project panel
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-28 12:26:15 -06:00
Nathan Sobo a3f45c0d3b Merge branch 'worktree-cursor' into project-browser 2021-09-28 12:13:47 -06:00
Nathan SoboandMax Brunsfeld 60799c5a7c 💄
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-28 12:03:11 -06:00
Nathan Sobo b018191d52 Merge pull request #186 from zed-industries/sum-tree-seek-target
Allow seeking SumTree cursor by multiple seek types per dimension
2021-09-28 11:56:32 -06:00
b9b08879f2 Get tests passing
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-09-28 11:23:09 -06:00
Nathan Sobo c3e8a5baa0 Unify all worktree traversal in a Traversal cursor/iterator
This uses our new ability to have a SeekTarget that's distinct from Dimension.
2021-09-27 21:58:22 -06:00
Nathan Sobo aa671f1041 Fix remaining compilation errors 2021-09-20 19:44:30 -06:00
Nathan Sobo e6a0a46476 Merge pull request #167 from zed-industries/fix-language-selection
Fix language selection when saving new buffers as a single-file worktree
2021-09-20 17:51:10 -07:00
Nathan SoboandMax Brunsfeld 4279451150 Fix language selection when saving new buffers as a single-file worktree
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-20 14:28:02 -06:00
Nathan Sobo edfed001de Merge pull request #159 from zed-industries/tabs-cleanup
Clean up tabs styling
2021-09-20 09:16:08 -07:00
Nathan Sobo 6f38cf5e51 Merge pull request #158 from zed-industries/highlight-new-files
Set the language on new buffers when they are saved
2021-09-20 09:15:58 -07:00
Nathan Sobo 1719d7da2a Suppress SVG loading errors in tests 2021-09-19 17:34:04 -07:00
Nathan Sobo 9e6c54ba0c Test language assignment when new buffers are saved 2021-09-19 17:33:46 -07:00
Nathan Sobo af99d0ef42 Attempt to assign a language when a new buffer is saved 2021-09-18 11:46:22 -07:00
Nathan Sobo c7e2b6dacb Expand the hit area area around tab close icons 2021-09-18 10:37:32 -07:00
Nathan Sobo 928779154e Tweak spacing so tab close buttons feel more balanced 2021-09-17 16:59:46 -07:00
Nathan Sobo b5c76ccc95 Render close icons on all tabs when tab bar is hovered 2021-09-17 16:45:09 -07:00
Nathan Sobo cab577406d Merge pull request #153 from zed-industries/only-blink-local-cursors
Only blink local cursors
2021-09-17 17:32:38 -06:00
Nathan Sobo 9ec3af66b1 Merge pull request #150 from zed-industries/fix-rpc-deadlock
Fix deadlock when handling incoming RPC messages
2021-09-17 17:26:15 -06:00
Nathan Sobo 9691267dc8 Only blink local cursors 2021-09-17 16:17:47 -07:00
Nathan Sobo ae9251a783 Merge pull request #149 from zed-industries/editor-style
Specify UI editor fonts via the theme instead of the settings
2021-09-17 17:12:19 -06:00
Nathan Sobo 9a9c8aec3f Fix deadlock when handling incoming RPC messages
We need to drop the lock on the rpc::ClientState when handling an incoming messages in case those message handlers attempt to interact with the client and grab the lock.
2021-09-17 16:12:03 -07:00
Nathan Sobo 42bf88b52a Base soft wrapping on TextStyle instead of Settings 2021-09-17 15:39:19 -07:00
Nathan Sobo 68039b9d48 Remove font_family and font_size from editor::Snapshot
We'll rely on the style struct instead.
2021-09-16 16:46:35 -06:00
Nathan Sobo f13a3544fc Move editor layout code into element
Now that most of the layout code is based on the EditorStyle struct, I think it makes more sense to put it in the element.
2021-09-16 16:43:43 -06:00
Nathan Sobo 4f0c9a3e31 Build workspace editor TextStyle from font fields in settings
We'll specify values in the theme but we'll only end up using the color for these editors.
2021-09-16 14:43:19 -06:00
Nathan Sobo a1f0693599 Specify full TextStyles in EditorStyle 2021-09-16 14:12:38 -06:00
Nathan Sobo c21b754c4c Make placeholder text style optional 2021-09-16 13:23:42 -06:00
Nathan Sobo 606aa148a6 Require a build_style callback to be passed to Editor on construction
We're going to use this to control the text style, so it really doesn't make sense to allow an editor to be constructed without it.
2021-09-16 13:20:12 -06:00
Nathan Sobo ad9712db70 Move EditorStyle into editor module 2021-09-16 12:26:18 -06:00
Nathan SoboandMax Brunsfeld 95ef70e4f4 Switch to new resolution system in ThemeRegistry
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-15 12:56:20 -06:00
Nathan SoboandAntonio Scandurra c2e9aa1b54 Render chat panel messages even if connection is lost
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-09-15 05:18:13 -06:00
Nathan SoboandAntonio Scandurra ec7c6f3f91 Always assign credentials on rpc::Client after connecting
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-09-15 05:13:05 -06:00
Nathan Sobo 7d59b2d861 Log panics when not attached to a pty
Hopefully this will give us better forensics if we panic in production.
2021-09-15 04:51:22 -06:00
Nathan Sobo 7e4d5b7d04 Clear cached credentials when establishing a websocket connection with an invalid token 2021-09-14 20:36:03 -06:00
Nathan SoboandMax Brunsfeld 4a9918979e WIP: Clear cached credentials if authentication fails
Still need to actually handle an HTTP response from the server indicating there was an invalid token.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-14 19:19:11 -06:00