Commit Graph
3306 Commits
Author SHA1 Message Date
KCaverly 95143f5fe8 Merge branch 'main' of github.com:zed-industries/zed into vector_store 2023-07-11 20:05:29 -04:00
Kirill BulatovandMax Brunsfeld b214a1af15 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 f2264fb0a9 brought up to speed with main 2023-07-11 14:50:48 -04:00
Kirill Bulatov 6c4b0b2b2f Revert "Fix language servers improper restarts"
This reverts commit 78ecc82fed.
2023-07-11 20:46:45 +03:00
Kirill Bulatov 78ecc82fed 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 29b37b3a27 merged main 2023-07-07 14:24:29 -04:00
Kirill Bulatov c463e0dc55 Restart LSP server on initialization options change 2023-07-06 23:27:22 +03:00
Kirill Bulatov 0ad7efb1b2 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 19c11a9a49 Use less padding for typescript parameter hints 2023-07-06 11:16:39 +03:00
KCaverlyandmaxbrunsfeld 5c0ef44a23 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 c57609f656 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 a7fc19a618 Fix accidental ignoring of git FS events 2023-06-30 11:20:50 -07:00
Mikayla Maki 591d6643a2 Fix method header 2023-06-29 23:53:57 -07:00
Mikayla Maki d228dc2d8a fix failing test 2023-06-29 23:50:24 -07:00
Mikayla Maki 9cbcdeb523 Added more tests and minimal file updates 2023-06-29 18:21:35 -07:00
Mikayla Maki 6584785a50 Make path updates minimal 2023-06-29 18:15:40 -07:00
Mikayla Maki 91f2a5401c fmt and update dependency 2023-06-29 17:49:42 -07:00
Mikayla Maki f416d9ef00 Add the ability to make new directories by adding slashes to a file name 2023-06-29 17:35:22 -07:00
Kirill Bulatov b56e2b4a28 Remove a flacky test, fix the failing one 2023-06-29 22:45:04 +03:00
Kirill Bulatov 3a66693941 Post-rebase fixes 2023-06-29 22:39:33 +03:00
Kirill Bulatov ff5645c43b Move hint settings on the language level 2023-06-29 22:39:18 +03:00
Antonio Scandurra 1a0d9873b2 Account for inlay biases when clipping a point 2023-06-29 22:25:50 +03:00
Kirill Bulatov 25129daf7a Forward inlay hint refresh requests to clients, test coop inlay hints 2023-06-29 22:25:49 +03:00
Kirill Bulatov fa1196dabf Remove stale cancelled inlay hints workaround 2023-06-29 22:25:49 +03:00
Kirill Bulatov 901ff983fd Use proper anchors for remote LSP queries 2023-06-29 22:25:49 +03:00
Kirill Bulatov a555d28a65 Move away heavy inlay computations into background tasks 2023-06-29 22:25:49 +03:00
Kirill Bulatov 684a6a5fa4 Forbid extra inlay updates 2023-06-29 22:25:49 +03:00
Kirill Bulatov 02c8e6794b Allow readding inlays with existing ids, move inlay types 2023-06-29 22:25:49 +03:00
Kirill Bulatov 49ac0e0dee Properly update inlay hints when settings are changed 2023-06-29 22:25:49 +03:00
Kirill Bulatov d0c3527705 Store inlays per paths and query on editor open 2023-06-29 22:25:49 +03:00
Kirill Bulatov 851bc593b4 Deserialize more LSP inlay hint information 2023-06-29 22:25:49 +03:00
Kirill Bulatov 5575e4d441 Better rpc inlay hint handling 2023-06-29 22:25:49 +03:00
Kirill Bulatov 629567a8e3 Calculate anchors for new hints 2023-06-29 22:25:49 +03:00
Kirill BulatovandAntonio Scandurra 81bfdb617f 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 a9f98e6188 Simplify inlay hint version handling 2023-06-29 22:25:48 +03:00
Kirill Bulatov 987fd630b9 Correctly pass inlay hints 2023-06-29 22:25:48 +03:00
Kirill Bulatov b8458256c5 Draft the hint render data flow 2023-06-29 22:25:48 +03:00
Kirill Bulatov 9a80c8c8d0 Draft the initial protobuf changes 2023-06-29 22:25:48 +03:00
Kirill BulatovandJulia Risley 79b91fdb7b 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 d1b0cf22e5 Improve obvious faults 2023-06-29 22:25:48 +03:00
Kirill Bulatov 39c104f2c2 Stub initial hint requests 2023-06-29 22:25:48 +03:00
Kirill Bulatov e3654b4b8b Initial protocol check commit 2023-06-29 22:25:48 +03:00
Max Brunsfeld 8fe863951c Tweak debug log message when ignoring fs events 2023-06-29 12:01:59 -07:00
Max Brunsfeld d0bc39d7fe Add test coverage for FS events happening inside unloaded dirs 2023-06-29 11:55:25 -07:00
Max Brunsfeld d137351c99 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 e9e3bd616f Merge branch 'main' into fix-broken-lsp-installations 2023-06-28 16:46:06 -04:00
Max Brunsfeld ecf26b93d4 Use FakeFs in worktree gitignore test 2023-06-27 15:40:36 -07:00
Julia 3f5bc83ad1 Match original logic when determining server to request formatting 2023-06-27 14:16:01 -04:00
Julia 2d2e3fb417 Add installation test binaries for all remaining adapters 2023-06-26 11:54:20 -04:00
Julia 2268075500 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