Antonio Scandurra
4e4210ac39
Open a buffer for every language server error when clicking on status
2022-06-16 10:00:29 +02:00
Keith Simmons
dddfc7beae
Add hover test and tweak dismiss logic
2022-06-09 17:03:45 -07:00
Max Brunsfeld
87ba68e3ea
Merge pull request #1155 from zed-industries/golang
...
Add Go support
2022-06-09 14:18:37 -07:00
Max Brunsfeld
7bb7187619
Add tests and fix bugs for editor indent/outdent commands w/ hard tabs
2022-06-09 10:26:09 -07:00
Max Brunsfeld
77b9ab0885
Add buffer test for autoindent with hard tabs
2022-06-09 09:05:07 -07:00
Antonio Scandurra
36a1a7a819
Start/stop language servers when enable_language_server
changes
2022-06-09 10:08:11 +02:00
Max Brunsfeld
f62fd3cddd
Add support for hard tabs
...
* Add a `hard_tabs` setting that causes indentation to be performed
using a tab instead of multiple spaces.
* Change Buffer's indentation-related APIs to return an `IndentSize`
struct with a length and a kind, instead of just a single u32.
* Use hard tabs by default in Go.
2022-06-08 18:30:10 -07:00
Antonio Scandurra
712d47d94f
Render a "Jump to Buffer" icon on all excerpt headers
2022-06-08 15:31:29 +02:00
Antonio Scandurra
eda569d6b2
Snapshot file instead of path when creating a buffer snapshot
2022-06-08 14:29:14 +02:00
Max Brunsfeld
8f4387a252
Start work on installing gopls
2022-06-07 18:38:37 -07:00
Keith Simmons
b014352740
Syntax highlighting working. Getting started on markdown support
2022-06-07 11:54:33 -07:00
Antonio Scandurra
70afc06666
Handle out-of-order edits coming from LSP
2022-06-06 16:15:11 +02:00
Antonio Scandurra
8826ad5ddd
Make Buffer::edit
and MultiBuffer::edit
resilient to inverted ranges
...
Previously, we would accept edits containing out-of-order ranges. When
generating such ranges in our randomized tests, many invariants started
breaking causing e.g. undo/redo to misbehave and operation application
to panic.
In theory, we should never pass inverted ranges, but this commit changes
the above functions to swap the start and the end when that occurs to avoid
breaking the entire system and panicking.
2022-06-06 15:22:36 +02:00
Antonio Scandurra
8ca0127658
Make LspAdapter::process_diagnostics
optional
2022-06-03 10:56:26 +02:00
Keith Simmons
d7d17b2148
WIP line mode operations
2022-05-26 17:02:05 -07:00
Antonio Scandurra
8ebefa143a
Upgrade tree-sitter to v0.20.6
...
This commit also adds a regression test to verify that with this new
version we don't mistakenly compute a different suggestion on Rust
buffer where the only change is leading whitespace.
2022-05-24 14:13:11 +02:00
Max Brunsfeld
3dee656490
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
d4bef67cf2
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
b4b61b4bbc
Consolidate edit and edit_batched functions
2022-04-28 16:52:04 -07:00
Keith Simmons
4c860dc82f
Removed unnecessary debug statements
2022-04-28 09:20:56 -07:00
Antonio Scandurra
76d6c00e0c
Fix randomized collaboration tests in language
2022-04-28 10:12:10 +02:00
Max Brunsfeld
e05793b52a
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
04fc1d5982
Building, but failing test WIP
2022-04-27 17:25:38 -07:00
Antonio Scandurra
cde5a45318
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
45922603f8
Infer completions old ranges based on the syntax tree
2022-04-25 13:14:05 -07:00
Max Brunsfeld
d12df4224a
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
bfec9e1ec2
Fix missing TypeScript outline entries and breadcrumbs
2022-04-22 13:49:03 -07:00
Max Brunsfeld
03d7035630
Avoid spurious highlight runs in Language::highlight_text
2022-04-22 13:13:54 -07:00
Max Brunsfeld
f52050a9ec
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
f9e0899e58
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
3e40b5bead
dynamically inject theme names and language properties into schema
2022-04-07 18:15:02 -07:00
Max Brunsfeld
664f17f92b
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
7e3cc67e0a
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
c62a3ea672
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
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
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
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
564225c401
Provide diagnostic context to codeAction
...
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-31 15:39:52 -07: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
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
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 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
Antonio Scandurra
bfa5dd52dd
Don't underflow when calling symbols_containing_offset(0)
2022-03-29 15:08:37 +02:00
Antonio Scandurra
a86118cfe2
Avoid matching duplicate impl
outline items in tests
2022-03-29 11:59:52 +02:00
Antonio Scandurra
d7026c2228
Merge branch 'main' into breadcrumbs
2022-03-29 10:05:05 +02:00