Commit Graph
39175 Commits
Author SHA1 Message Date
Max Brunsfeld 02a9cfb8b4 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 a8a42e4b1f Merge branch 'main' into prompt-on-close 2022-04-01 15:29:23 -07:00
Max Brunsfeld c190735d28 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 77d506ecbb Bump protocol version 2022-04-01 15:17:30 -07:00
Max Brunsfeld feb7683762 Add basic syntax highlight colors for typescript completions 2022-04-01 15:05:03 -07:00
Max Brunsfeld cd4adebc0e 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
Nathan Sobo 82fa87233d Start loading new theme JSON format instead of TOML
Replaced remaining extends with javascript object extension.
Moved tokens/core.ts to tokens.ts and massaged the types to make it more
obvious when types don't match up.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-04-01 13:34:39 -07:00
Max Brunsfeld 055bff7388 Add explanatory comments in unit test for code actions w/ commands 2022-04-01 13:00:06 -07:00
Max Brunsfeld bedee29a36 Fix clipping when using label-only completions 2022-04-01 12:07:41 -07:00
Max Brunsfeld 5add351d21 Handle LSP apply workspace edit request fully before responding 2022-04-01 11:59:21 -07:00
Max BrunsfeldandAntonio Scandurra f27f8a5c9e Allow applying code actions that use commands
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-01 10:16:26 -07:00
Nathan SoboandNate Butler 1737d5f515 Update style tree based on changes to _base.toml from main
Co-Authored-By: Nate Butler <1714999+iamnbutler@users.noreply.github.com>
2022-04-01 09:56:50 -06:00
Nathan Sobo 262e6fe3b2 Merge branch 'main' into styles-in-typescript 2022-04-01 09:46:51 -06:00
Nathan SoboandNate Butler 9f53f298aa Write theme JSON files from buildThemes script
Co-Authored-By: Nate Butler <1714999+iamnbutler@users.noreply.github.com>
2022-04-01 09:45:11 -06:00
Nathan Sobo 8d2b54d79b Fix TS compile error 2022-04-01 08:25:58 -06:00
Antonio Scandurra 40cb810dc1 Don't assume the CloseActiveItem action is synchronous in test 2022-04-01 15:27:06 +02:00
Antonio Scandurra b6f4741a58 Prompt before closing buffer with unsaved changes or conflicts 2022-04-01 14:33:07 +02:00
Antonio Scandurra cc11f45a1a Introduce workspace::Item::reload to manually trigger a reload 2022-04-01 14:02:49 +02:00
Antonio Scandurra 340874ce76 Allow explicit reload of buffers via Project::reload_buffers 2022-04-01 14:01:56 +02:00
Antonio Scandurra 91c003ee59 Merge pull request #705 from zed-industries/breadcrumbs
Introduce breadcrumbs
2022-04-01 11:02:54 +02:00
Antonio Scandurra dddbf20c75 Let toolbar items specify flex when they have a primary location 2022-04-01 10:55:38 +02:00
Antonio Scandurra 09ed46ed25 Show "untitled" in breadcrumbs when the buffer has no path 2022-04-01 10:15:37 +02:00
Antonio Scandurra 52f1207b9b Hide breadcrumbs when project search has no results 2022-04-01 10:00:21 +02:00
Antonio Scandurra d89a7f6c2a Fix styling of project search bar 2022-04-01 09:59:36 +02:00
Max BrunsfeldandKeith Simmons cc28562c9e 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 df45c44872 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
Nate Butler cbd1e27e12 Update renamed/moved imports 2022-03-31 23:43:01 -04:00
Nate Butler 97917b8473 Type name 2022-03-31 23:42:45 -04:00
Keith SimmonsandNate Butler 6ebfdd8aa6 Finish dark.ts initial port and restructure files to get ready for build script
Build script currently fails to type check. Not sure whats going on. Will fix in the morning.

Co-authored-by: Nate Butler <nate@zed.dev>
2022-03-31 20:31:18 -07:00
Keith Simmons 6ebeacc0c6 wip 2022-03-31 19:05:21 -07:00
Keith Simmons 4e54a09062 Address panic when completions requested and returned to outdated buffer 2022-03-31 18:22:55 -07:00
Keith Simmons aa98902621 wip 2022-03-31 17:51:25 -07:00
Nate Butler a815864c8e WIP for keith 2022-03-31 20:32:47 -04:00
Nate Butler 9836d4d323 WIP: Scaffold tokens in dark.ts, no real values yet. 2022-03-31 19:10:44 -04:00
Keith SimmonsandMax Brunsfeld 0468cc5952 Provide diagnostic context to codeAction
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-31 15:39:52 -07:00
208c8d620d 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
42203752e5 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
Nate Butler fa36e66a4c Extract search from app
- Also update border to use borderColor( )
2022-03-31 11:27:02 -04:00
Keith Simmons bad4e01909 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
Nate Butler 0e65af56a9 Update app.ts, editor.ts 2022-03-31 01:38:18 -04:00
Max BrunsfeldandKeith Simmons 8450d218cd 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
Nathan Sobo 8771d4443e Convert chat panel 2022-03-30 18:45:34 -06:00
Nathan Sobo 1a8038af23 Convert project panel styles 2022-03-30 18:26:47 -06:00
Max BrunsfeldandKeith Simmons d97a956050 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
Nathan Sobo b4bc096ee8 Convert editor styles to TypeScript 2022-03-30 17:59:35 -06:00
Max BrunsfeldandKeith Simmons e5bb803ebb 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 199d4d07f5 Merge branch 'main' into typescript 2022-03-30 14:44:07 -07:00
Max Brunsfeld cd2eafe469 Merge pull request #701 from zed-industries/restart-lsp
Add restart-lsp keybinding
2022-03-30 13:59:04 -07:00
Keith SimmonsandMax Brunsfeld f11b269016 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 801cdde8a7 Test language server restart works as expected
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-30 13:08:36 -07:00