Max Brunsfeld
05b161118c
Don't call git status when ignored files change
2023-07-21 17:05:42 -07:00
Max Brunsfeld
4bd415f2b6
Retrieve git statuses in one batch when scanning dirs
2023-07-21 13:50:54 -07:00
Kirill Bulatov
6349d90cac
Properly open project directories
2023-07-18 22:59:41 +03:00
Kirill Bulatov
9aeb970f09
Ignore empty hover contents, trim final hover label text
2023-07-18 22:53:44 +03:00
Piotr Osiewicz
8642a1d074
Remove dbg! calls
2023-07-17 13:03:57 +02:00
Piotr Osiewicz
11173b2199
Merge branch 'main' into piotr/z-2588-php
2023-07-17 11:47:08 +02:00
Piotr Osiewicz
dc557e1647
Add scaffolding of php language server
2023-07-17 11:43:32 +02:00
Max Brunsfeld
b9e0074793
Perform only one git statuses call when reloading a git repo after it changes
2023-07-14 14:29:22 -07:00
Max Brunsfeld
2e2333107a
Find the layer with the smallest enclosing node in language_scope_at
2023-07-14 09:11:56 -07:00
Kirill Bulatov
d164034198
Allow all completions with preresolved additional text edits ( #2711 )
...
Deals with https://github.com/zed-industries/community/issues/752
Deals with https://github.com/zed-industries/community/issues/566
Currently, when converting from LSP to Zed objects, completions with
non-empty `additional_text_edits` are filtered out.
Later, all other completions form a list and the selected one gets the
`Editor::confirm_completion` call, which always queries an LSP
completion resolve request to get the `additional_text_edits` field.
Otherwise, `additional_text_edits` field is ignored entirely for the
rest of the completion lifetime — and we always pass the selected
completion through the resolve request.
The PR changes the logic, removing the `additional_text_edits` filtering
and instead of resolving every completion, now we check for
`additional_text_edits` in the completion before resolving: resolve
happens only if the data is absent.
Generally, feels like resolve has to happen before the completion
selection: LSP servers may send us markdown for completion documentation
preview pop ups and similar extra info.
Also, the server may lack resolve capabilities entirely, always sending
the request seems dangerous.
For now, the PR does not attempt to change either.
Release Notes:
- Brings rust-analyzer's postfix completions and others completions with
preresolved additional text edits
2023-07-12 22:10:18 +03:00
Kirill Bulatov
0c7949bdee
Force resolve all completions, to ensure their edits are up-to-date
...
co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-12 21:10:01 +03:00
Kirill Bulatov
c732aa1617
Do not resolve completions if extra edits are available
2023-07-12 20:28:16 +03:00
Kirill Bulatov
6d96c6ef51
Draft the postfix completions support
2023-07-12 18:32:03 +03:00
KCaverly
297fa029e3
Merge branch 'main' of github.com:zed-industries/zed into vector_store
2023-07-11 20:05:29 -04:00
Kirill Bulatov
4b4d049b0a
Refactor LSP restart logic
...
Instead of storing `initialization_options` in every LSP adapter as
before, store previous LSP settings in `Project` entirely.
This way, we can later have use multiple different project
configurations per single LSP with its associated adapter.
co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-11 21:56:55 +03:00
KCaverly
dd0dbdc5bd
brought up to speed with main
2023-07-11 14:50:48 -04:00
Kirill Bulatov
efe8b8b6d0
Revert "Fix language servers improper restarts"
...
This reverts commit 91832c8cd8
.
2023-07-11 20:46:45 +03:00
Kirill Bulatov
91832c8cd8
Fix language servers improper restarts
...
Language servers mixed `initialization_options` from hardcodes and user
settings, fix that to ensure we restart servers on their settings
changes only.
2023-07-11 16:36:20 +03:00
KCaverly
3f5667b101
merged main
2023-07-07 14:24:29 -04:00
Kirill Bulatov
fff65968bf
Restart LSP server on initialization options change
2023-07-06 23:27:22 +03:00
Kirill Bulatov
0b0a161626
Show inlay hints on startup for every language server with work events
...
Language servers such as typescript-language-servers report a single
work event, ending right after server's startup.
Other servers might send more similar event, also during startup.
The rest of the events are diagnostic-related and we filter them out.
React on such events with /refresh-like hint update, that will check
only the visible part of the editor for hints and might be replaced by
other /refresh requests, if needed.
2023-07-06 13:10:59 +03:00
Kirill Bulatov
1936bdebb3
Use less padding for typescript parameter hints
2023-07-06 11:16:39 +03:00
KCaverly
18a5a47f8a
moved semantic search model to dev and preview only.
...
moved db update tasks to long lived persistent task.
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-06-30 18:41:19 -04:00
Max Brunsfeld
f83514cde4
Fix regression in handling git FS events ( #2670 )
...
As part of an optimization in
https://github.com/zed-industries/zed/pull/2663 , I changed the way that
the worktree ignores FS events within unloaded directories. But this
accidentally prevented us from detecting some events that occur inside
of `.git` directories.
In this PR, I've made further tweaks to which FS events we can ignore.
We now explicitly opt *in* to scanning `.git` (shallowly) directories
(even though they are ignored). Note that we still don't recursively
scan the git directory (including all of the files inside `objects`
etc). This seems like the correct amount of work to do, and from my
testing (and our unit tests that use the real FS and real git
repositories), it seems to work correctly.
Release Notes:
- Fixed a bug where Zed would not detect some git repository changes
(preview only).
2023-06-30 11:40:49 -07:00
Max Brunsfeld
92df76e632
Fix accidental ignoring of git FS events
2023-06-30 11:20:50 -07:00
Mikayla Maki
3d6e063a6d
Fix method header
2023-06-29 23:53:57 -07:00
Mikayla Maki
d22a576f5e
fix failing test
2023-06-29 23:50:24 -07:00
Mikayla Maki
a9a51ab3ad
Added more tests and minimal file updates
2023-06-29 18:21:35 -07:00
Mikayla Maki
a6dabf7acf
Make path updates minimal
2023-06-29 18:15:40 -07:00
Mikayla Maki
787412b545
fmt and update dependency
2023-06-29 17:49:42 -07:00
Mikayla Maki
33f5248d4f
Add the ability to make new directories by adding slashes to a file name
2023-06-29 17:35:22 -07:00
Kirill Bulatov
b146762f68
Remove a flacky test, fix the failing one
2023-06-29 22:45:04 +03:00
Kirill Bulatov
652909cdba
Post-rebase fixes
2023-06-29 22:39:33 +03:00
Kirill Bulatov
667b70afde
Move hint settings on the language level
2023-06-29 22:39:18 +03:00
Antonio Scandurra
f77b680db9
Account for inlay biases when clipping a point
2023-06-29 22:25:50 +03:00
Kirill Bulatov
890b164278
Forward inlay hint refresh requests to clients, test coop inlay hints
2023-06-29 22:25:49 +03:00
Kirill Bulatov
316e19ce94
Remove stale cancelled inlay hints workaround
2023-06-29 22:25:49 +03:00
Kirill Bulatov
c61de29c11
Use proper anchors for remote LSP queries
2023-06-29 22:25:49 +03:00
Kirill Bulatov
7fddc223cd
Move away heavy inlay computations into background tasks
2023-06-29 22:25:49 +03:00
Kirill Bulatov
31f0f9f7b1
Forbid extra inlay updates
2023-06-29 22:25:49 +03:00
Kirill Bulatov
8f68688a64
Allow readding inlays with existing ids, move inlay types
2023-06-29 22:25:49 +03:00
Kirill Bulatov
c898298c5c
Properly update inlay hints when settings are changed
2023-06-29 22:25:49 +03:00
Kirill Bulatov
ea837a183b
Store inlays per paths and query on editor open
2023-06-29 22:25:49 +03:00
Kirill Bulatov
8acc5cf8f4
Deserialize more LSP inlay hint information
2023-06-29 22:25:49 +03:00
Kirill Bulatov
f155f5ded7
Better rpc inlay hint handling
2023-06-29 22:25:49 +03:00
Kirill Bulatov
daa2ebb57f
Calculate anchors for new hints
2023-06-29 22:25:49 +03:00
Kirill Bulatov
5fadbf77d4
Implement InlayHint sync method and fix the bugs
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:48 +03:00
Kirill Bulatov
7397b8028c
Simplify inlay hint version handling
2023-06-29 22:25:48 +03:00
Kirill Bulatov
d506522eef
Correctly pass inlay hints
2023-06-29 22:25:48 +03:00
Kirill Bulatov
4c3c0eb796
Draft the hint render data flow
2023-06-29 22:25:48 +03:00
Kirill Bulatov
6e3d1b962a
Draft the initial protobuf changes
2023-06-29 22:25:48 +03:00
Kirill Bulatov
f83cfda9bc
React on message-less LSP requests properly
...
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-06-29 22:25:48 +03:00
Kirill Bulatov
7a268b1cf6
Improve obvious faults
2023-06-29 22:25:48 +03:00
Kirill Bulatov
79b97f9e75
Stub initial hint requests
2023-06-29 22:25:48 +03:00
Kirill Bulatov
8a3b515f56
Initial protocol check commit
2023-06-29 22:25:48 +03:00
Max Brunsfeld
922d8f30d6
Tweak debug log message when ignoring fs events
2023-06-29 12:01:59 -07:00
Max Brunsfeld
8609ccdcf7
Add test coverage for FS events happening inside unloaded dirs
2023-06-29 11:55:25 -07:00
Max Brunsfeld
ba80c53278
Avoid redundant FS scans when LSPs changed watched files
...
* Don't scan directories if they were already loaded.
* Do less work when FS events occur inside unloaded directories.
2023-06-29 11:35:49 -07:00
Julia
48bed2ee03
Merge branch 'main' into fix-broken-lsp-installations
2023-06-28 16:46:06 -04:00
Max Brunsfeld
201188fdaa
Use FakeFs in worktree gitignore test
2023-06-27 15:40:36 -07:00
Julia
b2de28ccfc
Match original logic when determining server to request formatting
2023-06-27 14:16:01 -04:00
Julia
2a8d1343d6
Add installation test binaries for all remaining adapters
2023-06-26 11:54:20 -04:00
Julia
c4b83c86cc
Avoid validating/reinstalling server which refuses will_fetch/start
...
These adapters have indicated some broader reason to the user why
they cannot be started, don't waste time/bandwidth attempting to
validate and reinstall them
2023-06-24 22:42:06 -04:00
Max Brunsfeld
91f87bb31f
Scan any external/ignored directories needed for LSP watchers
...
Also, don't include "external" files in project searches. Treat them
the same as ignored files.
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-06-23 12:53:25 -07:00
Julia
7caa096bd0
Remove installation test binary from language server instance
2023-06-23 13:24:50 -04:00
Max Brunsfeld
27b74e9ea1
Prune the set of expanded dir ids as entries are removed
2023-06-23 10:23:21 -07:00
Max Brunsfeld
b22a18345e
Emit loaded events for lazily loaded paths in worktree
2023-06-23 09:39:37 -07:00
Julia
374c1a3a3e
Remove some status stuff
2023-06-23 00:17:27 -04:00
Julia
a8acf28989
Remove now-unnecessary complexity
2023-06-22 20:19:07 -04:00
Max Brunsfeld
ffb0a215ea
Fix randomized worktree test failures
...
* Distinguish between unloaded and pending directories via separate entry kind.
* Scan directories before updating ignore statuses after fs events.
2023-06-22 16:52:04 -07:00
Max Brunsfeld
5350164db9
Get integration test passing. Wait for expand entry on remote projects.
2023-06-22 10:34:28 -07:00
Max Brunsfeld
400e3cda32
Scan directories when they stop being ignored
2023-06-22 10:34:28 -07:00
Max Brunsfeld
bfc90f4502
Add failing test for changing a gitignore so a pending dir is no longer ignored
2023-06-22 10:34:28 -07:00
Max Brunsfeld
d3477f75ac
Fix reloading of git repositories
...
Also, clean up logic for reloading git repositories.
2023-06-22 10:34:28 -07:00
Max Brunsfeld
4424dafcd7
Fix expansion of ancestor directories when refreshing a path
2023-06-22 10:34:28 -07:00
Max Brunsfeld
3e6aedfc69
Expand dirs on-demand when opening buffers inside unloaded dirs
2023-06-22 10:34:28 -07:00
Max Brunsfeld
cd823ede4d
Add a bit to each entry indicating if it's outside of the worktree root
2023-06-22 10:34:28 -07:00
Max Brunsfeld
1b71589514
Fix confusion between canonical vs non-canonical paths when rescanning, expanding paths
2023-06-22 10:34:28 -07:00
Max Brunsfeld
3c06bd056a
Load git repositories when inserting the entry for the .git
...
Don't wait until populating that directory entry, for two reasons:
* In the case of submodules, .git is not a directory
* We don't eagerly populate .git directories, since their contents
are automatically ignored.
2023-06-22 10:34:28 -07:00
Max Brunsfeld
6fe74602ac
Fix detection of when refreshed paths are outside of worktree root
2023-06-22 10:34:28 -07:00
Max Brunsfeld
205c758e4e
Wait for ignored directory to be expanded in descendant entries test
2023-06-22 10:34:28 -07:00
Max Brunsfeld
aa6f2f1816
Remove logic for marking worktree entries as collapsed
2023-06-22 10:34:28 -07:00
Max Brunsfeld
f910d8fe3e
Only scan ignored or externals paths if expanded in a project panel
2023-06-22 10:34:28 -07:00
Max Brunsfeld
4c03231863
Maintain on the background scanner a set of expanded directories
2023-06-22 10:34:28 -07:00
Julia
0abda54d3c
Remove individual location's request error handling
2023-06-22 11:43:26 -04:00
Julia
e1cd6cebb9
Revert "Route language server requests through wrapper object"
...
This reverts commit 9b63d6f832
.
2023-06-22 10:45:08 -04:00
Julia
9b63d6f832
Route language server requests through wrapper object
2023-06-21 23:05:37 -04:00
Julia
e15be61ded
The log-ification
2023-06-21 14:02:21 -04:00
Julia
f91e95f24a
Merge branch 'main' into fix-broken-lsp-installations
2023-06-20 17:23:34 -04:00
Nathan Sobo
03993ea719
Rename SumTree::push_tree to ::append ( #2626 )
...
This is something I've been meaning to rename in SumTree. Was looking at
the code and figure why not now.
2023-06-20 08:37:55 -06:00
Nathan Sobo
8c298a9da5
Rename SumTree::push_tree to ::append
2023-06-19 19:49:33 -06:00
Max Brunsfeld
57c2d85c66
Show a notification that gopls can't be installed without go
2023-06-19 18:05:12 -07:00
Max Brunsfeld
360bbebbd9
Introduce LspAdapterDelegate trait, passed to LspDelegates
2023-06-19 16:12:25 -07:00
Julia
7e70e24bfc
Remove server from both hashmaps
2023-06-19 18:02:57 -04:00
Julia
afa1434aa9
Get further reinstalling a server which died on startup
2023-06-19 17:45:27 -04:00
Julia
da2ee55013
Route some more information for reinstall after startup failure
...
Doesn't actually reinstall on that particular failure due to wrong
variant in hashmap
2023-06-19 15:18:12 -04:00
Julia
abe5ecc5ec
Actually fully start reinstalled language server
2023-06-15 13:56:07 -04:00
Julia
f81ccbd652
Setup C adapter with test binary
2023-06-15 12:18:34 -04:00
Julia
4d24eae901
Actually check and reinstall broken server
2023-06-15 12:18:34 -04:00
Julia
bca625a197
Many steps toward validating and reinstalling server after failure
2023-06-15 12:18:34 -04:00
Julia
ec0409a3d1
Detect LSP startup failure
2023-06-15 12:18:34 -04:00
Max Brunsfeld
5b6d1a27ff
Flatten worktree tests module structure
2023-06-13 10:31:29 -07:00
Max Brunsfeld
c17dbab6f1
Move worktree tests to their own file
2023-06-13 10:22:14 -07:00
Max Brunsfeld
11dbbcc9dd
Respect LSP goToTypeDefinition server capability
2023-06-08 11:33:09 -07:00
Max Brunsfeld
afaff7f9a9
Merge branch 'main' into lsp-log-messages
2023-06-08 08:49:08 -07:00
Mikayla Maki
fc1f8c5657
Fixed ci
2023-06-07 16:58:55 -07:00
Mikayla Maki
8ca1a7d43d
add scan_complete await
2023-06-07 16:51:54 -07:00
Max Brunsfeld
66f215cd13
Restructure LSP log view to show log messages in addition to RPC trace
2023-06-07 16:51:09 -07:00
Mikayla Maki
9e9d8e3a7b
add mroe dbg
2023-06-07 16:50:15 -07:00
Mikayla Maki
9d58c4526d
Fix warning
2023-06-07 16:45:36 -07:00
Mikayla Maki
5f143f689f
Attempting to debug on ci...
2023-06-07 16:44:13 -07:00
Mikayla Maki
572d40381a
Add track caller
2023-06-07 16:39:10 -07:00
Mikayla Maki
2c5e83bf72
Fixed a bug where buffer saved clocks would desynchronize in rare execution paths
...
co-authored-by: Max <max@zed.dev>
2023-06-07 16:10:45 -07:00
Max Brunsfeld
78f9642ac2
Emit project event when a language server sends a logMessage notification
2023-06-07 14:46:08 -07:00
Mikayla Maki
28ba27c9c5
Merge branch 'main' into stream-git-statuses
2023-06-07 14:12:58 -07:00
Mikayla Maki
34e134fafb
Fix several randomized test failures with the new git status implementation
2023-06-07 14:10:17 -07:00
Max Brunsfeld
72372ddf0e
Highlight hover code blocks as LSP's own language by default
...
The elixir LSP does not include a language name on its elixir code blocks.
2023-06-07 10:01:19 -07:00
Max Brunsfeld
fccbac4887
Handle LSP codeActions capability set to false
2023-06-06 17:13:59 -07:00
Max Brunsfeld
7bfb51ee76
Live-reload tree-sitter queries in development
2023-06-06 14:20:21 -07:00
Mikayla Maki
a2d58068a7
Improve test generation and implement status propogation
...
co-authored-by: max <max@zed.dev>
2023-06-05 17:30:12 -07:00
Mikayla Maki
9a13a2ba2c
WIP: Add status bubbling to project panel
2023-06-05 12:53:04 -07:00
Mikayla Maki
e56fcd69b5
Track git status changes with the changed_paths system
2023-06-05 11:50:23 -07:00
Joseph Lyons
7c60f636d5
Fix typos
2023-06-02 22:02:19 -04:00
Mikayla Maki
ca077408d7
Fix bug where git statuses would not be initialized on startup
...
move git status queries to be on entry creation
co-authored-by: max <max@zed.dev>
2023-06-02 17:38:39 -07:00
Mikayla Maki
2f97c7a4f1
Remove stale comments
...
Implement status bubbling query with sum tree traversals
co-authored-by: max <max@zed.dev>
2023-06-02 16:41:01 -07:00
Mikayla Maki
e377459948
Remove stateful bubbling
...
co-authored-by: max <max@zed.dev>
2023-06-02 15:07:49 -07:00
Mikayla Maki
99a0e11e70
Abandoning stateful bubbling approach
...
co-authored-by: max <max@zed.dev>
2023-06-02 14:51:40 -07:00
Mikayla Maki
3768851799
WIP: Git statuses
2023-06-01 23:27:49 -07:00
Mikayla Maki
5e43dcaab8
WIP: Add stateful status bubbling to worktree
2023-06-01 16:51:34 -07:00
Max Brunsfeld
788f97ec68
Add support for folder-specific settings ( #2537 )
...
This PR allows you to customize Zed's settings within a particular
folder by creating a `.zed/settings.json` file within that folder.
Todo
* [x] respect folder-specific settings for local projects
* [x] respect folder-specific settings in remote projects
* [x] pass a path when retrieving editor/language settings
* [x] pass a path when retrieving copilot settings
* [ ] update the `Setting` trait to make it clear which types of
settings are locally overridable
Release Notes:
* Added support for folder-specific settings. You can customize Zed's
settings within a particular folder by creating a `.zed` directory and a
`.zed/settings.json` file within that folder.
2023-05-31 16:27:08 -07:00
Max Brunsfeld
0dd7694ff5
Make language_settings take a language, not a language name
2023-05-31 15:10:30 -07:00
Max Brunsfeld
03a351fb26
Make language settings accessors take an arc dyn file
2023-05-31 14:57:04 -07:00
Max Brunsfeld
a2ab7c9eb9
Respect project-specific settings for copilot
2023-05-31 14:42:15 -07:00
Mikayla Maki
4717ce1da3
WIP: Move statuses to entries
...
co-authored-by: julia <julia@zed.dev>
2023-05-31 12:55:31 -07:00
Mikayla Maki
22e4086658
WIP: Move statuses to be on their associated file entries in worktree
...
co-authored-by: Julia <julia@zed.dev>
2023-05-31 11:03:11 -07:00
Max Brunsfeld
8f95435548
Replicate project-specific settings when collaborating
2023-05-30 18:08:03 -07:00
Max Brunsfeld
89446c7fd4
Start work on respecting project-specific settings
2023-05-29 14:25:49 -07:00
Antonio Scandurra
6d3464fd1f
Make Pane::add_item
a proper Pane
method
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-29 19:16:22 +02:00
Kirill Bulatov
fdad1adaf6
Update LSP to the newest version
2023-05-28 21:55:08 +03:00
Max Brunsfeld
e4530471de
Make worktree UpdatedEntries
events fully describe all changes ( #2533 )
...
This PR makes the worktree's change events more useful in a few ways:
* The changes are now described by a cheaply clone-able collection, so
that they can be used in background tasks. Right now, I'm using a simple
Arc slice.
* The `UpdatedEntries` event now captures not only changes due to FS
changes, but also newly-loaded paths that are discovered during the
initial scan.
* The `UpdatedGitRepositories` event now includes repositories whose
work-dir changed but git dir didn't change. A boolean flag is included,
to indicate whether the git content changed.
* The `UpdatedEntries` and `UpdatedGitRepositories` events are now
*used* to compute the worktree's `UpdateWorktree` messages, used to sync
changes to guests. This unifies two closely-related code paths, and
makes the host more efficient when collaborating, because the
`UpdateWorktree` message computation used to require walking the entire
`entries` tree on every FS change.
2023-05-26 15:55:14 -07:00
Max Brunsfeld
1f42bfc1bd
Include repositories with workdir changes in worktree UpdatedGitRepsositories event
2023-05-26 15:47:37 -07:00
Max Brunsfeld
2db57b5139
Adjust diagnostic transformation test to not wait for two buffer notifications
2023-05-26 15:47:37 -07:00
Max Brunsfeld
02b95ef320
Derive worktree update messages from existing change events
2023-05-26 15:47:37 -07:00
Kirill Bulatov
3a3c1c5a5b
Add a test
...
co-authored-by: Mikayla <mikayla@zed.dev>
2023-05-27 01:12:22 +03:00
Max Brunsfeld
6628c4df28
Store worktree changes in a sorted arc slice, not a HashMap
...
We don't need to look-up change types by an arbitrary key, but we
do need to iterate it. It would also be useful to be able to
cheaply clone the changes, to use them in a background task.
2023-05-26 09:24:15 -07:00
Max Brunsfeld
59bfd40679
Make stricter assertions about change events in random worktree test
2023-05-26 09:24:15 -07:00
Max Brunsfeld
f890eefdef
Include paths loaded during initial scan in worktree UpdatedEntries event
2023-05-26 09:24:15 -07:00
Julia
5e39ba596e
Clean up final remaining code paths calling old diff update method
2023-05-25 14:41:09 -04:00
Julia
f40c498491
Fix tests
2023-05-25 14:29:28 -04:00
Julia
8d662edb6c
Remove concept of git diff refresh from Item
trait
2023-05-25 14:29:28 -04:00
Julia
cede296b04
Project level git diff recalc handling
...
This avoids an issue where in a many-buffer multi-buffer, each modified
buffer could complete its recalc independently, causing a cascade of
repeated notifies
Now all recalcs started at the same time must complete before
A: Starting another recalc pass
B: The master notify occurring
Each buffer can still show its new diff if something else triggers it
to notify earlier, this is desirable and does not have the same negative
effects as the notify cascade as those re-layouts would need to happen
anyway
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-05-25 14:10:27 -04:00
Max Brunsfeld
54421b11f3
wip
2023-05-25 14:10:27 -04:00
Kirill Bulatov
e2ff829f98
Use Transaction instead of ProjectTransaction
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-05-25 16:12:14 +03:00
Kirill Bulatov
aa58d0fd77
Do not send edits over the wire
2023-05-25 12:55:44 +03:00
Kirill Bulatov
eca6d2b597
Process remote format typing also
2023-05-25 09:45:50 +03:00
Kirill Bulatov
58a56bdda2
Always use server formatting settings
2023-05-25 09:45:50 +03:00
Kirill Bulatov
b9dabb165e
Use formatting options
2023-05-25 09:45:50 +03:00
Kirill Bulatov
3327e8a6dd
Support remote sessions
2023-05-25 09:45:50 +03:00
Kirill Bulatov
f6d7b3d2e8
Send and handle OnTypeFormatting LSP request
2023-05-25 09:45:50 +03:00
Mikayla Maki
51d94f532b
Load diff base for buffers that are opening but not yet opened when repositories are discovered
2023-05-22 18:26:33 -07:00
Mikayla Maki
4c9d24da7c
Only fire update diff base when the dot repo is scanned ( #2510 )
...
This PR fixes a bug in the firing of the UpdatedRepositories event which
caused it to flood collaboration with new messages on every file save.
Release Notes:
* Fixed a bug in repository detection that caused it to fire
over-eagerly (preview only)
2023-05-22 14:11:19 -07:00
Mikayla Maki
96224fa7e8
Only fire update diff base when the dot repo is scanned
2023-05-22 13:57:07 -07:00
Max Brunsfeld
7689cdf3f9
Clear old diagnostics when restarting a language server
2023-05-22 12:53:22 -07:00
Max Brunsfeld
e129ed2d91
Fix spurious setting error log messages ( #2498 )
...
Fixes a bug introduced in
https://github.com/zed-industries/zed/pull/2448 , where error messages
would be logged if the user config didn't specify certain fields like
`journal` or `telemetry`.
2023-05-22 11:44:21 -07:00
Mikayla Maki
bbb68c523c
Refactored apart the forward and the backwards iterator for diff hunks
2023-05-19 18:09:47 -07:00
Max Brunsfeld
e32233c826
Fix spurious setting error logs on non-existent setting keys
2023-05-19 17:15:05 -07:00
Mikayla Maki
43e301eeef
refine batched anchor conversions
...
co-authored-by: max <max@zed.dev>
2023-05-19 16:52:57 -07:00
Max Brunsfeld
fb11c3e4bf
Remove stray prints
2023-05-19 16:52:30 -07:00
Mikayla Maki
1474429271
fmt
2023-05-19 16:32:07 -07:00
Mikayla Maki
c795c9b844
Rearrange git tests in worktree
...
Add support for renaming work directories
2023-05-19 16:30:00 -07:00
Max Brunsfeld
7ae642b9b8
Avoid storing removed_entry_ids on the LocalSnapshot
2023-05-19 15:16:04 -07:00
Max Brunsfeld
32c7157906
🎨 Make worktree repositories more consistent
2023-05-19 15:04:37 -07:00
Max Brunsfeld
6359333749
Don't store next_entry_id on worktree's local snapshot
2023-05-19 13:49:24 -07:00
Kirill Bulatov
7d1833b759
When the file is deleted via project panel, close it in editors ( #2490 )
...
Deals with https://github.com/zed-industries/community/issues/179 by
sending a message about it, to asynchronously apply on all workspaces.
Release Notes:
* Fixes a bug when files, deleted in the project panel were left open in
the editor
2023-05-19 21:51:37 +03:00
Max Brunsfeld
844b8d9e1e
Remove unnescessary double lookup in repo for ( #2492 )
...
Release Notes:
* Optimize repository queries (preview only)
2023-05-19 11:47:05 -07:00
Mikayla Maki
9f157bdb67
Remove unescessary methods
2023-05-19 11:30:10 -07:00
Max Brunsfeld
729a93db6b
Optimize retrieving repos for entries when rendering the project panel
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-05-19 11:29:02 -07:00
Mikayla Maki
6792788216
Remove unnescessary double lookup
2023-05-19 11:08:58 -07:00
Max Brunsfeld
d480555ec9
Fix performance problems in reporting changed FS paths to language servers ( #2491 )
...
Fixes
https://linear.app/zed-industries/issue/Z-1611/main-thread-hangs-while-sending-filesystem-change-events-to-lsp
Release Notes:
* Fixed a lag that would sometime occur when large numbers of files
changed on disk, due to reporting the changed files to language servers.
2023-05-19 09:42:55 -07:00
Max Brunsfeld
459cc9c959
Optimize matching of multiple file-watch globs using the globset crate
2023-05-19 09:13:34 -07:00
Kirill Bulatov
583b15badc
When the file is deleted via project panel, close it in editors
2023-05-19 18:52:30 +03:00
Kirill Bulatov
3984cc6d39
Properly handle WorktreeId
2023-05-19 12:37:36 +03:00
Max Brunsfeld
4bda5c4d69
Optimize LSP watched file reporting in 2 simple ways
...
* Convert globs to relative paths in advance. This avoids needing to convert
every changed path to an absolute path before performing glob matching.
* Avoid duplicate reporting for language servers with multiple worktrees.
2023-05-18 17:08:51 -07:00
Kirill Bulatov
201d513c50
Show navigation history in the file finder modal
...
co-authored-by: Max <max@zed.dev>
2023-05-18 21:50:38 +03:00
Kirill Bulatov
711d2c6fe7
Maintain recently opened files history
2023-05-18 21:50:38 +03:00
Max Brunsfeld
258723566f
Rename settings::register_setting -> settings::register
2023-05-17 15:06:11 -07:00
Max Brunsfeld
2d5f03e148
Remove optional path argument when getting settings
2023-05-17 15:05:20 -07:00
Max Brunsfeld
67a25126d4
Define theme/ui text style settings in theme crate
2023-05-17 14:44:59 -07:00
Max Brunsfeld
89204e85c0
Merge branch 'main' into setting-store
2023-05-17 09:55:24 -07:00
Max Brunsfeld
cbd4771f10
Define project settings in project crate
2023-05-16 17:45:04 -07:00
Max Brunsfeld
39618ae32d
Define language settings in the language crate
2023-05-16 17:29:53 -07:00
Julia
8b63caa0bd
Fix worktree refresh request causing gitignore to not update
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-05-16 13:01:29 -04:00
Julia
f50240181a
Avoid removing fake fs entry when rename fails later in the process
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-05-16 13:00:39 -04:00
Mikayla Maki
e4d509adf4
fmt
2023-05-15 16:22:52 -07:00
Mikayla Maki
4d40aa5d6f
Restore trickle up git status to folder
...
co-authored-by: max <max@zed.dev>
2023-05-15 16:22:00 -07:00
Mikayla Maki
68078853b7
Made status tracking resilient to folder renames
...
co-authored-by: max <max@zed.dev>
2023-05-15 16:21:58 -07:00
Mikayla Maki
307dd2b83e
Update proto names to reflect new status info
2023-05-15 16:20:01 -07:00
Mikayla Maki
6c26f3d0e4
Fixed formatting
2023-05-15 16:20:01 -07:00
Mikayla Maki
2b18975cdc
Change folder styling from a reduce over all child files to a simple 'always modified'
...
Remove git status from tab titles
2023-05-15 16:20:01 -07:00
Julia
cf53b2ca87
Merge pull request #2471 from zed-industries/optimize-update-local-worktree-buffers
...
Optimize update local worktree buffers
2023-05-15 13:13:09 -04:00
Julia
fa32adecd5
Fixup more, tests finally pass
2023-05-14 12:06:00 -04:00
Mikayla Maki
a6a4b846bc
fmt
2023-05-13 10:43:16 -07:00
Mikayla Maki
5e2aaf45a0
Fix repository initialization bug
2023-05-13 10:38:24 -07:00
Mikayla Maki
04041af78b
Fixed bug with failing to clear git file status
2023-05-13 02:40:22 -07:00
Mikayla Maki
62c445da57
Match priority of folder highlights to vscode
2023-05-13 02:30:59 -07:00
Mikayla Maki
6ef0f70528
Made the map seek target a publicly implementable interface
...
Integrated remove_range with the existing git code
co-authored-by: Nathan <nathan@zed.dev>
2023-05-12 08:37:32 -07:00
Nathan Sobo
ee3637216e
Add TreeMap::remove_between that can take abstract start and end points
...
This commit introduces a new adaptor trait for SeekTarget that works around
frustrating issues with lifetimes. It wraps the arguments in a newtype wrapper
that lives on the stack to avoid the lifetime getting extended to the caller
of the method.
This allows us to introduce a PathSuccessor object that can be passed as the
end argument of remove_between to remove a whole subtree.
2023-05-12 08:21:01 -07:00
Mikayla Maki
5fe8b73f04
compile error 😅
2023-05-11 16:07:41 -07:00
Mikayla Maki
d538994c7f
Use more efficient sum tree traversals for removal and improve ergonomics with iter_from
...
co-authored-by: Nathan <nathan@zed.dev>
2023-05-11 16:06:25 -07:00
Mikayla Maki
72655fc41d
fmt
2023-05-11 13:25:57 -07:00
Mikayla Maki
6f87f9c51f
Don't scan for statuses in files that are ignored
2023-05-11 13:25:07 -07:00
Mikayla Maki
5b2ee63f80
Added status trickle up
2023-05-11 12:01:42 -07:00
Julia
0f34af50a8
Use path list generated during entry reload of a refresh request
2023-05-10 23:37:02 -04:00
Mikayla Maki
9800a149a6
Remove some external context from git status test
2023-05-10 17:59:33 -07:00
Max Brunsfeld
bc5b78198a
Define terminal settings in terminal crate
2023-05-10 17:43:10 -07:00
Mikayla Maki
e20eaca595
Got basic replication working :)
2023-05-10 17:37:36 -07:00
Mikayla Maki
2b80dfa81d
Update protos
2023-05-10 17:37:36 -07:00
Mikayla Maki
00b345fdfe
Use sum tree traversal to remove paths
2023-05-10 17:37:36 -07:00
Mikayla Maki
23a19d85b8
Fix bug in status detection when removing a directory
2023-05-10 17:37:36 -07:00
Mikayla Maki
0082d68d4a
Revert "Convert git status calculation to use Entry IDs as the key instead of repo relative paths"
...
This reverts commit 728c6892c924ebeabb086e308ec4b5f56c4fd72a.
2023-05-10 17:37:36 -07:00
Mikayla Maki
f935047ff2
Convert git status calculation to use Entry IDs as the key instead of repo relative paths
2023-05-10 17:37:36 -07:00
Mikayla Maki
a58a33fc93
WIP: integrate status with collab
2023-05-10 17:37:36 -07:00
Mikayla Maki
18cec8d64f
Format
2023-05-10 17:37:36 -07:00
Mikayla Maki
e98507d8bf
Added git status to the project panel, added worktree test
2023-05-10 17:37:36 -07:00
Mikayla Maki
93f57430da
Track live entry status in repository
2023-05-10 17:37:36 -07:00
Mikayla Maki
bd98f78101
Fix compile error
2023-05-10 17:37:36 -07:00
Mikayla Maki
67491632cb
WIP: Track live entry status in repository
...
co-authored-by: petros <petros@zed.dev>
2023-05-10 17:37:36 -07:00
Mikayla Maki
7169f5c760
Add git status to the file system abstraction
...
co-authored-by: petros <petros@zed.dev>
2023-05-10 17:37:36 -07:00
Kirill Bulatov
dfdf7e4866
Test the search inclusions/exclusions
2023-05-10 11:11:31 +03:00
Kirill Bulatov
6fb8679184
Trim glob input
2023-05-10 11:11:31 +03:00
Kirill Bulatov
b5abac6af6
Draft search include/exclude logic
2023-05-10 11:11:31 +03:00
Kirill Bulatov
915154b047
Add initial include/exclude project search UI
2023-05-10 11:11:31 +03:00
Antonio Scandurra
2bc7be9a76
WIP
2023-05-09 17:14:33 +02:00
Antonio Scandurra
48ad3866b7
Randomly mutate worktree in addition to mutating the file-system
...
This ensures that we test the code path that refreshes entries.
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-05-09 17:01:11 +02:00
Antonio Scandurra
7f27d72b20
Deliver file-system change events in batches in randomized worktree test
...
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-05-09 16:55:03 +02:00
Julia
5c859da457
Only update changed local worktree buffers
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-05-09 15:13:12 +02:00
Mikayla Maki
62e763d0d3
Removed test modifications, added special case to git initialization for when the repository is inside a .git folder
2023-05-08 14:33:59 -07:00
Mikayla Maki
ab952f1b31
Fixed randomized test failures
...
co-authored-by: Max <max@zed.dev>
2023-05-08 14:33:59 -07:00
Mikayla Maki
d8dac07408
Removed scan ID from repository interfaces
...
co-authored-by: Max <max@zed.dev>
2023-05-08 14:33:59 -07:00
Mikayla Maki
270147d20c
Finished RepositoryEntry refactoring, smoke tests passing
...
co-authored-by: Max <max@zed.dev>
2023-05-08 14:33:59 -07:00
Mikayla Maki
53569ece03
WIP: Change RepositoryEntry representation to be keyed off of the work directory
...
Removes branches button scaffolding
2023-05-08 14:33:59 -07:00
Mikayla Maki
b6d6f5c650
WIP: re-arranging the RepositoryEntry representation
...
Added branches to the randomized test to check the git branch
Added the remaining database integrations in collab
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Petros <petros@zed.dev>
2023-05-08 14:33:59 -07:00
Mikayla Maki
8301ee43d6
WIP: Add repository entries to collab and synchronize when rejoining the room
...
co-authored-by: Max <max@zed.dev>
2023-05-08 14:33:59 -07:00
Mikayla Maki
2fe5bf419b
Add proto fields for repository entry maintenance
2023-05-08 14:33:59 -07:00
Petros Amoiridis
e057b0193f
Introduce BrancesButton in title bar
...
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-05-08 14:33:58 -07:00
Mikayla Maki
8f0aa3c6d9
Add branch name into title
2023-05-08 14:33:58 -07:00
Petros Amoiridis
d34ec462f8
Display branch information per worktree root
...
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-05-08 14:33:58 -07:00
Mikayla Maki
ffd9d4eb59
Fix bug in repo detection
2023-05-08 14:33:58 -07:00
Mikayla Maki
3570810516
Add API for accessing git branch
2023-05-08 14:33:58 -07:00
Mikayla Maki
26afd592c5
Wire in the branch name
2023-05-08 14:33:58 -07:00