Max Brunsfeld and Nathan Sobo
c9d9e90b95
Avoid panic when language server is dropped before being initialized in tests
...
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-05-09 18:05:10 -07:00
Keith Simmons
94b6f4beb5
Merge pull request #929 from zed-industries/non-uniform-batched-edits
...
Allow batched edits where each range is associated with different insertion text
2022-04-29 16:14:38 -07:00
Keith Simmons
47d4f42467
Consolidate edit and edit_batched functions
2022-04-28 16:52:04 -07:00
Keith Simmons
5f9259719d
Removed unnecessary debug statements
2022-04-28 09:20:56 -07:00
Antonio Scandurra
fa7796a9e8
Fix randomized collaboration tests in language
2022-04-28 10:12:10 +02:00
Max Brunsfeld and Keith Simmons
76e4c4d0f1
Remove Option from Buffer edit APIs
...
Previously, buffer edits represented empty strings as None
variants of an Option. Now, the edit logic just explicitly
checks for empty strings.
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-27 18:00:13 -07:00
Keith Simmons
5051769dd3
Building, but failing test WIP
2022-04-27 17:25:38 -07:00
Antonio Scandurra and Nathan Sobo
e22b136a50
Clip scroll_top_row before navigating back to it
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-04-27 16:25:26 +02:00
Max Brunsfeld
a43d10518d
Infer completions old ranges based on the syntax tree
2022-04-25 13:14:05 -07:00
Max Brunsfeld
ff91709997
Merge pull request #894 from zed-industries/typescript-outline-fixes
...
Fix missing TypeScript outline entries and breadcrumbs
2022-04-22 14:21:46 -07:00
Max Brunsfeld
6b73d44d65
Fix missing TypeScript outline entries and breadcrumbs
2022-04-22 13:49:03 -07:00
Max Brunsfeld
7c3fe041d8
Avoid spurious highlight runs in Language::highlight_text
2022-04-22 13:13:54 -07:00
Max Brunsfeld
fee4a096ff
Use the 'jsonc' language id for all JSON files
...
This way, comments are allowed by the language server.
2022-04-21 12:08:16 -07:00
Antonio Scandurra
a51b05d3ff
Fix divergence bug when peer reconnects reusing a prior replica id
...
We forgot to observe the footprint of the reconnecting replica's prior
undos into the local clock. This could cause the replica to generate
edits with a version strictly smaller than what other peers may have
observed. As such, those peers would think they had already seen those
edits and skip them.
2022-04-11 13:17:47 +02:00
Keith Simmons
55f328e6a8
dynamically inject theme names and language properties into schema
2022-04-07 18:15:02 -07:00
Max Brunsfeld and Keith Simmons
e7039c123d
Avoid maintaining indent size as state on buffers
...
Indent size is still hard-coded, but it's now controlled by the
editor and not the buffer.
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-06 10:22:29 -07:00
Antonio Scandurra and Nathan Sobo
948542005f
Don't reuse old syntax tree when resetting a buffer's language
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-04-05 16:01:05 +02:00
Antonio Scandurra
91a2fe2d5e
Merge pull request #687 from zed-industries/vim-word-and-line-movement
...
Add word and line movement in vim normal mode
2022-04-04 14:42:27 +02: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
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
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
Keith Simmons and Max Brunsfeld
0468cc5952
Provide diagnostic context to codeAction
...
Co-authored-by: Max Brunsfeld <max@zed.dev >
2022-03-31 15:39:52 -07:00
Max Brunsfeld and Keith 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
7262c2455b
Move all configuration of individual LSP servers to LspAdapter
2022-03-29 18:14:30 -07:00
Max Brunsfeld
fa6e6fd8fe
Restructure fake language server setup
...
Replace FakeLanguageServerConfig with FakeLanguageServerAdapter
2022-03-29 17:55:57 -07:00
Keith Simmons
598d2433bf
Add restart-lsp keybinding
2022-03-29 17:24:23 -07:00
Max Brunsfeld
207e166471
Start work on allowing language servers to support multiple languages
2022-03-29 16:57:18 -07:00
Keith Simmons and Max Brunsfeld
3bcc515b7b
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
Antonio Scandurra
39fc25a23f
Don't underflow when calling symbols_containing_offset(0)
2022-03-29 15:08:37 +02:00
Antonio Scandurra
6f77e6fac7
Avoid matching duplicate impl outline items in tests
2022-03-29 11:59:52 +02:00
Antonio Scandurra
3b53604a0d
Merge branch 'main' into breadcrumbs
2022-03-29 10:05:05 +02:00
Max Brunsfeld
c6b04f7797
Make language's language server config non-optional
2022-03-28 18:14:49 -07:00
Max Brunsfeld
f675fc0c12
Remove duplication in build_language_registry
2022-03-28 18:01:29 -07:00
Keith Simmons
dda7cddc7c
Add word and line movement in vim normal mode
...
Add jump to start and end of the document
Move vim tests to relevant vim files
Rename VimTestAppContext to VimTestContext for brevity
Improve VimTestContext assertions to pretty print locations when selection position assertion panics
2022-03-27 17:58:28 -07:00
Nathan Sobo
77a4829660
Merge pull request #672 from zed-industries/fix-unfollowing-on-edit
...
Automatically unfollow leader only for edits that originate from the follower editor
2022-03-24 13:26:28 -06:00
Keith Simmons
ae4be7bb55
Merge pull request #676 from zed-industries/highlighted-text-fix
...
Highlighted text fix
2022-03-24 11:52:06 -07:00
Keith Simmons and Nathan Sobo
1eacdcf00a
Remove result from anchor cmp functions
...
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-03-24 11:48:31 -07:00
e0d394eaf6
Change language::anchor::min() to a constant
...
Co-authored-by: Antonio Scandurra <me@as-cii.com >
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-03-24 10:41:33 -07:00
dcb6b335e7
Make rename highlights work across multibuffer excerpts
...
Co-authored-by: Antonio Scandurra <me@as-cii.com >
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-03-24 10:22:47 -07:00
Antonio Scandurra
a0ca4a13f8
Rename editor::Event::Edited to editor::Event::BufferEdited
...
This is to distinguish it from a new event we're about to add which
represent edits originating from that specific editor.
2022-03-24 08:55:46 +01:00
Max Brunsfeld
0876781606
Fix extending selections starting at ends of other nodes
...
Fixes #478
2022-03-23 15:38:23 -07:00
Antonio Scandurra
2f1b1abbb8
Merge pull request #661 from zed-industries/follow
...
Introduce basic following experience
2022-03-23 15:17:44 +01:00
Antonio Scandurra
0de3f0980f
Automatically unfollow when editing, scrolling or changing selections
2022-03-22 09:17:01 +01:00
Nathan Sobo and Keith Simmons
ce4280c12f
Remove CharKind::Newline
...
This is just a character, and so it seems clearer to refer to it specifically when we want to know if a character is a newline. There was only one case where we relied on Newline being different from Whitespace, and we special-cased that instance. Changing this actually makes us match the behavior of VS Code when double-clicking runs of multiple newlines.
/cc @as-cii
Co-Authored-By: Keith Simmons <keith@the-simmons.net >
2022-03-21 15:17:32 -06:00
Max Brunsfeld and Antonio Scandurra
18848bd463
Match the leader's last selection when unfollowing
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-03-21 14:04:55 -07:00
Max Brunsfeld and Antonio Scandurra
70e323e4dc
Start work on updating editors's scroll positions when following
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-03-18 12:56:20 -07:00
Antonio Scandurra
d37930e006
Serialize initial follow state in leader and reflect it in follower
2022-03-18 10:22:13 +01:00