Commit graph

3637 commits

Author SHA1 Message Date
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
Nate Butler
c6c6cc591a Update app.ts, editor.ts 2022-03-31 01:38:18 -04:00
Max Brunsfeld
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
Nathan Sobo
b8118ee50e Convert chat panel 2022-03-30 18:45:34 -06:00
Nathan Sobo
4a728bb3d3 Convert project panel styles 2022-03-30 18:26:47 -06:00
Max Brunsfeld
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
Nathan Sobo
89eb34209f Convert editor styles to TypeScript 2022-03-30 17:59:35 -06:00
Max Brunsfeld
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 Simmons
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 Simmons
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 Scandurra
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
Nathan Sobo
32b6c3d3d4 Express workspace in terms of new components
Co-Authored-By: Nate Butler <1714999+iamnbutler@users.noreply.github.com>
2022-03-29 16:28:19 -06:00
Nate Butler
39f46f64a6 WIP: Color WIP 2022-03-29 17:10:46 -04:00
Keith Simmons
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
Nate Butler
9669f5a8f8 WIP: Add rose color tokens to core.ts 2022-03-29 15:33:03 -04:00
Nathan Sobo
1615c6150a Start on TypeScript-based styling system
Co-Authored-By: Nate Butler <1714999+iamnbutler@users.noreply.github.com>
2022-03-29 13:08:00 -06:00
Max Brunsfeld
d466768eed WIP 2022-03-29 11:06:08 -07:00
Max Brunsfeld
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
Antonio Scandurra
bfa5dd52dd Don't underflow when calling symbols_containing_offset(0) 2022-03-29 15:08:37 +02:00
Antonio Scandurra
d7a39a2116 Honor SearchBar being dismissed when changing the active item 2022-03-29 15:08:33 +02:00
Antonio Scandurra
42a7e573bc Add padding to toolbar 2022-03-29 12:17:37 +02:00
Antonio Scandurra
a86118cfe2 Avoid matching duplicate impl outline items in tests 2022-03-29 11:59:52 +02:00
Antonio Scandurra
9df2dacd85 Restructure Pane to have a single Toolbar with multiple items 2022-03-29 11:48:21 +02:00
Antonio Scandurra
d296bb21a8 Emit Event::PaneAdded in Workspace when a new pane is created 2022-03-29 10:24:42 +02:00
Antonio Scandurra
d7026c2228 Merge branch 'main' into breadcrumbs 2022-03-29 10:05:05 +02:00
Max Brunsfeld
a8600e76a3 Make language's language server config non-optional 2022-03-28 18:14:49 -07:00
Max Brunsfeld
4d456d3847 Remove duplication in build_language_registry 2022-03-28 18:01:29 -07:00
Antonio Scandurra
cc9843c90e
Merge pull request #692 from zed-industries/selection-history
Allow undoing and redoing selections via `cmd-u` and `cmd-shift-u`
2022-03-28 17:55:09 +02:00
Antonio Scandurra
f274a6ab4f Avoid unnecessary clones when undoing/redoing selections 2022-03-28 17:47:14 +02:00
Antonio Scandurra
5ef6337b09 Merge branch 'main' into selection-history 2022-03-28 17:24:46 +02:00
Antonio Scandurra
aec82ef71e Test selection history
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-28 17:20:52 +02:00
Antonio Scandurra
45ecd8e0a6 Always use square brackets in marked_text_ranges
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-28 17:11:35 +02:00
Antonio Scandurra
686085dd60
Merge pull request #690 from zed-industries/indent-keybindings
Bind `Outdent` and `Indent` respectively to `cmd-[` and `cmd-]`
2022-03-28 16:50:23 +02:00
Antonio Scandurra
bbfb63ff89 Cap selection history to 1024 entries 2022-03-28 16:37:48 +02:00
Antonio Scandurra
2a1fed1387 Insert tabs instead of indenting only when all selections are empty
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-28 16:36:12 +02:00