Commit Graph

1439 Commits

Author SHA1 Message Date
Kirill Bulatov
c2751c717e Parallelize ignored entries for search lookup 2023-11-23 09:53:00 +02:00
Kirill Bulatov
566857b0b7 Output non-ignored files first 2023-11-22 19:03:27 +02:00
Kirill Bulatov
92953fb53d If enabled, search in ignored files during project search 2023-11-22 16:41:02 +02:00
Kirill Bulatov
d352a63d9d Port new workspace logic to gpui2, uncomment most of the workspace2 tests 2023-11-17 22:54:19 +02:00
Kirill Bulatov
616bda85e9 Fix the tests 2023-11-17 21:40:57 +02:00
Kirill Bulatov
2759ed4d00 An attempt to ignore git regularly 2023-11-17 21:40:57 +02:00
Kirill Bulatov
8180938401 Fix most of the TODOs 2023-11-17 21:40:57 +02:00
Kirill Bulatov
6028cd90d4 Retract back to original scanning strategy
Do not descend into ignored directories, to avoid tracking their state.
2023-11-17 21:40:57 +02:00
Kirill Bulatov
906db58188 Defer ignored dirs scanning 2023-11-17 21:40:57 +02:00
Kirill Bulatov
30fefa0ef8 Use a better name 2023-11-17 21:40:57 +02:00
Kirill Bulatov
5f468970f0 Fix some of the old tests 2023-11-17 21:40:57 +02:00
Kirill Bulatov
d3ce82e82c Fix the new test 2023-11-17 21:40:57 +02:00
Kirill Bulatov
cafeba103b Exclude ignored opened buffers from search 2023-11-17 21:40:57 +02:00
Kirill Bulatov
ce2cfc6035 Fix the ! bug, better test draft 2023-11-17 21:40:57 +02:00
Kirill Bulatov
26f7e66b49 Add default scan excluded files settings 2023-11-17 21:40:56 +02:00
Kirill Bulatov
9373d38434 Rescan worktree on scan exclusions settings change 2023-11-17 21:40:56 +02:00
Kirill Bulatov
1612c90052 More lenient file path matchers 2023-11-17 21:40:56 +02:00
Kirill Bulatov
b8be720490 Fix the bugs 2023-11-17 21:40:56 +02:00
Kirill Bulatov
126e4cce8f Scan all ignored files by default now 2023-11-17 21:40:56 +02:00
Kirill Bulatov
401f85bed2 Properly ignore elements from configured exceptions 2023-11-17 21:40:56 +02:00
Kirill Bulatov
9072e5a507 Properly set ignore stacks and is_ignored values 2023-11-17 21:40:56 +02:00
Kirill Bulatov
7d97dfa6be Test and filter data draft 2023-11-17 21:40:56 +02:00
Kirill Bulatov
a5c615ceb4 Pass a new query parameter into the search 2023-11-17 21:40:56 +02:00
Max Brunsfeld
0bed5e4562 Port buffer reload bug fixes back to gpui1 crates 2023-11-16 16:03:14 -08:00
Kirill Bulatov
888098bad2 More detailed errors when opening files 2023-11-15 16:20:00 +02:00
Kirill Bulatov
2e957bc564 Do not propose prettier formatters for documents in node_modules/ 2023-11-09 14:49:37 +02:00
Kirill Bulatov
8be07eddcc Change locate prettier method signature 2023-11-09 14:23:33 +02:00
Kirill Bulatov
09346fb9f1 Port changes to zed2 2023-11-03 11:02:50 +02:00
Kirill Bulatov
24dd1c5812 Properly order default prettier installations and startups 2023-11-03 11:02:50 +02:00
Kirill Bulatov
244c693968 Reuse already running default prettiers 2023-11-03 11:02:50 +02:00
Kirill Bulatov
cf95f9b082 Make it more clear that missing prettier is to blame 2023-11-03 11:02:50 +02:00
Kirill Bulatov
369b5140fb Restore LSP names for prettier servers 2023-11-03 11:02:50 +02:00
Kirill Bulatov
b75d8a60a8 Simplify 2023-11-03 11:02:50 +02:00
Kirill Bulatov
ff144def63 Fix the bugs 2023-11-03 11:02:50 +02:00
Kirill Bulatov
6bbb79a9f5 Rework prettier installation and start 2023-11-03 11:02:50 +02:00
Kirill Bulatov
d673efebd2 Add prettier workspace resolution test 2023-11-03 11:02:50 +02:00
Max Brunsfeld
c467fa955b Comment out hanging project2 tests
Co-authored-by: Conrad <conrad@zed.dev>
2023-11-01 10:38:47 -07:00
Kirill Bulatov
6ee9beed73 Enqueue default prettier installations 2023-10-31 11:54:40 +02:00
Kirill Bulatov
fd6f6cc9f8 Return proper full paths for single file workspaces 2023-10-30 22:33:44 +02:00
Kirill Bulatov
033d0ae610 Remember default prettier and its plugin installation 2023-10-30 22:09:36 +02:00
Julia
8db3b3b4ca Limit language server reinstallation attempts 2023-10-26 17:14:34 +02:00
Julia
170ebd8221 Capture language server stderr during startup/init and log if failure 2023-10-26 12:29:22 +02:00
Kirill Bulatov
e9ce935991 Rework prettier tests
Do not infuse `FakeNodeRuntime` with prettier exceptions, rather keep
the default formatter installation method as no-op.
2023-10-24 14:25:46 +02:00
KCaverly
feefb8d063 fixed format! call for prettier:: 2023-10-24 13:37:34 +02:00
KCaverly
0dd45bbf21 fully qualify paths inside conditional compilation methods 2023-10-24 13:35:28 +02:00
KCaverly
8ffe5a3ec7 move keychain access into semantic index as opposed to on init 2023-10-24 13:26:37 +02:00
Kirill Bulatov
7748848b6e Move prettier parsers data into languages from LSP adapters 2023-10-21 01:14:03 +02:00
Piotr Osiewicz
31241f48be
workspace: Do not scan for .gitignore files if a .git directory is encountered along the way (#3135)
Partially fixes zed-industries/community#575

This PR will see one more fix to the case I've spotted while working on
this: namely, if a project has several nested repositories, e.g for a
structure:
/a
/a/.git/
/a/.gitignore
/a/b/
/a/b/.git/
/a/b/.gitignore

/b/ should not account for a's .gitignore at all - which is sort of
similar to the fix in commit #c416fbb, but for the paths in the project.

The release note is kinda bad, I'll try to reword it too.
- [ ] Improve release note.
- [x] Address the same bug for project files.

Release Notes:
- Fixed .gitignore files beyond the first .git directory being respected
by the worktree (zed-industries/community#575).
2023-10-17 18:56:03 +02:00
Julia
2323fd17b0
Autocomplete docs (#3126)
Release Notes:

- Added documentation display for autocomplete items.
- Fixed autocomplete filtering blocking the Zed UI, causing hitches and
input delays with large completion lists.
- Fixed hover popup link not firing if the mouse moved a slight amount
while clicking.
- Added support for absolute path file links in hover popup and
autocomplete docs.
2023-10-13 13:26:45 -04:00
Piotr Osiewicz
bfbe4ae4b4
Piotr/z 651 vue support (#3123)
Release Notes:

- Added Vue language support.
2023-10-13 18:58:59 +02:00
Kirill Bulatov
803ab81eb6 Update diagnostics indicator when diagnostics are udpated 2023-10-13 12:13:18 +03:00
Kirill Bulatov
12d7d8db0a Make all formatting to happen on the client's buffers, as needed 2023-10-12 15:29:57 +03:00
Kirill Bulatov
7f4ebf50d3 Make the first prettier test pass 2023-10-12 13:30:49 +03:00
Kirill Bulatov
e50f4c0ee5 Add prettier tests infrastructure 2023-10-11 19:13:28 +03:00
Kirill Bulatov
4a88a9e253 Initialize prettier right after the buffer gets it language 2023-10-11 14:48:32 +03:00
Kirill Bulatov
986a516bf1 Small style fixes 2023-10-11 12:56:29 +03:00
Kirill Bulatov
b5705e079f Draft remote prettier formatting 2023-10-11 12:56:29 +03:00
Kirill Bulatov
2ec2036c2f Invoke remote Prettier commands 2023-10-11 12:56:29 +03:00
Kirill Bulatov
faf1d38a6d Draft local and remote prettier separation 2023-10-11 12:56:29 +03:00
Kirill Bulatov
2d5741aef8 Better prettier format logging 2023-10-11 12:56:29 +03:00
Kirill Bulatov
a9f80a603c Resolve prettier config before every formatting 2023-10-11 12:56:29 +03:00
Kirill Bulatov
658b58378e Properly use WorktreeId 2023-10-11 12:56:29 +03:00
Kirill Bulatov
8a807102a6 Properly support prettier plugins 2023-10-11 12:56:29 +03:00
Kirill Bulatov
afee29ad3f Do not clear cache for default prettiers 2023-10-11 12:56:29 +03:00
Kirill Bulatov
6ec3927dd3 Allow to configure default prettier 2023-10-11 12:56:29 +03:00
Kirill Bulatov
b109075bf2 Watch for prettier file changes 2023-10-11 12:56:29 +03:00
Kirill Bulatov
f4667cbc33 Resolve prettier config on server init 2023-10-11 12:56:29 +03:00
Kirill Bulatov
f42cb109a0 Improve prettier_server LSP names in the log panel 2023-10-11 12:56:29 +03:00
Kirill Bulatov
6cac58b34c Add prettier language servers to LSP logs panel 2023-10-11 12:56:29 +03:00
Kirill Bulatov
2a5b9b635b Better pass prettier options 2023-10-11 12:56:29 +03:00
Kirill Bulatov
2a68f01402 Draft prettier_server formatting 2023-10-11 12:56:29 +03:00
Kirill Bulatov
dca93fb177 Initialize prettier_server.js wrapper along with default prettier 2023-10-11 12:56:29 +03:00
Kirill Bulatov
1ff17bd15d Install default prettier and plugins on startup 2023-10-11 12:56:29 +03:00
Kirill Bulatov
12ea12e4e7 Make language adapters able to require certain bundled formatters 2023-10-11 12:56:29 +03:00
Kirill Bulatov
4f956d71e2 Slightly better prettier settings and discovery 2023-10-11 12:56:29 +03:00
Kirill Bulatov
ce6b31d938 Make NodeRuntime non-static for prettier runner 2023-10-11 12:56:29 +03:00
Kirill Bulatov
a8387b8b19 Use proper NodeRuntime in the formatter interface 2023-10-11 12:56:28 +03:00
Kirill Bulatov
a8dfa01362 Prepare prettier file lookup code infra 2023-10-11 12:56:28 +03:00
Kirill Bulatov
92f23e626e Properly connect prettier lookup/creation methods 2023-10-11 12:56:28 +03:00
Kirill Bulatov
553abd01be Draft a project part of the prettier 2023-10-11 12:56:28 +03:00
Julia
354882f2c0 Enable completion menu to resolve documentation when guest 2023-10-10 00:16:15 -04:00
Max Brunsfeld
17925ed563 Remove unnecessary dependencies on client and rpc 2023-10-06 13:14:53 -07:00
Julia
9d8cff1275 If documentation included in original completion then parse up front 2023-10-06 13:26:39 -04:00
Julia
b8876f2b17 Preparse documentation markdown when resolving completion 2023-10-06 13:26:38 -04:00
Julia
fcaf48eb49 Use completion item default data when provided 2023-10-06 13:26:38 -04:00
Julia
77ba25328c Most of getting completion documentation resolved & cached MD parsing 2023-10-06 13:26:38 -04:00
Conrad Irwin
ff1722d307 Fix tracking newly saved buffers
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-10-04 14:44:21 -06:00
Conrad Irwin
d9813a5bec
show host in titlebar (#3072)
Release Notes:

- show host in the titlebar of shared projects
- clicking on faces in the titlebar will now always follow the person
(it used to toggle)
- clicking on someone in the channel panel will follow that person
- highlight the currently open project in the channel panel

- fixes a bug where sometimes following between workspaces would not
work
2023-10-02 21:02:02 -06:00
Marshall Bowers
9e1f7c4c18
Mainline GPUI2 UI work (#3079)
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Nate <nate@zed.dev>
2023-10-02 18:20:47 -04:00
Joseph T. Lyons
e5e63ed201 Add Nushell support to venv activation 2023-10-01 23:38:30 -04:00
Conrad Irwin
1cfc2f0c07 Show host in titlebar
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-09-29 16:37:00 -06:00
Max Brunsfeld
c718b810f6 Merge branch 'main' into allow-following-outside-of-projects 2023-09-29 14:15:33 -07:00
Mikayla
31ff5bffd6
Fix tests relying on off-spec behavior 2023-09-29 12:19:58 -07:00
Mikayla
4887ea3563
Add support for the TextDocumentSyncKind LSP options 2023-09-29 12:05:21 -07:00
Max Brunsfeld
e34ebbc665 Remove unused dependencies on theme 2023-09-28 17:13:10 -07:00
Max Brunsfeld
a8b35eb8f5 Merge branch 'main' into allow-following-outside-of-projects 2023-09-28 11:58:28 -07:00
Max Brunsfeld
0f39b63801 Rename color_index to participant_index
Co-authored-by: Conrad <conrad@zed.dev>
2023-09-28 11:37:22 -07:00
Max Brunsfeld
545b5e0161 Assign unique color indices to room participants, use those instead of replica_ids
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
2023-09-28 11:06:09 -07:00
Kirill Bulatov
b131a2cb98 Fix another place where Copilot may panic 2023-09-26 10:51:13 +03:00
Mikayla Maki
591ec02cea
Add support for the experimental Next LS for Elixir (#3024)
This is a PR I built for a friend of a friend at StrangeLoop, who is
making a much better LSP for elixir that elixir folks want to experiment
with. This PR also improves the our debug log viewer to handle LSP
restarts.

TODO:
- [ ] Make sure NextLS binary loading works.

Release Notes:

- Added support for the experimental Next LS for Elxir, to enable it add
the following field to your settings to enable:

```json
"elixir": {
    "next": "on"
}
```
2023-09-25 12:52:56 -05:00
Mikayla
02a85b1252
Add local next LSP adapter 2023-09-21 18:09:02 -07:00
Piotr Osiewicz
dbfa1d7263
[WIP] Replace in project (#2984)
Targeting Preview of 09.27.
This is still pending several touchups/clearups:
- We should watch multibuffer for changes and rescan the excerpts. This
should also update match count.
- Closing editor while multibuffer with 100's of changed files is open
leads to us prompting for save once per each file in the multibuffer.
One could in theory save in multibuffer before closing it (thus avoiding
unnecessary prompts), but it'd be cool to be able to "Save all"/"Discard
All".

Release Notes:

- Added "Replace in project" functionality
2023-09-21 16:27:58 +02:00
Kirill Bulatov
1c53b0a1c0 Properly re-add Copilot LSP server 2023-09-21 11:02:03 +03:00
Kirill Bulatov
a2ac5ae478 Fix RPC logs not being displayed for supplementary servers 2023-09-21 11:00:05 +03:00
Conrad Irwin
f4d4a2f41b
vim fixes for find&replace (#2995)
* allow replacing with the empty string to delete
* fix <enter> for ReplaceNext (in vim mode)

Release Notes:

- allow replacement to be empty
2023-09-20 16:42:39 -06:00
Kirill Bulatov
a366ad02ce
Add a way to display unrelated to language support language servers' logs (#2991)
Copilot is being used in every buffer, but we do not see its logs that
easily.
In the future, prettier wrapper will pretend to be an LSP server, it is
better to log its messages somewhere, so prepare an infrastructure for
that.

<img width="1727" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/d31a257c-9608-46fa-8be1-f0a2a2bdbdb7">

Copilot seem to have no rpc messages logged for some reason now,
prettier wrapper might be a better case to investigate this, so leaving
as is.

Release Notes:

- N/A
2023-09-20 12:14:31 +03:00
Kirill Bulatov
6ebe49ec59 Show Copilot logs right after its LSP server start 2023-09-20 12:08:32 +03:00
Conrad Irwin
2da664ed17 vim fixes for find&replace
* allow replacing with the empty string to delete
* fix <enter> for ReplaceNext
2023-09-19 20:48:01 -06:00
Kirill Bulatov
7bc4f0bc11 Send copilot log messages into the log panel 2023-09-19 23:41:55 +03:00
KCaverly
d85acceeec move git2 to workspace dependency globally 2023-09-19 16:13:47 -04:00
Kirill Bulatov
5e1b284846 Show supplementary language servers in the logs panel 2023-09-19 22:29:27 +03:00
Kirill Bulatov
556f398780 Send and receive Copilot events 2023-09-19 21:53:31 +03:00
Kirill Bulatov
9eadfc80ba Add Copilot server to LSP logs panel 2023-09-19 16:25:09 +03:00
Kirill Bulatov
91fac2aa76 Automatically subscribe for lsp logs of every server added
Avoid re-adding the server on new logs events.
2023-09-19 11:52:21 +03:00
Piotr Osiewicz
616d328f3c
chore: Use aho-corasick 1.1 in direct dependencies (#2983)
Nothing too fancy, we've depended indirectly on 1.0/1.1 already, so this
is essentially bookkeeping.

Release Notes:
- N/A
2023-09-18 17:01:08 +02:00
Antonio Scandurra
f86e5a987f WIP 2023-09-14 17:42:30 +02:00
Piotr Osiewicz
4cb8647702
Z 1200/replace in buffer (#2922)
This is still WIP, mostly pending styling. I added a pretty rudimentary
text field and no buttons whatsoever other than that. I am targeting a
Preview of 09.13, as I am gonna be on PTO for the next week.

I dislike the current implementation slightly because of `regex`'s crate
syntax and lack of support of backreferences. What strikes me as odd wrt
to syntax is that it will just replace a capture name with empty string
if that capture is missing from the regex. While this is perfectly fine
behaviour for conditionally-matched capture groups (e.g. `(foo)?`), I
think it should still error out if there's no group with a given name
(conditional or not).
Release Notes:

- Added "Replace" functionality to buffer search.
2023-09-12 18:46:54 +02:00
Max Brunsfeld
d370c72fbf Start work on rejoining channel buffers 2023-09-01 16:52:12 -07:00
Kirill Bulatov
e682db7101 Route completion requests through remote protocol, if needed 2023-08-31 15:22:13 +03:00
Kirill Bulatov
292af55ebc Ensure all client LSP queries are forwarded via collab 2023-08-31 14:29:37 +03:00
Kirill Bulatov
fff385a585 Fix project tests 2023-08-31 13:01:53 +03:00
Julia
ff3865a4ad Merge branch 'main' into multi-server-completions-tailwind 2023-08-30 22:58:37 -04:00
Julia
529adb95a1 Scope Tailwind in JS/TS to within string
In some situations outside JSX elements Tailwind will never
respond to a completion request, holding up the tsserver completions.

Only submit the request to Tailwind when we wouldn't get tsserver
completions anyway and don't submit to Tailwind when we know we won't
get Tailwind completions

Co-Authored-By: Kirill Bulatov <kirill@zed.dev>
2023-08-30 21:14:39 -04:00
Max Brunsfeld
46429426ef Avoid accidental gpui transitive dependency in collab
* Make Fs depend on Text, not vise versa

Co-authored-by: Joseph <joseph@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-30 13:16:01 -07:00
Julia
e3a0252b04 Make multi-server completion requests not serial 2023-08-29 20:42:13 -04:00
Julia
0e6c91818f Woooooops, don't notify the language server until initialized 2023-08-29 15:37:51 -04:00
Piotr Osiewicz
07b9c6c302
language: Make Buffer::new take an explicit ID (#2900)
See Linear description for the full explanation of the issue. This PR is
mostly a mechanical change, except for the one case where we do pass in
an explicit `next_id` instead of `model_id` in project.rs.

Release Notes:
- Fixed a bug where some results were not reported in project search in
presence of unnamed buffers.
2023-08-28 11:51:50 +02:00
Kirill Bulatov
ddd7ab116f Do not convert lsp::Location of hint labels before resolve 2023-08-26 02:45:08 +03:00
Piotr Osiewicz
2495d6581e
Un serialize project search (#2857)
This is the first batch of improvements to current project search. There
are few things we can do better still, but I want to get this out in
next Preview.
Most of the slowness at this point seems to stem from updating UI too
often.

Release Notes:
- Improved project search by making it report results sooner.

---------

Co-authored-by: Julia Risley <julia@zed.dev>
2023-08-26 01:31:52 +02:00
Julia
fc457d45f5 Add word_characters to language overrides & use for more things
Use word_characters to feed completion trigger characters as well and
also recognize kebab as a potential sub-word splitter. This is fine for
non-kebab-case languages because we'd only ever attempt to split a word
with a kebab in it in language scopes which are kebab-cased

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-08-25 18:46:30 -04:00
Joseph T. Lyons
c1fd648390
Add setting to automatically enable virtual environment (#2882)
This isn't ready to go - I'm opening a PR to ask for some advice. When
activating a python virtual environment, the typical command used is
`source path_to_venv/bin/activate`. The problem is, the activatate
script isn't portable to all shells, so some additional scripts are
bundled in the env, for example, `activate.fish`. We don't have a good
way of knowing what shell we are in, in order to know what script to
run.

Julia gave the alternative of simply activating the virtual environment
while in the zsh context, before the user's custom shell is launched,
which I think does work, but because we activate the virtual environment
before we launch the custom shell, the shell isn't really aware that we
are in the virtual environment and it fails to display the information
in the prompt that is typically shown after activating.

Is there a clean way for us to know for a fact what shell is being ran,
so we know what script to run?

Check out the code comments below for more context.

---


https://github.com/zed-industries/zed/assets/19867440/ddb76aaa-152b-4c93-a513-3cd580b7c40f

I've used Zed to write Python scripts, but working on an actual project
has really magnified where Python dev is falling short. A huge
quality-of-life thing we can do is provide a setting to automaticaly
search for and activate virtual environments when found, when terminals
are created. Manually starting these up in every terminal instance is
such a drag.

A few quirks:
- We don't have a way of knowing if the prompt is ready before we try
run the command, which means we see the text inserted at the top of the
terminal and on the prompt - I dont think this should be a blocker
though.
- If a user has multiple python projects with mutliple virtual
environments, we only detect and activate the first one, since can't
really make any assumptions about which one to activate. I dont think
this should be a blocker either, as I think most users will have a
single project open in Zed.

Release Notes:

- Added a `detect_venv` setting for the terminal. When configured, the
Zed terminal will automatically activate Python virtual environments on
terminal creation.
2023-08-25 15:14:24 -04:00
Joseph T. Lyons
507a5db09c WIP
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-08-25 15:06:31 -04:00
Max Brunsfeld
f798be6e27 Fix rust 1.72 warnings about shadowed glob re-exports 2023-08-25 10:25:21 -07:00
Max Brunsfeld
404f76739c Format let-else statements 2023-08-25 10:11:32 -07:00
Kirill Bulatov
e44516cc6c Add hover tests 2023-08-25 14:26:17 +03:00
Kirill Bulatov
3c55c933d4 Be more lenient with hint resolution, always return some hint 2023-08-25 14:26:17 +03:00
Kirill Bulatov
dcf570bb03 Fix resolve status conversion 2023-08-25 14:26:17 +03:00
Kirill Bulatov
bcaff0a18a Propagate inlay background highlights to data storage 2023-08-25 14:26:17 +03:00
Kirill Bulatov
477fc865f5 Properly resolve inlay label parts' locations and buffers 2023-08-25 14:26:17 +03:00
Kirill Bulatov
80e8714241 Send inlay hint resolve requests 2023-08-25 14:26:17 +03:00
Kirill Bulatov
3434990b70 Store inlay hint resolve data 2023-08-25 14:26:17 +03:00
Kirill Bulatov
e4b78e322e Revert "Strip off inlay hints data that should be resolved"
Without holding all hints in host's cache, this is impossile.
Currenly, we keep hint caches separate and isolated, so this will not
work when we actually resolve.
2023-08-25 14:26:17 +03:00
Joseph T. Lyons
0801e5e437 Merge branch 'main' into add-setting-to-automatically-enable-virtual-environment 2023-08-25 01:50:57 -04:00
Joseph T. Lyons
9fe580acb6 WIP 2023-08-25 01:50:54 -04:00
Max Brunsfeld
24141c2f16 Ensure collaborators cursor colors are the same in channel buffers as in projects
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-24 11:31:41 -07:00
Max Brunsfeld
7e83138805
Start work on showing consistent replica ids for channel buffers
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-23 18:37:01 -07:00
Joseph T. Lyons
7b170304df Shorten setting name 2023-08-23 04:07:10 -04:00
Joseph T. Lyons
711f156308 WIP 2023-08-23 04:04:36 -04:00
Julia
affb73d651 Only generate workspace/configuration for relevant adapter 2023-08-22 23:36:04 -04:00
Joseph T. Lyons
471810a3c2 WIP
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-08-22 15:29:25 -04:00
Piotr Osiewicz
007d1b09ac Z 2819 (#2872)
This PR adds new config option to language config called
`word_boundaries` that controls which characters should be recognised as
word boundary for a given language. This will improve our UX for
languages such as PHP and Tailwind.

Release Notes:

- Improved completions for PHP
[#1820](https://github.com/zed-industries/community/issues/1820)

---------

Co-authored-by: Julia Risley <julia@zed.dev>
2023-08-22 12:23:30 +03:00
Piotr Osiewicz
d27cebd977
Z 2819 (#2872)
This PR adds new config option to language config called
`word_boundaries` that controls which characters should be recognised as
word boundary for a given language. This will improve our UX for
languages such as PHP and Tailwind.

Release Notes:

- Improved completions for PHP
[#1820](https://github.com/zed-industries/community/issues/1820)

---------

Co-authored-by: Julia Risley <julia@zed.dev>
2023-08-22 10:35:20 +02:00
Kirill Bulatov
269dad5a9c Respect completion resolve server capabilities
Only query for additional edits if the server supports it

Co-Authored-By: Julia Risley <julia@zed.dev>
2023-08-18 16:55:47 +03:00
Julia
a979e32127 Utilize LSP completion itemDefaults a bit
Tailwind likes to throw a lot of completion data at us, this gets it to
send less. Previously it would respond to a completion with 2.5 MB JSON
blob, now it is more like 0.8 MB.

Relies on a local copy of lsp-types with the `itemDefaults` field added.
I don't have write perms to push to our fork of the crate atm, sorry :)
2023-08-17 21:57:39 -04:00
Mikayla
afebe3faf8
Merge branch 'main' into project_search_design 2023-08-17 01:56:05 -07:00
Julia
e54f16f372 Register initial request handlers before launching server 2023-08-16 21:25:17 -04:00
Kirill Bulatov
f9131f657e Use InlayHint instead of Inlay where appropriate 2023-08-16 23:38:11 +03:00
KCaverly
aeda5d9842 fix semantic search panic which is created via incompatible build_search_query path
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 15:50:54 +01:00
Julia
40ce099780 Use originating language server to resolve additional completion edits 2023-08-15 16:34:15 -04:00
Julia
7a67ec5743 Add support for querying multiple language servers for completions 2023-08-15 12:48:30 -04:00
Kirill Bulatov
27bf01c3a8 Strip off inlay hints data that should be resolved 2023-08-14 22:50:55 +03:00
Nathan Sobo
0a4633f88f Remove more window id usage 2023-08-08 11:20:09 -06:00
Max Brunsfeld
4e33654aba Make LspAdapter::process_diagnostics synchronous
Co-authored-by: Nathan <nathan@zed.dev>
2023-08-07 13:53:41 -07:00
Max Brunsfeld
a127b0d3e6 Fix warnings surfaced in Rust 1.71 2023-08-02 09:19:23 -07:00
Kirill Bulatov
cf6e524c9a Make project search includes and excludes more user-friendly
Allow search results that start with the include/exclude path part
2023-07-28 12:56:44 +03:00
Max Brunsfeld
a01d973477
More git status optimizations (#2779)
Follow-up to https://github.com/zed-industries/zed/pull/2777
Refs https://github.com/zed-industries/community/issues/1770

In this PR, I reworked the way that git statuses are retrieved. In a
huge repository like `WebKit`, the really slow part of computing a list
of git statuses is the *unstaged* portion of the diff. For the *staged*
diff, `git` can avoid comparing the contents of unchanged directories,
because the index contains hashes of every tree. But for the *unstaged*
portion, Git needs to compare every file in the worktree against the
index. In the common case, when there are no changes, it's enough to
check the `mtime` of every file (because the index stores the mtimes of
files when they are added). But this still requires an `lstat` call to
retrieve each file's metadata.

I realized that this is redundant work, because the worktree is
*already* calling `lstat` on every file, and caching their metadata. So
in this PR, I've changed the `Repository` API so that there are separate
methods for retrieving a file's *staged* and *unstaged* statuses. The
*staged* statuses are retrieved in one giant batch, like before, to
reduce our git calls (which also have an inherent cost). But the
`unstaged` statuses are retrieved one-by-one, after we load files'
mtimes. Often, all that's required is an index lookup, and an mtime
comparison.

With this optimization, it once again becomes pretty responsive to open
`WebKit` or `chromium` in Zed.

Release Notes:

- Optimized the loading of project file when working in very large git
repositories
2023-07-24 11:23:32 -07:00
Kirill Bulatov
f05095a6dd Focus project panel on directory select 2023-07-23 00:12:25 +03:00
Max Brunsfeld
6c09782aa2 Optimize full file status via passing in known file mtime 2023-07-22 11:53:26 -07:00
Max Brunsfeld
51d311affd Compute unstaged git status separately, to take advantage of our cached file mtimes 2023-07-21 17:58:43 -07:00
Max Brunsfeld
ff0864026e Only fetch statuses for changed paths 2023-07-21 17:08:31 -07:00
Max Brunsfeld
05b161118c Don't call git status when ignored files change 2023-07-21 17:05:42 -07:00
Max Brunsfeld
4bd415f2b6 Retrieve git statuses in one batch when scanning dirs 2023-07-21 13:50:54 -07:00
Kirill Bulatov
6349d90cac Properly open project directories 2023-07-18 22:59:41 +03:00
Kirill Bulatov
9aeb970f09 Ignore empty hover contents, trim final hover label text 2023-07-18 22:53:44 +03:00
Piotr Osiewicz
8642a1d074 Remove dbg! calls 2023-07-17 13:03:57 +02:00
Piotr Osiewicz
11173b2199 Merge branch 'main' into piotr/z-2588-php 2023-07-17 11:47:08 +02:00
Piotr Osiewicz
dc557e1647 Add scaffolding of php language server 2023-07-17 11:43:32 +02:00
Max Brunsfeld
b9e0074793 Perform only one git statuses call when reloading a git repo after it changes 2023-07-14 14:29:22 -07:00
Max Brunsfeld
2e2333107a Find the layer with the smallest enclosing node in language_scope_at 2023-07-14 09:11:56 -07:00
Kirill Bulatov
d164034198
Allow all completions with preresolved additional text edits (#2711)
Deals with https://github.com/zed-industries/community/issues/752
Deals with https://github.com/zed-industries/community/issues/566

Currently, when converting from LSP to Zed objects, completions with
non-empty `additional_text_edits` are filtered out.
Later, all other completions form a list and the selected one gets the
`Editor::confirm_completion` call, which always queries an LSP
completion resolve request to get the `additional_text_edits` field.

Otherwise, `additional_text_edits` field is ignored entirely for the
rest of the completion lifetime — and we always pass the selected
completion through the resolve request.

The PR changes the logic, removing the `additional_text_edits` filtering
and instead of resolving every completion, now we check for
`additional_text_edits` in the completion before resolving: resolve
happens only if the data is absent.

Generally, feels like resolve has to happen before the completion
selection: LSP servers may send us markdown for completion documentation
preview pop ups and similar extra info.
Also, the server may lack resolve capabilities entirely, always sending
the request seems dangerous.
For now, the PR does not attempt to change either.

Release Notes:

- Brings rust-analyzer's postfix completions and others completions with
preresolved additional text edits
2023-07-12 22:10:18 +03:00
Kirill Bulatov
0c7949bdee Force resolve all completions, to ensure their edits are up-to-date
co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-12 21:10:01 +03:00
Kirill Bulatov
c732aa1617 Do not resolve completions if extra edits are available 2023-07-12 20:28:16 +03:00
Kirill Bulatov
6d96c6ef51 Draft the postfix completions support 2023-07-12 18:32:03 +03:00
KCaverly
297fa029e3 Merge branch 'main' of github.com:zed-industries/zed into vector_store 2023-07-11 20:05:29 -04:00
Kirill Bulatov
4b4d049b0a Refactor LSP restart logic
Instead of storing `initialization_options` in every LSP adapter as
before, store previous LSP settings in `Project` entirely.

This way, we can later have use multiple different project
configurations per single LSP with its associated adapter.

co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-11 21:56:55 +03:00
KCaverly
dd0dbdc5bd brought up to speed with main 2023-07-11 14:50:48 -04:00
Kirill Bulatov
efe8b8b6d0 Revert "Fix language servers improper restarts"
This reverts commit 91832c8cd8.
2023-07-11 20:46:45 +03:00
Kirill Bulatov
91832c8cd8 Fix language servers improper restarts
Language servers mixed `initialization_options` from hardcodes and user
settings, fix that to ensure we restart servers on their settings
changes only.
2023-07-11 16:36:20 +03:00
KCaverly
3f5667b101 merged main 2023-07-07 14:24:29 -04:00
Kirill Bulatov
fff65968bf Restart LSP server on initialization options change 2023-07-06 23:27:22 +03:00
Kirill Bulatov
0b0a161626 Show inlay hints on startup for every language server with work events
Language servers such as typescript-language-servers report a single
work event, ending right after server's startup.

Other servers might send more similar event, also during startup.
The rest of the events are diagnostic-related and we filter them out.

React on such events with /refresh-like hint update, that will check
only the visible part of the editor for hints and might be replaced by
other /refresh requests, if needed.
2023-07-06 13:10:59 +03:00
Kirill Bulatov
1936bdebb3 Use less padding for typescript parameter hints 2023-07-06 11:16:39 +03:00
KCaverly
18a5a47f8a moved semantic search model to dev and preview only.
moved db update tasks to long lived persistent task.

Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-06-30 18:41:19 -04:00
Max Brunsfeld
f83514cde4
Fix regression in handling git FS events (#2670)
As part of an optimization in
https://github.com/zed-industries/zed/pull/2663, I changed the way that
the worktree ignores FS events within unloaded directories. But this
accidentally prevented us from detecting some events that occur inside
of `.git` directories.

In this PR, I've made further tweaks to which FS events we can ignore.
We now explicitly opt *in* to scanning `.git` (shallowly) directories
(even though they are ignored). Note that we still don't recursively
scan the git directory (including all of the files inside `objects`
etc). This seems like the correct amount of work to do, and from my
testing (and our unit tests that use the real FS and real git
repositories), it seems to work correctly.

Release Notes:

- Fixed a bug where Zed would not detect some git repository changes
(preview only).
2023-06-30 11:40:49 -07:00
Max Brunsfeld
92df76e632 Fix accidental ignoring of git FS events 2023-06-30 11:20:50 -07:00
Mikayla Maki
3d6e063a6d
Fix method header 2023-06-29 23:53:57 -07:00
Mikayla Maki
d22a576f5e
fix failing test 2023-06-29 23:50:24 -07:00
Mikayla Maki
a9a51ab3ad
Added more tests and minimal file updates 2023-06-29 18:21:35 -07:00
Mikayla Maki
a6dabf7acf
Make path updates minimal 2023-06-29 18:15:40 -07:00
Mikayla Maki
787412b545
fmt and update dependency 2023-06-29 17:49:42 -07:00