Commit log

580bad2 Get a basic end-to-end test for rust-analyzer integration working

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>

Antonio Scandurra , Nathan Sobo , and Max Brunsfeld created

9759f9e Uncomment script/bundle lines

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Antonio Scandurra and Nathan Sobo created

ab4f90a Get language and project compiling

Nathan Sobo created

7105589 Don't send notifications or requests until LSP is initialized

Antonio Scandurra created

59ed535 Implement a more robust way of locating rust-analyzer

Click to expand commit body
When bundled, we will retrieve it out of the `Resources` folder.
Locally, we're expected to run `script/download-rust-analyzer` and
put `vendor/bin` in our $PATH.

Antonio Scandurra created

60a8e74 Get buffer compiling with new SelectionSets based on AnchorRangeMap

Click to expand commit body
One test is failing however.

Nathan Sobo created

6ba4af3 WIP: Start converting SelectionSet to use AnchorRangeMap

Nathan Sobo created

3ae5ba0 Implement TryFrom<proto::SelectionSet> on SelectionSet

Click to expand commit body
More prep work for changing the selection set representation.

Nathan Sobo created

401bdf0 Simplify protocol messages related to selection sets

Click to expand commit body
This prepares the way to switch to using AnchorRangeMaps to store and transmit selection sets.

Nathan Sobo created

087ff28 Move SelectionSet and Into impl to selection module

Nathan Sobo created

715faaa WIP

Antonio Scandurra created

2c6aeae Start on integrating rust-analyzer

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>

Antonio Scandurra , Nathan Sobo , and Max Brunsfeld created

559774d Merge pull request #213 from zed-industries/language-buffer

Click to expand commit body
Extract Buffer's language-aware behavior into a new `language` crate

Max Brunsfeld created

282195b Assign new file handles on buffers when their files change on disk

Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld , Antonio Scandurra , and Nathan Sobo created

eb9d7c8 Update buffer's saved mtime when file is reloaded after on-disk change

Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld , Antonio Scandurra , and Nathan Sobo created

eea0f35 Rename TextBuffer back to Buffer

Max Brunsfeld created

37eae2b Remove unnecessary dependencies in buffer and language crates

Max Brunsfeld created

81a85e9 Extract a language crate

Max Brunsfeld created

cdb268e Re-enable randomized concurrent edits test

Max Brunsfeld created

30e2e20 Extract a TextBuffer from Buffer, which has no tree or file

Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld , Antonio Scandurra , and Nathan Sobo created

76774d6 Merge pull request #205 from zed-industries/autoindent

Click to expand commit body
Autoindent

Nathan Sobo created

5558d55 Insert an extra newline between brackets

Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>

Nathan Sobo , Antonio Scandurra , and Max Brunsfeld created

2286a94 Make light collab cursor not yellow for Nathan ;)

Nate Butler created

561857f Restore all active selections when undoing/redoing autoindent

Click to expand commit body
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.

Nathan Sobo created

47372e7 Move selections explicitly when applying autoindents

Max Brunsfeld created

63e775e Add unit tests for selective indentation adjustment

Max Brunsfeld created

6dc9d3a Move buffer tests into their own file

Max Brunsfeld created

53f1078 Ensure that autoindent task yields frequently to respect cancellation

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld and Nathan Sobo created

28ffd75 WIP: Determine autoindents asynchronously

Click to expand commit body
We still need to insert yield points in `compute_autoindents`.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Antonio Scandurra and Nathan Sobo created

7f5d454 Fix creation of anchors for the inserted portion of an edit

Antonio Scandurra created

b43c780 Always use `seek_forward` when resolving anchors

Antonio Scandurra created

6531df2 Improve auto-indenting of inserted lines

Click to expand commit body
Still not working totally correctly with our new approach, but getting closer.

Nathan Sobo created

e78a564 Start on new way of comparing old and new indent suggestions

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld and Nathan Sobo created

b85ae89 Extend Rust where clauses past their final newline for indentation

Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>

Nathan Sobo and Antonio Scandurra created

810315e Don't request auto-indent if there is no language assigned on the buffer

Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>

Nathan Sobo and Antonio Scandurra created

b468014 Unconditionally preserve indentation when inserting newlines

Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>

Nathan Sobo and Antonio Scandurra created

c60bc00 :lipstick:

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Antonio Scandurra and Nathan Sobo created

f66b522 Cancel out outdents and indents referring to the previous row

Antonio Scandurra created

18e5d75 Bias the start of an autoindent request towards the right for new text

Click to expand commit body
When a newline is inserted, this prevents the request from including
the line on which the newline got inserted.

Antonio Scandurra created

451f0e7 Replace Buffer::request_autoindent API with ::edit_with_autoindent

Click to expand commit body
When computing the "previous autoindent suggestion", we can't just
use the old tree and the current text. We need to find out what the
suggestion would have been before we made any changes.

Max Brunsfeld created

c0a75ab Preserve indentation for lines that are both indented and outdented

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld and Nathan Sobo created

d770255 Remove no-longer-used `dirty` field on `buffer::SyntaxTree`

Click to expand commit body
This became unnecessary when we reworked our reparsing logic
to block from 1ms on each parse.

Max Brunsfeld created

b5d3ffb Fix collection of row ranges in Buffer::perform_autoindent

Max Brunsfeld created

2f29538 Implement selective auto-indent by comparing old and new suggestions

Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>

Max Brunsfeld and Antonio Scandurra created

54932a8 WIP

Click to expand commit body
Co-Authored-By: Max Brunsfeld <max@zed.dev>

Antonio Scandurra and Max Brunsfeld created

2018537 Introduce a `Tab` action to indent line or insert soft tabs

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Antonio Scandurra and Nathan Sobo created

d36805c Don't push empty transactions onto the undo stack

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Antonio Scandurra and Nathan Sobo created

77af9ef Add more rust indent nodes

Max Brunsfeld created

add1467 Generalize strategy for processing indentation ranges

Click to expand commit body
* Take into account the ranges' start and end columns, not just the rows
* Generalize the approach to dedenting

Max Brunsfeld created

b83b4ad Start work on a Buffer API for requesting autoindent on the next parse

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Max Brunsfeld and Nathan Sobo created