Julia
374c1a3a3e
Remove some status stuff
2023-06-23 00:17:27 -04:00
KCaverly
dd309070eb
open ai indexing on open for rust files
2023-06-22 16:50:07 -04:00
Julia
e15be61ded
The log-ification
2023-06-21 14:02:21 -04:00
Julia
f91e95f24a
Merge branch 'main' into fix-broken-lsp-installations
2023-06-20 17:23:34 -04:00
Nathan Sobo
03993ea719
Rename SumTree::push_tree to ::append ( #2626 )
...
This is something I've been meaning to rename in SumTree. Was looking at
the code and figure why not now.
2023-06-20 08:37:55 -06:00
Nathan Sobo
8c298a9da5
Rename SumTree::push_tree to ::append
2023-06-19 19:49:33 -06:00
Max Brunsfeld
1215de0c42
Show a notification when unable to start elixir-ls
2023-06-19 18:05:30 -07:00
Max Brunsfeld
57c2d85c66
Show a notification that gopls can't be installed without go
2023-06-19 18:05:12 -07:00
Max Brunsfeld
360bbebbd9
Introduce LspAdapterDelegate trait, passed to LspDelegates
2023-06-19 16:12:25 -07:00
Julia
da2ee55013
Route some more information for reinstall after startup failure
...
Doesn't actually reinstall on that particular failure due to wrong
variant in hashmap
2023-06-19 15:18:12 -04:00
Julia
abe5ecc5ec
Actually fully start reinstalled language server
2023-06-15 13:56:07 -04:00
Julia
f81ccbd652
Setup C adapter with test binary
2023-06-15 12:18:34 -04:00
Julia
4d24eae901
Actually check and reinstall broken server
2023-06-15 12:18:34 -04:00
Julia
bca625a197
Many steps toward validating and reinstalling server after failure
2023-06-15 12:18:34 -04:00
Julia
ec0409a3d1
Detect LSP startup failure
2023-06-15 12:18:34 -04:00
Piotr Osiewicz
b272db9e21
editor: Add language setting for comment continuations ( #2605 )
...
Per @JosephTLyons request I've added a language setting for comment
continuations.
Release Notes:
- Added a language setting for comment continuations.
2023-06-13 18:59:46 +02:00
Max Brunsfeld
01bd5c30fc
Fix syntax map bug with combined injections inside of other injections
2023-06-12 17:32:20 -07:00
Max Brunsfeld
ac1882b99b
Move SyntaxMap tests to their own file
2023-06-12 16:24:17 -07:00
Max Brunsfeld
56b749788f
Improve the look of the syntax tree view UI
2023-06-12 15:14:57 -07:00
Max Brunsfeld
086cfe57c5
Start work on a syntax tree view
2023-06-12 15:14:56 -07:00
Max Brunsfeld
4b9a3c66e6
Show function parameters in elixir outline view
...
Introduce a new capture in the outline query called 'context.extra', which
causes text to appear in the outline, but not in the breadcrumbs.
2023-06-06 16:27:05 -07:00
Max Brunsfeld
6737ee1495
Avoid panic when failing to load a language's queries
2023-06-06 16:06:16 -07:00
Max Brunsfeld
7bfb51ee76
Live-reload tree-sitter queries in development
2023-06-06 14:20:21 -07:00
Joseph Lyons
7c60f636d5
Fix typos
2023-06-02 22:02:19 -04:00
Max Brunsfeld
0d281c1b89
🎨
2023-05-31 15:13:01 -07:00
Max Brunsfeld
0dd7694ff5
Make language_settings take a language, not a language name
2023-05-31 15:10:30 -07:00
Max Brunsfeld
03a351fb26
Make language settings accessors take an arc dyn file
2023-05-31 14:57:04 -07:00
Max Brunsfeld
a2ab7c9eb9
Respect project-specific settings for copilot
2023-05-31 14:42:15 -07:00
Max Brunsfeld
89446c7fd4
Start work on respecting project-specific settings
2023-05-29 14:25:49 -07:00
Max Brunsfeld
2db57b5139
Adjust diagnostic transformation test to not wait for two buffer notifications
2023-05-26 15:47:37 -07:00
Julia
5e39ba596e
Clean up final remaining code paths calling old diff update method
2023-05-25 14:41:09 -04:00
Julia
8d662edb6c
Remove concept of git diff refresh from Item
trait
2023-05-25 14:29:28 -04:00
Julia
cede296b04
Project level git diff recalc handling
...
This avoids an issue where in a many-buffer multi-buffer, each modified
buffer could complete its recalc independently, causing a cascade of
repeated notifies
Now all recalcs started at the same time must complete before
A: Starting another recalc pass
B: The master notify occurring
Each buffer can still show its new diff if something else triggers it
to notify earlier, this is desirable and does not have the same negative
effects as the notify cascade as those re-layouts would need to happen
anyway
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-05-25 14:10:27 -04:00
Max Brunsfeld
54421b11f3
wip
2023-05-25 14:10:27 -04:00
Nathan Sobo
747322a02d
Merge remote-tracking branch 'origin/main' into zmd
2023-05-24 11:04:07 -06:00
Nathan Sobo
30de64845f
WIP
2023-05-22 23:11:27 -06:00
Max Brunsfeld
7689cdf3f9
Clear old diagnostics when restarting a language server
2023-05-22 12:53:22 -07:00
Max Brunsfeld
e129ed2d91
Fix spurious setting error log messages ( #2498 )
...
Fixes a bug introduced in
https://github.com/zed-industries/zed/pull/2448 , where error messages
would be logged if the user config didn't specify certain fields like
`journal` or `telemetry`.
2023-05-22 11:44:21 -07:00
Mikayla Maki
bbb68c523c
Refactored apart the forward and the backwards iterator for diff hunks
2023-05-19 18:09:47 -07:00
Max Brunsfeld
e32233c826
Fix spurious setting error logs on non-existent setting keys
2023-05-19 17:15:05 -07:00
Max Brunsfeld
847d1e73a3
Replace remaining usages of glob crate with globset
2023-05-19 09:36:46 -07:00
Julia
bd29812391
Avoid panic in get_injections
( #2486 )
2023-05-18 13:35:10 -04:00
Julia
5ab1ae1521
Avoid panic in get_injections
2023-05-18 12:23:49 -04:00
Max Brunsfeld
258723566f
Rename settings::register_setting -> settings::register
2023-05-17 15:06:11 -07:00
Max Brunsfeld
2d5f03e148
Remove optional path argument when getting settings
2023-05-17 15:05:20 -07:00
Max Brunsfeld
67a25126d4
Define theme/ui text style settings in theme crate
2023-05-17 14:44:59 -07:00
Max Brunsfeld
d2ba18eae9
Customize language settings JSON schema in language crate
2023-05-17 09:26:36 -07:00
Max Brunsfeld
39618ae32d
Define language settings in the language crate
2023-05-16 17:29:53 -07:00
Max Brunsfeld
4f8607039c
Add is_tab field to chunks
...
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-05-08 19:36:51 +03:00
Kirill Bulatov
6cb0bc89d2
Remove unused dependencies
2023-05-07 21:07:55 +03:00
Julia
1883e260ce
Offload text::Buffer
construction to background worker
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-05-04 12:32:31 -04:00
Julia
3f7533a0b4
Show source of diagnostic hovers
2023-04-27 14:35:34 -04:00
Max Brunsfeld
ebbe52e6b0
🎨 Specify more dependencies at the workspace level
2023-04-24 17:41:55 -07:00
Max Brunsfeld
abdccf7393
Use a workspace dependency for the futures crate
2023-04-24 09:43:31 -07:00
Max Brunsfeld
32c57bcd22
Store buffer's diagnostic sets in a smallvec
2023-04-20 08:58:41 -07:00
Max Brunsfeld
0ebe44bfd5
Handle multiple language servers for a given path in project diagnostics view
2023-04-20 08:58:41 -07:00
Max Brunsfeld
4dd917c123
Introduce a LanguageServerId wrapper type
...
Clarify the meaning of all the usizes in use in all of these
struct fields an method signatures.
2023-04-20 08:58:41 -07:00
Julia
9e2949e7ba
Refactor language server startup
...
Avoid parallel vecs
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-20 08:58:41 -07:00
Julia
df94aee758
Fix failing tests
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-20 08:58:41 -07:00
Julia
6156dbced0
Finish getting multiple diagnostics sources building and running
2023-04-20 08:58:41 -07:00
Julia
bb4de47b15
Start getting diagnostics sets to work with multiple servers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-20 08:58:41 -07:00
Julia
ba7233f265
Incomplete refactor to allow for multiple adapters per language
2023-04-20 08:58:39 -07:00
Antonio Scandurra
34bcf6f072
Reopen file in Copilot language server when language or URI changes
2023-04-20 09:34:20 +02:00
Max Brunsfeld
5934e882b8
Merge pull request #2379 from zed-industries/shebang
...
Select language based on a file's first content line in addition to its path
2023-04-18 17:31:19 -07:00
Max Brunsfeld
bd7d50f339
Fix 'invalid insertion' panic when following
...
Wait for the necessary buffer operations to arrive before attempting to
set selections and scroll top.
2023-04-18 16:13:18 -07:00
Max Brunsfeld
1dcd4717b1
Select language based on a file's first content line in addition to its path
2023-04-16 12:28:27 -07:00
Max Brunsfeld
25e3c4e586
Fix leak when project is unshared while LSP handler waits for edits
2023-04-10 17:03:58 -07:00
Nathan Sobo
de9bf6dfbd
Merge MutableAppContext into AppContext
...
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
Mikayla Maki
81411b9114
Merge branch 'main' into copilot
2023-03-30 16:57:18 -07:00
Julia
cdde523ea4
Allow each language adapter to provide their own code action kinds array
2023-03-30 15:41:54 -04:00
Mikayla Maki
ae3b3ea458
Merge branch 'main' into copilot
2023-03-29 16:57:38 -07:00
Antonio Scandurra
a64296938d
Delete unused code
2023-03-29 09:04:13 +02:00
Antonio Scandurra
5471217089
Use the same serde version across the entire workspace
2023-03-28 09:42:00 -07:00
Mikayla Maki
455cdc8b37
Add copilot crate
...
Refactor HTTP and github release downloading into util
Lazily download / upgrade the copilot LSP from Zed
Co-authored-by: Max <max@zed.dev>
Co-Authored-By: Antonio <antonio@zed.dev>
2023-03-28 09:41:59 -07:00
Julia
d4560fe321
Prevent deadlock when multiple languages attempt to install Node at once
2023-03-28 10:18:22 -04:00
Julia
df4380b066
Download aarch64 or x64 Node binary according to system architecture
2023-03-27 11:05:17 -04:00
Julia
c72d33e029
Initial impl of NodeRuntime
w/JSON borked and a deadlock :)
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-03-27 00:00:16 -04:00
Julia
1a2e509e35
Remove server_args
from LspAdapter
...
Prepare to remove concept of a runtime from greater server startup code,
which is important for future language server extensibility
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-03-27 00:00:16 -04:00
Julia
edd6c85af7
Initial running of servers on downloaded Node
2023-03-27 00:00:16 -04:00
Julia
b579211861
Report if language server requires Node or not
2023-03-27 00:00:16 -04:00
Nathan Sobo
195215f1e0
Add "editor: copy highlight json" command
...
Nate needs this to feed to Figma for highlighted code in designs.
2023-03-24 16:37:57 -06:00
Max Brunsfeld
361b7c3a0c
Clear auto-indent requests when replacing a buffer's entire text
2023-03-22 15:10:16 -07:00
Max Brunsfeld
5da2b123b5
Allow refreshing worktree entries while the initial scan is in-progress
2023-03-21 15:15:12 -07:00
Max Brunsfeld
cbeb6e692d
Move postage crate version specification to workspace Cargo.toml
2023-03-21 11:26:13 -07:00
Antonio Scandurra
1af8f4be19
Deserialize Theme
directly into the heap to avoid stack overflow
...
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-03-17 15:58:52 +01:00
Julia
757f05042d
Fix deadlock while initializing JSON language server
...
As it turns out both parking-lot and std's `RwLock` disallows taking
multiple read locks on the same thread
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-03-16 17:32:51 -04:00
Antonio Scandurra
88e664bfd9
Add test for language registration and loading
2023-03-16 10:46:55 +01:00
Antonio Scandurra
4d52fc0d12
Remove available language only when it has loaded
...
This also ensures that, if you load the same language more than once,
a future that resolves to the language (or an error) is returned at
all times. Previously, we would only return it the first time the language
was loaded.
2023-03-16 10:46:55 +01:00
Antonio Scandurra
a8ac08f5bd
Coalesce multiple RwLock
s into one LanguageRegistryState
struct
2023-03-16 10:46:55 +01:00
Antonio Scandurra
e30ea43a14
Include loaded languages when computing lsp workspace configuration
2023-03-16 10:46:55 +01:00
Antonio Scandurra
60d3fb48e2
Start computing workspace configuration more dynamically
2023-03-16 10:46:55 +01:00
Joseph Lyons
3c7237e600
Sort language names case agnostically
2023-03-14 21:45:17 -04:00
Antonio Scandurra
7a600e7a65
Allow waiting for language to be loaded in LanguageRegistry
APIs
2023-03-10 12:17:47 +01:00
Antonio Scandurra
a00ce3f286
Add randomized test to remove active selections from buffer
2023-03-09 07:47:05 +01:00
Antonio Scandurra
a435dc1339
Clear selections on buffer only if they hadn't been cleared already
2023-03-08 17:04:01 +01:00
Max Brunsfeld
124aa74b03
Merge pull request #2234 from zed-industries/error-on-combined-injections-in-injections
...
Fix range relativization when combined injections occur inside of other injections
2023-03-03 11:58:13 -08:00
Max Brunsfeld
a366ba19af
Fix range relativization when combined injections occur inside of other injections
...
For example, ERB template inside of a markdown code block
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-03-01 14:38:35 -08:00
Max Brunsfeld
70cb2fa8d7
Apply external command formatting if buffer has changed while computing it
2023-03-01 10:17:04 -08:00
Max Brunsfeld
1deff43639
Avoid calling edits_since in apply_diff
2023-02-28 21:52:00 -08:00
Max Brunsfeld
a890b8f3b7
Add a setting for ensuring a single final newline on save
2023-02-28 21:52:00 -08:00
Max Brunsfeld
7faa0da5c7
Avoid finalizing transactions inside Buffer::apply_diff
2023-02-28 21:52:00 -08:00
Max Brunsfeld
ff85bc6d42
Add setting for removing trailing whitespace on save
2023-02-28 21:52:00 -08:00
Max Brunsfeld
b00e467ede
Add APIs for stripping trailing whitespace from a buffer
2023-02-28 21:52:00 -08:00
Max Brunsfeld
a11165ad0a
Add unit test for auto-closing quotation marks with overrides
2023-02-20 13:46:17 -08:00
Max Brunsfeld
8be844a13f
Add test that loads all bundled languages
2023-02-20 10:53:37 -08:00
Max Brunsfeld
8922156923
Restructure how bracket pairs are overridden to unify lists
...
This way, a bracket pair that is disabled in a given scope can still be skipped, if
it was auto-closed before that scope existed.
2023-02-20 10:53:37 -08:00
Max Brunsfeld
2982a98d1c
Merge pull request #2187 from zed-industries/save-untitled-buffer-bugs
...
Fix newly-discovered bugs in saving untitled buffers
2023-02-20 10:05:58 -08:00
Max Brunsfeld
56b7eb6b6f
Only send UpdateBufferFile messages for buffers whose files have changed
...
Send that message when saving a buffer as a new path.
2023-02-20 09:41:59 -08:00
Kay Simmons
ac3e8f61ef
Merge pull request #2186 from zed-industries/better-vim-matching-motion
...
Better vim matching motion
2023-02-17 22:10:28 -08:00
Kay Simmons
fc811d14b1
Fix failing test
2023-02-17 22:00:39 -08:00
Max Brunsfeld
3a7cfc3901
Move the save and save_as code paths close together
2023-02-17 17:21:48 -08:00
Kay Simmons
5e4d113308
fix bracket ranges failing test
2023-02-17 17:19:23 -08:00
Kay Simmons
57a7ff9a6f
fix vim percent motion to better match the docs and observed behavior
2023-02-17 14:55:19 -08:00
Max Brunsfeld
eebce28b32
Respect UpdateBufferFile messages on guest buffers without file
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-02-17 12:38:04 -08:00
Max Brunsfeld
98b51634c4
Merge pull request #2182 from zed-industries/faster-injections
...
Fix syntax-related performance problems on gigantic files
2023-02-16 12:52:13 -08:00
Kay Simmons
eac33d732e
wip
2023-02-16 12:23:45 -08:00
Kay Simmons
0ba051a754
use more predictable rules for selecting which bracket to jump to and where
2023-02-15 14:04:16 -08:00
Antonio Scandurra
6703264600
Limit BufferSnapshot::chunks
to the outline item range
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-02-13 19:57:15 +01:00
Max Brunsfeld
ddf4e1a316
Load languages lazily in the background
2023-01-25 17:47:46 -08:00
Max Brunsfeld
678ee26c5e
Merge branch 'main' into markdown-fenced-blocks
2023-01-24 14:13:50 -08:00
Antonio Scandurra
dff08d3cfe
Merge branch 'main' into markdown-fenced-blocks
2023-01-24 15:43:35 +01:00
Antonio Scandurra
c48e3f3d05
Reparse unknown injection ranges in buffer when adding a new language
2023-01-24 15:29:59 +01:00
Antonio Scandurra
f3509824e8
WIP: Start on SyntaxMapSnapshot::unknown_injection_languages
2023-01-24 12:55:49 +01:00
Antonio Scandurra
14c72cac58
Store syntax layers even if a language for the injection can't be found
2023-01-24 12:25:12 +01:00
Nathan Sobo
96ffe84edb
Document Buffer::reparse
2023-01-23 21:51:10 -07:00
Mikayla Maki
d060114f00
Added complete scripts for generating third party license files
2023-01-23 12:47:12 -08:00
Antonio Scandurra
8dabdd1baa
Ensure injection layer is recomputed when language changes
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-01-23 19:02:06 +01:00
Antonio Scandurra
79cf6fb8b6
WIP: Add test for dynamic language injection
2023-01-23 09:45:36 +01:00
Antonio Scandurra
cb610f37f2
WIP: Search language injections also by file extension
...
There are still a few things left:
1. Add test to verify we can successfully locate a language by its extension
2. Add test to reproduce bug where changing the fenced code block language
won't reparse the block with the new language
3. Reparse injections for which we couldn't find a language when the language
registry changes.
4. Check why the markdown grammar considers the trailing triple backtick as
`(code_block_content)`, as opposed to being part of the outer markdown.
2023-01-23 08:56:41 +01:00
Antonio Scandurra
36e4dcef16
Avoid allocating a string to compare language names
2023-01-23 08:56:41 +01:00
Antonio Scandurra
c49dc8d6e5
Rename LanguageRegistry::get_language
to language_for_name
2023-01-23 08:56:41 +01:00
Max Brunsfeld
56080771e6
Add test for avoiding indent adjustment inside newly-created errors
2023-01-20 17:02:38 -08:00
Max Brunsfeld
f7ceebfce3
Avoid adjusting indentation of lines inside newly-created errors
2023-01-20 15:56:45 -08:00
Max Brunsfeld
8dcef46842
Drop 'override.' prefix from capture names in override query
...
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-20 10:44:33 -08:00
Max Brunsfeld
2aa7a9e95b
Add overrides for all languages
...
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-20 10:39:31 -08:00
Max Brunsfeld
2967b46a17
Implement scope-specific bracket matching and comment toggling
...
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-19 15:04:27 -08:00
Max Brunsfeld
1851e2e77c
Start work on language config overrides
...
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-19 12:32:08 -08:00
Antonio Scandurra
a58b39f884
Merge branch 'main' into optimize-large-multi-buffers
2023-01-19 16:18:21 +01:00
Max Brunsfeld
d9948bf772
Prevent outline items from accidentally spanning multiple lines
2023-01-18 16:43:18 -08:00
Antonio Scandurra
a653e87658
WIP: Avoid converting RopeFingerprint into a string
...
Co-Authored-By: Petros Amoiridis <petros@zed.dev>
2023-01-18 12:22:08 +01:00
Max Brunsfeld
1a6a807db5
Merge pull request #2035 from zed-industries/always-auto-indent-block-on-paste
...
Always auto-indent in block-wise mode when pasting
2023-01-17 10:24:41 -08:00
Antonio Scandurra
bb200aa082
Relay saved version metadata to ensure buffers modified state converges
2023-01-17 16:32:54 +01:00
Antonio Scandurra
467e5691b9
Include saved mtime and fingerprint when serializing buffers
...
This still doesn't include:
- An assertion in the randomized test to ensure buffers are not spuriously
marked as modified
- Sending an update when synchronizing buffers after a reconnection
2023-01-17 10:46:19 +01:00
Max Brunsfeld
0bd6f9b6ce
Add a test for block-wise auto-indent without original indent info
2023-01-16 18:06:58 -08:00
Max Brunsfeld
244f259331
Always auto-indent in block-wise mode when pasting
...
If the text was copied outside of Zed, so the original indent column is unknown,
then act as if the first line was copied in its entirety.
2023-01-16 17:42:06 -08:00
Antonio Scandurra
ad7eaca443
Make Buffer::diff_base
available outside of tests
2023-01-08 09:36:58 -07:00
Nathan Sobo
213658f1e9
Fix tests that failed due to defaulting the grouping interval to zero in tests
2023-01-06 17:56:21 -07:00
Max Brunsfeld
c321f5d94a
Assert that buffers' file state matches in randomized collab test
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-12-21 15:38:44 -08:00
Antonio Scandurra
47348542ef
Synchronize buffers when either the host or a guest reconnects
2022-12-21 14:20:56 +01:00
Julia
de9c58d216
Merge pull request #1983 from zed-industries/multi-buffer-git-gutter
...
Multi buffer git gutter
2022-12-19 10:53:42 -05:00