Commit Graph
3503 Commits
Author SHA1 Message Date
Max Brunsfeld fb2ae84719 Merge pull request #709 from zed-industries/prompt-on-close
Prompt user when closing items with unsaved changes or conflicts
2022-04-01 15:38:41 -07:00
Max Brunsfeld fe27a27cb6 Merge branch 'main' into prompt-on-close 2022-04-01 15:29:23 -07:00
Max Brunsfeld 79bd8642e6 Merge pull request #702 from zed-industries/typescript
Add support for JS/Typescript/TSX, allow language servers to support multiple languages
2022-04-01 15:24:58 -07:00
Max Brunsfeld c4d3bbf184 Bump protocol version 2022-04-01 15:17:30 -07:00
Max Brunsfeld 7ad862673d Add basic syntax highlight colors for typescript completions 2022-04-01 15:05:03 -07:00
Max Brunsfeld 5090e6f146 Fix common_prefix_at panic when needle contains multibyte chars
Also, make the prefix matching case-insensitive, since this is the
typical behavior with autocomplete.
2022-04-01 14:52:38 -07:00
Max Brunsfeld 6f28033efe Add explanatory comments in unit test for code actions w/ commands 2022-04-01 13:00:06 -07:00
Max Brunsfeld fe8e06e781 Fix clipping when using label-only completions 2022-04-01 12:07:41 -07:00
Max Brunsfeld ba009724dd Handle LSP apply workspace edit request fully before responding 2022-04-01 11:59:21 -07:00
Max BrunsfeldandAntonio Scandurra 56523b5775 Allow applying code actions that use commands
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-01 10:16:26 -07:00
Antonio Scandurra be677a8a4b Don't assume the CloseActiveItem action is synchronous in test 2022-04-01 15:27:06 +02:00
Antonio Scandurra e93ab4db14 Prompt before closing buffer with unsaved changes or conflicts 2022-04-01 14:33:07 +02:00
Antonio Scandurra 703f1c3be0 Introduce workspace::Item::reload to manually trigger a reload 2022-04-01 14:02:49 +02:00
Antonio Scandurra 65048760b2 Allow explicit reload of buffers via Project::reload_buffers 2022-04-01 14:01:56 +02:00
Antonio Scandurra bdd95a82d7 Merge pull request #705 from zed-industries/breadcrumbs
Introduce breadcrumbs
2022-04-01 11:02:54 +02:00
Antonio Scandurra cd5389b4d8 Let toolbar items specify flex when they have a primary location 2022-04-01 10:55:38 +02:00
Antonio Scandurra 6d4c748d82 Show "untitled" in breadcrumbs when the buffer has no path 2022-04-01 10:15:37 +02:00
Antonio Scandurra 7f9ff47089 Hide breadcrumbs when project search has no results 2022-04-01 10:00:21 +02:00
Antonio Scandurra 9f939bd007 Fix styling of project search bar 2022-04-01 09:59:36 +02:00
Max BrunsfeldandKeith Simmons fed5d141bc Start work on applying code actions that use commands
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-31 22:03:52 -07:00
Max Brunsfeld e987a8ba63 Let fake and real LanguageServer access AsyncAppContext in handler callbacks
Also, reimplement FakeLanguageServer by wrapping LanguageServer, instead of
duplicating its functionality differently.
2022-03-31 21:57:00 -07:00
Keith Simmons afbddc1bcd Address panic when completions requested and returned to outdated buffer 2022-03-31 18:22:55 -07:00
Keith SimmonsandMax Brunsfeld 564225c401 Provide diagnostic context to codeAction
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-31 15:39:52 -07:00
903810f22e Style search in buffer below breadcrumbs
We still have issues with project search styling.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-31 11:44:16 -06:00
8bfac63e0d Render the search UI on a separate row from the breadcrumbs
- In project search, render it above the breadcrumbs
- In buffer search, render it below

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-31 10:36:39 -06:00
Keith Simmons 9385690b98 Add test for common_prefix_at and rewrite it to be more readable and
pass the new test cases
2022-03-31 01:09:58 -07:00
Max BrunsfeldandKeith Simmons 263e3d8176 Start work on interpreting 'label/insertText' completions
These completions don't supply a range that should be overwritten, so
the client needs to infer it via substring matching.

Co-authored-by: Keith Simmons <keith@zed.dev>
2022-03-30 17:47:25 -07:00
Max BrunsfeldandKeith Simmons c280c85ce7 Hard-code LSP formatting options for now
This is needed for auto-formatting to work properly in TypeScript and JSON

Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-30 17:08:40 -07:00
Max BrunsfeldandKeith Simmons cf9efd7005 Improve installation of npm-based language servers
* Use --prefix flag to guarantee that they are installed in .zed
* Use the @latest tag when available
* Extract helper functions

Co-authored-by: Keith Simmons <keith@zed.dev>
2022-03-30 16:48:59 -07:00
Max Brunsfeld 4805cfe48c Merge branch 'main' into typescript 2022-03-30 14:44:07 -07:00
Max Brunsfeld cfa0269b1b Merge pull request #701 from zed-industries/restart-lsp
Add restart-lsp keybinding
2022-03-30 13:59:04 -07:00
Keith SimmonsandMax Brunsfeld 0dce371b3e Add assert_set_eq macro to make test clearer
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-30 13:53:38 -07:00
Keith SimmonsandMax Brunsfeld 32d2e5952c Test language server restart works as expected
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-30 13:08:36 -07:00
Antonio ScandurraandNathan Sobo 0453dd1101 Allow flex items to float to the end of the flex axis
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-30 16:46:14 +02:00
Antonio Scandurra 621e67bca7 Revert deletion of FindEditor in theme 2022-03-30 13:35:17 +02:00
Antonio Scandurra 94097a56a1 Fix buffer search unit tests 2022-03-30 13:18:31 +02:00
Max Brunsfeld fb46615c9f Use a fancier angle bracket in the breadcrumbs 2022-03-29 21:16:12 -07:00
Max Brunsfeld 45ad5f343f Parse JS as TSX 2022-03-29 18:26:58 -07:00
Max Brunsfeld 3b4cab9094 Move all configuration of individual LSP servers to LspAdapter 2022-03-29 18:14:30 -07:00
Max Brunsfeld ebc711f9f5 Restructure fake language server setup
Replace FakeLanguageServerConfig with FakeLanguageServerAdapter
2022-03-29 17:55:57 -07:00
Keith Simmons ec57c1f4ac Properly dedup restarts of language servers 2022-03-29 17:46:39 -07:00
Keith Simmons 6d91fd078c Add restart-lsp keybinding 2022-03-29 17:24:23 -07:00
Max Brunsfeld 158d987965 Start work on allowing language servers to support multiple languages 2022-03-29 16:57:18 -07:00
Keith SimmonsandMax Brunsfeld 0e1d371a67 Add typescript language server
Currently not tested for tsx files

Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-29 13:42:21 -07:00
Max Brunsfeld d466768eed WIP 2022-03-29 11:06:08 -07:00
Max BrunsfeldandKeith Simmons dd1c88afa5 Add basic TypeScript and TSX support
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-29 10:42:46 -07:00
Antonio Scandurra a11665ecc7 Render project search query editor in toolbar 2022-03-29 17:04:39 +02:00
Antonio Scandurra a6bdb6dc5d Embed match index inside of search query editor 2022-03-29 15:53:36 +02:00
Antonio Scandurra 13f42550c9 Show breadcrumbs in the toolbar 2022-03-29 15:08:37 +02:00
Antonio Scandurra 099250c691 Introduce MultiBuffer::symbols_containing 2022-03-29 15:08:37 +02:00