Commit graph

384 commits

Author SHA1 Message Date
Michael Sloan
7c2c409f6d
Show configuration in language server debug logs (#23084)
Release Notes:

- Added configuration sent on initialization to the `Server Info`
section of the language server logs.
2025-01-13 21:00:03 +00:00
Michael Sloan
b633f62aa6
Add test that JSON schema generation works + actions build from no input (#23049)
Release Notes:

- N/A
2025-01-13 20:42:08 +00:00
Michael Sloan
6aba3950d2
Improve keymap json schema (#23044)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Also:

* Adds `impl_internal_actions!` for deriving the `Action` trait without
registering.

* Removes some deserializers that immediately fail in favor of
`#[serde(skip)]` on fields where they were used. This also omits them
from the schema.

Release Notes:

- Keymap settings file now has more JSON schema information to inform
`json-language-server` completions and info, particularly for actions
that take input.
2025-01-13 02:34:35 +00:00
Kirill Bulatov
fb65044484
Reuse vtsls logic for completion details display (#23030)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Part of https://github.com/zed-industries/zed/issues/22833,
https://github.com/zed-industries/zed/issues/22267,
https://github.com/zed-industries/zed/issues/22503

Before:

![image](https://github.com/user-attachments/assets/b6abd3dc-b5d7-4d6a-91e2-92361a519adb)

![image](https://github.com/user-attachments/assets/e3a9e766-efbe-4f4d-b4f9-e6b019e165a5)

After:

![image](https://github.com/user-attachments/assets/d29414d5-4fcc-4d2f-adb2-48304cbafdf6)

Copies https://github.com/zed-industries/zed/pull/15087 change into
`typescript-language-server`-related label details rendering code.

Release Notes:

- Improved typescript-language-server's completion details rendering
2025-01-12 13:44:24 +00:00
Thorsten Ball
3d80b21a91
eslint: Allow configuring workingDirectory (#22972)
This addresses this comment here:
https://github.com/zed-industries/zed/issues/9648#issuecomment-2579246865

Release Notes:

- Added ability to configure `workingDirectory` when using ESLint.
Example: `{"lsp": {"eslint": {"settings": {"workingDirectory": {"mode":
"auto" }}}}}`
2025-01-10 22:21:51 +00:00
狐狸
8bd7a048ab
Improve TypeScript highlights (#18525)
- Move function queries under constant queries to avoid uppercase
functions highlighted as constants
- Merge keywords and remove duplicates
- Highlights type aliases on import
- Highlights literal built-in types (null, undefined, true, false) as
`@type.builtin`

Confused about case-based queries, should they be rewritten?

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2025-01-10 22:00:28 +00:00
Henry Chu
b2eceeb4f2
Enable yaml-language-server lookup in PATH (#22036)
Release Notes:

- Added support for checking for `yaml-language-server` on the`$PATH`.

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2025-01-09 21:06:21 +00:00
Remco Smits
68e670bf54
Fix rust runnable is not detected if comment is after #[test] attribute (#22823)
Closes #22798

This fixes that we didn't detect the Rust runnable when there was a
comment after the `#[test]` attribute.

![Screenshot 2025-01-08 at 13 22
59](https://github.com/user-attachments/assets/bd6a7ae0-93d4-4f93-9d0d-11453acb2032)


Release Notes:

- Fixed Rust runnable not detected when comment is after `#[test]`
attribute.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-01-08 12:51:23 +00:00
Yasin
8317c9215a
python: Detect pixi environments automatically (#22635)
Goal: Allow zed to locate [`pixi`](https://github.com/prefix-dev/pixi)
environments

Changes:
- Uses a newer release of
[`python-environment-tools`](https://github.com/microsoft/python-environment-tools)
with the new `pet-pixi` create
- Adds `PythonEnvironmentKind::Pixi` as a possible environment kind, to
allow the rest of the code to detect the environment

I tested the changes locally. It found the correct pixi environment and
I was able to run `pytest` through the UI icon.


Release Notes:

- Added detection for pixi-environments

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-01-08 11:06:33 +00:00
uncenter
d58f006498
Use standard injection.language and injection.content captures (#22268)
Closes #9656. Continuation of #9654, but with the addition of backwards
compatibility for the existing captures.

Release Notes:

- Improved Tree-sitter support with added compatibility for standard
injections captures

---------

Co-authored-by: Finn Evers <finn.evers@outlook.de>
2025-01-07 18:17:49 +00:00
Cole Miller
810b37c129
Rename the OpenFile action to OpenSelectedFilename to better reflect its function (#22494)
Release Notes:

- Renamed the `OpenFile` action to `OpenSelectedFilename` for clarity
2025-01-07 04:18:04 +00:00
Torrat
5ec924828e
go: Adjust gopls path based on OS (#22727)
Based on the python https://github.com/zed-industries/zed/issues/21452
and PR https://github.com/zed-industries/zed/pull/22587

I found the same problem with go on windows.

Describe the bug / provide steps to reproduce it

Language server error: gopls

The system cannot find the file specified. (os error 2)
-- stderr--

[ERROR project::lsp_store] Failed to start language server "gopls": The
system cannot find the file specified. (os error 2)
[ERROR project::lsp_store] server stderr: ""

Environment

    Windows 11
    Go

Release Notes:

- Windows: Fixed `gopls` path construction on Windows 11.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2025-01-06 22:04:10 +00:00
Kirill Bulatov
8151dc7696
Return back Rust completion details (#22648)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Closes https://github.com/zed-industries/zed/issues/22642

In Zed, Rust's label generators expected the details to come in ` (use
std.foo.Bar)` form, but recently, r-a started to send these details
without the leading whitespace which broke the code generation.

The PR makes LSP results parsing more lenient to work with both details'
forms.

Release Notes:

- Fixed Rust completion labels not showing the imports
2025-01-04 11:15:09 +00:00
Torrat
53cfb578e8
python: Adjust binary path based on OS (#22587)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Closes #ISSUE

- #21452 

Describe the bug / provide steps to reproduce it

Language server error: pylsp

failed to spawn command. path:
"C:\Users\AppData\Local\Zed\languages\pylsp\pylsp-venv\bin\pylsp",
working directory: "D:\Coding\Python", args: []
-- stderr--

Environment
- Windows 11
- python

Release Notes:

- Windows: Fixed the path building used to run `pip` commands in the
venv generated on Windows 11.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2025-01-03 22:56:31 +00:00
Rusydy
4ce1ccfc40
Add support for block comments in Markdown configuration (#22352)
This pull request includes a small change to the
`crates/languages/src/markdown/config.toml` file. The change adds block
comment syntax for Markdown files.

*
[`crates/languages/src/markdown/config.toml`](diffhunk://#diff-4cf73d9af0f11f2ac8929bd8113ee76aa382dc96a731f18510c09fc3d0db1f9cR5):
Added block comment syntax `<!-- ` and ` -->` for Markdown files.

Closes https://github.com/zed-industries/zed/issues/19797

I have been testing it with the following:

1. create a simple markdown file containing following words

```markdown
good morning - English
Dzień dobry - polish
おはよう - japanese
صباح الخير - arabic
早安 - Chineses (Traditional)
```

2. comment using `cmd+/` and see if there are any errors



Release Notes:

- Added block comment syntax `<!-- ` and ` -->` for Markdown files.
2025-01-01 15:46:38 +00:00
Jayden Seric
f6dabadaf7
Syntax highlight the JavaScript keyword using (#22479)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
The ECMAScript Explicit Resource Management proposal (stage 3) that
specifies the keyword `using`:

https://github.com/tc39/proposal-explicit-resource-management

This has already been done for the TypeScript and TSX languages:

- https://github.com/zed-industries/zed/issues/14762
- https://github.com/zed-industries/zed/pull/14772

Release Notes:

- Syntax highlight the JavaScript keyword `using`
([#22479](https://github.com/zed-industries/zed/pull/22479); thanks
[jaydenseric](https://github.com/jaydenseric)).
2024-12-29 08:17:51 +00:00
Piotr Osiewicz
fac5118f10
python: Fix decorated test detection (#22327)
Follow-up to #22325, where I missed a couple points in the review that
were actually quite relevant.

Closes #ISSUE

Release Notes:

- N/A
2024-12-21 13:11:52 +00:00
Thomas
7184b15f48
Add decorated function to pytest runnables (#22325)
Fixes: #22324

Closes #ISSUE

Release Notes:

- Fixed pytest decoracted function discovery
2024-12-21 11:31:35 +00:00
Piotr Osiewicz
4eb8492308
chore: Remove stray println (#22297)
Follow-up to #22292

Release Notes:

- N/A
2024-12-20 18:18:44 +00:00
Thorsten Ball
d824baeece
Fix lang servers status set to Downloading when checking version (#22292)
This message has confused me many times too: we printed the status as
"Downloading" when we were only checking whether we need to install a
given version of a language server.

This fixes the issue for Node-based language servers where we had the
same check in all implementations.

Closes  #22241

Release Notes:

- Fixed some language servers reporting status as "Downloading..." when
only a version check was being done.
2024-12-20 16:59:10 +00:00
Piotr Osiewicz
99dc85e6ec
Format code/fix broken CI build (#21997)
In #21981 the CI didn't run for whatever reason. I've merged based off
of CI state alone and that led to CI breaking on main.

Release Notes:

- N/A
2024-12-13 17:25:54 -05:00
Silvano Cerza
06edcd18be
Fix running Python commands that include paths with spaces (#21981)
This PR fixes running Python commands that include paths with spaces by
wrapping python commands and their arguments in quotation marks.

I fixed this only in Python as I noticed this while trying to run
`pytest` in Zed.

Probably this is not the best approach as it doesn't fix other languages
too, though I don't know enough about the codebase to fix it like that.
I'm not even sure if it's actually feasible right now.

I didn't add tests for this either as I couldn't really understand how
to easily to that, I tried to look at other languages but couldn't find
one that tests their `ContextProvider` directly.

Release Notes:

- Fix running Python commands that include paths with spaces

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-12-13 22:31:08 +01:00
Jaagup Averin
6838b6203a
python: Refine highlighting (#21389)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Fixes:
* Types in binary unions as per [PEP
604](https://peps.python.org/pep-0604/) not highlighted;
   * `except*` keyword not highlighted;
* Classes beginning with `_` not recognized as such, however `_` is a
valid first character for private classes; additionally the regex for
parsing constant/class names appeared inconsistent and incomplete so was
adjusted;
   * Builtin types such as `float`, `dict`, etc not recognized as types;
   * **Update:** decorators with arguments not recognized as decorators;
* **Update:** docstrings after type alias assignments not recognized as
docstrings;
* **Update:** `and/in/is/not/or/is not/not in` not capturable as
keywords;
* **Update:** decorators with "nesting" (@x.y.z) not recognized as
decorators;

Before:

![new_before](https://github.com/user-attachments/assets/6f05262e-be3b-41bf-aee6-26438c2bf254)

After:

![new_after](https://github.com/user-attachments/assets/408c481c-5eb9-40c9-8e18-52ebf5a121d3)

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-12-13 12:40:16 +01:00
uncenter
9a806f98e6
Improve diff syntax highlighting queries (#21740)
Brings over the improvements made for the same grammar:
https://github.com/nvim-treesitter/nvim-treesitter/pull/6619.

Related to #19986 but not really- the problem brought up there is an
issue of themes not supporting the `diff.plus` and `diff.minus` captures
(already used before this PR).

<details><summary>Theme previews (before/after)</summary>

| Before | After |
| --- | --- |
| ![CleanShot 2024-12-09 at 07 33
31](https://github.com/user-attachments/assets/698122df-fb63-4d7c-95aa-9559c7dcc684)
| ![CleanShot 2024-12-09 at 07 31
08](https://github.com/user-attachments/assets/ef927c0d-6c77-4fd4-b513-8359fb2442f7)
|

| Before | After |
| --- | --- |
| ![CleanShot 2024-12-09 at 07 34
15](https://github.com/user-attachments/assets/53b825ec-2987-4122-837d-1ebce334f153)
| ![CleanShot 2024-12-09 at 07 31
36](https://github.com/user-attachments/assets/079f19fb-4cc4-4256-b390-868f33e775c5)
|

| Before | After |
| --- | --- |
| ![CleanShot 2024-12-09 at 07 34
27](https://github.com/user-attachments/assets/4e3a80da-edff-4a53-bbf8-abc17cd49c5e)
| ![CleanShot 2024-12-09 at 07 31
53](https://github.com/user-attachments/assets/c6e12d79-5e59-4ebf-9fb9-ef3b0f8c9a81)
|

| Before | After |
| --- | --- |
| ![CleanShot 2024-12-09 at 07 33
44](https://github.com/user-attachments/assets/a007df22-7012-4de7-a71e-0ce5b523b561)
| ![CleanShot 2024-12-09 at 07 32
13](https://github.com/user-attachments/assets/c8c63292-5a64-4560-ad7c-9235b8b98ca3)
|

| Before | After |
| --- | --- |
| ![CleanShot 2024-12-09 at 07 33
57](https://github.com/user-attachments/assets/1a9c3656-3805-45a6-97af-747ef50e3b6c)
| ![CleanShot 2024-12-09 at 07 32
25](https://github.com/user-attachments/assets/76bac31c-8786-4907-8570-bf3c2888823e)
|

</details>

Release Notes:

- Improved diff syntax highlighting
2024-12-12 15:18:36 -08:00
Ethan Budd
28faba12a2
Recognize .C and .H as supported cpp extensions (#21647)
Co-authored-by: Peter Tripp <peter@zed.dev>
2024-12-10 19:55:21 -05:00
Nils Koch
ce9e4629be
Add go version to gopls cache key (#20922)
Closes #8071

Release Notes:

- Changed the Go integration to check whether an existing `gopls` was compiled for the current `go` version.

Previously we cached gopls (the go language server) as a file called
`gopls_{GOPLS_VERSION}`. The go version that gopls was built with is
crucial, so we need to cache the go version as well.

It's actually super interesting and very clever; gopls uses go to parse
the AST and do all the analyzation etc. Go exposes its internals in its
standard lib (`go/parser`, `go/types`, ...), which gopls uses to analyze
the user code. So if there is a new go release that contains new
syntax/features/etc. (the libraries `go/parser`, `go/types`, ...
change), we can rebuild the same version of `gopls` with the new version
of go (with the updated `go/xxx` libraries) to support the new language
features.

We had some issues around that (e.g., range over integers introduced in
go1.22, or custom iterators in go1.23) where we never updated gopls,
because we were on the latest gopls version, but built with an old go
version.

After this PR gopls will be cached under the name
`gopls_{GOPLS_VERSION}_go_{GO_VERSION}`.

Most users do not see this issue anymore, because after
https://github.com/zed-industries/zed/pull/8188 we first check if we can
find gopls in the PATH before downloading and caching gopls, but the
issue still exists.
2024-12-09 12:56:01 +01:00
Remco Smits
e58cdca044
Added JavaScript runnable detection for context and suite methods (#21719)
Fixes
https://github.com/zed-industries/zed/pull/21246#issuecomment-2525578141

<img width="545" alt="Screenshot 2024-12-08 at 22 58 33"
src="https://github.com/user-attachments/assets/2f303bfe-9718-4aa9-910e-613feca15ea8">
<img width="409" alt="Screenshot 2024-12-08 at 22 58 44"
src="https://github.com/user-attachments/assets/c4576cf7-fd71-44d2-911e-3ed944c9b794">

Release Notes:

- Added JavaScript runnable detection for `context` and `suite` methods
for mochajs framework
2024-12-09 13:17:51 +02:00
uncenter
feb2d85a13
Add YAML/TOML frontmatter injections for markdown (#21503)
Closes #7938. Adds front-matter injections for TOML/YAML in markdown. 
- See: https://github.com/tree-sitter-grammars/tree-sitter-markdown/blob/split_parser/tree-sitter-markdown/queries/injections.scm.

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-12-06 12:34:15 -05:00
Conrad Irwin
44264ffedc
Revert accidental change to Rust outline files (#21545)
Release Notes:

- Preview only: Fixed impl blocks in the rust outline view
2024-12-04 11:58:56 -07:00
Conrad Irwin
75c9dc179b
Add textobjects queries (#20924)
Co-Authored-By: Max <max@zed.dev>

Release Notes:

- vim: Added motions `[[`, `[]`, `]]`, `][` for navigating by section,
`[m`, `]m`, `[M`, `]M` for navigating by method, and `[*`, `]*`, `[/`,
`]/` for comments. These currently only work for languages built in to
Zed, as they are powered by new tree-sitter queries.
- vim: Added new text objects: `ic`, `ac` for inside/around classes,
`if`,`af` for functions/methods, and `g c` for comments. These currently
only work for languages built in to Zed, as they are powered by new
tree-sitter queries.

---------

Co-authored-by: Max <max@zed.dev>
2024-12-03 10:37:01 -07:00
Piotr Osiewicz
59dc6cf523
toolchains: Run listing tasks on background thread (#21414)
Potentially fixes #21404

This is a speculative fix, as while I was trying to repro this issue
I've noticed that introducing artificial delays in ToolchainLister::list
could impact apps responsiveness. These delays were essentially there to
stimulate PET taking a while to find venvs.

Release Notes:

- Improved app responsiveness in environments with multiple Python
virtual environments
2024-12-02 21:03:31 +01:00
Piotr Osiewicz
95a047c11b
tasks/rust: Add support for running examples as binary targets (#21412)
Closes #21044

Release Notes:

- Added support for running Rust examples as tasks.
2024-12-02 19:53:51 +01:00
Danilo Leal
f795ce9623
Add language icons to the language selector (#21298)
Closes https://github.com/zed-industries/zed/issues/21290

This is a first attempt to show the language icons to the selector.
Ideally, I wouldn't like to have yet another place mapping extensions to
icons, as we already have the `file_types.json` file doing that, but I'm
not so sure how to pull from it yet. Maybe in a future pass we'll
improve this and make it more solid.

<img width="700" alt="Screenshot 2024-11-28 at 16 10 27"
src="https://github.com/user-attachments/assets/683c3bef-5389-470f-a41e-3d510b927b61">

Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-12-02 15:01:09 -03:00
Finn Evers
3987d0d731
Treat .pcss files as CSS (#21402)
This addresses
https://github.com/zed-industries/zed/pull/19416#discussion_r1865019293
and also follows the [associated PostCSS file extensions for VS
Code](5d003170c5/package.json (L37)).

Release Notes:

- `.pcss` files are now recognized as CSS

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-12-02 10:56:47 -05:00
Remco Smits
fd71801346
Improve JavaScript runnable detection followup (#21363)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Followup: https://github.com/zed-industries/zed/pull/21246

**Before**
<img width="545" alt="Screenshot 2024-11-30 at 13 27 15"
src="https://github.com/user-attachments/assets/3346e485-96c8-482d-b5fd-85b86f37d662">
**After**
<img width="537" alt="Screenshot 2024-11-30 at 13 27 36"
src="https://github.com/user-attachments/assets/3cedcaa5-e285-47fb-909d-16d37d9844ca">

We did not need to add the `*` as it was already matching one of them,
we actually need at least one of them, so making it optional was a
mistake.

Don't think we need to add release notes, as the change is only on main
the branch now.

Release Notes:

- N/A
2024-11-30 13:55:14 +01:00
Jaagup Averin
b12a508ed9
python: Fix highlighting for forward references (#20766)
[PEP484](https://peps.python.org/pep-0484/) defines "Forward references"
for undefined types. This PR treats such annotations as types rather
than strings.
Release Notes:

- Added Python syntax highlighting for forward references.
2024-11-28 09:59:10 +01:00
feeiyu
c2c968f2de
Enable clangd's dot-to-arrow feature (#21142)
Closes #20815


![dot2arrow1127](https://github.com/user-attachments/assets/d825f9bf-52ae-47ee-b3a3-5f952b6e8979)

Release Notes:
- Enabled clangd's dot-to-arrow feature
2024-11-28 10:43:25 +02:00
Remco Smits
04ff9f060c
Improve runnable detection for JavaScript files (#21246)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Closes #21242

![Screenshot 2024-11-27 at 18 52
51](https://github.com/user-attachments/assets/d096197c-33d2-41b9-963d-3e1a9bbdc035)
![Screenshot 2024-11-27 at 18 53
08](https://github.com/user-attachments/assets/b3202b00-3f68-4d9d-acc2-1b86c081fc34)

Release Notes:

- Improved runnable detection for JavaScript/Typescript files.
2024-11-28 00:54:01 +01:00
Kirill Bulatov
ce6782f4c8
Use eslint from the fork (#21233)
Part of https://github.com/zed-industries/zed/issues/21220

Microsoft had decided to switch over to a different releasing strategy,
autogenerating all releases and not publishing tarballs anymore.
But it was not enough, and they had also removed old tarballs, including
a relatively old `2.4.4` version release's tarballs, which broke Zed
downloads.
See https://github.com/microsoft/vscode-eslint/issues/1954

This PR uses
https://github.com/zed-industries/vscode-eslint/releases/tag/2.4.4 from
Zed's fork, manually released for the same tag.

This approach is merely a stub before more sustainable solution is
found, and I think we need to pivot into downloading *.vsix from
https://open-vsx.org/extension/dbaeumer/vscode-eslint but this is quite
a change so not done right now.

Release Notes:

- Fixed eslint 404 downloads
2024-11-27 12:02:39 +02:00
Piotr Osiewicz
e85848a695
pylsp: Prefer version from user venv (#21069)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Closes #ISSUE

Release Notes:

- pylsp will now use version installed in user venv, if one is
available.
2024-11-25 00:54:47 +01:00
Carroll Wainwright
20bffaf93f
python: Highlight docstrings for classes and modules (#20486)
Release Notes:

- Add `string.doc` python syntax highlighting to class and module-level
docstrings.

Previously, only docstrings inside python functions were labeled as
`string.doc`, but docstrings can exist at the class or module level too.
This adds the more specific string type for each of those.

*Before*:
<img width="288" alt="image"
src="https://github.com/user-attachments/assets/5a6c4c9d-709c-40e2-8316-31c95084a1a9">

*After*:
<img width="294" alt="image"
src="https://github.com/user-attachments/assets/8212bfa2-2288-4623-aa63-f748a2295ada">
2024-11-25 00:52:11 +01:00
teapo
c28f5b11f8
Allow overrides for json-language-server settings (#20748)
Closes #20739

The JSON LSP adapter now merges user settings with cached settings, and
util::merge_json_value_into pushes array contents from source to target.
2024-11-22 17:50:25 -05:00
Piotr Osiewicz
477c6e6833
pylsp: Update mypy plugin name (#21031)
Follow-up to #21025

Release Notes:

- N/A
2024-11-22 01:13:48 +01:00
张小白
9211e699ee
Follow-up on #18447: Unintentional deletion during merge-conflicts resolution (#20991)
After #18447 was merged, I reviewed the PR code as usual. During this
review, I realized that some code was unintentionally removed when I was
resolving merge conflicts in #18447.

Sorry!

Release Notes:

- N/A
2024-11-21 15:32:49 -08:00
Piotr Osiewicz
0663bf2a53
pylsp: Tweak default user settings (#21025)
I've also looked into not creating temp dirs in project directories and
succeeded at that for Mypy; no dice for rope though, I'll have to send a
patch to pylsp to fix that.
Closes #20646

Release Notes:

- Python: tweaked default pylsp settings to be less noisy (mypy and
pycodestyle are no longer enabled by default).
2024-11-22 00:25:30 +01:00
Piotr Osiewicz
0b373d43dc
toolchains: Use language-specific terms in UI (#20985)
Closes #ISSUE

Release Notes:

- N/A
2024-11-21 15:57:22 +01:00
Piotr Osiewicz
75c545aa1e
toolchains: Expose raw JSON representation of a toolchain (#20721)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Closes #ISSUE

Release Notes:

- N/A
2024-11-21 13:27:25 +01:00
张小白
95ace03706
windows: Set CREATE_NO_WINDOW for commands (#18447)
- Closes: #18371

Release Notes:

- N/A
2024-11-20 16:52:38 -08:00
Peter Tripp
8c342ef706
Bump JSON schemas: package.json, tsconfig.json (#20910)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Add script/update-json-schemas
Updated JSON schemas to
[SchemaStore/schemastore@569a343](569a343137)
(2024-11-19)
2024-11-20 13:35:00 -05:00
Jaagup Averin
7853e32f80
python: Highlight attribute docstrings (#20763)
Adds more docstring highlights missing from #20486.
[PEP257](https://peps.python.org/pep-0257/) defines attribute docstrings
as
> String literals occurring immediately after a simple assignment at the
top level of a module, class, or __init__ method are called “attribute
docstrings”.

This PR adds `@string.doc` for such cases.
Before:

![Screenshot_20241116_162257](https://github.com/user-attachments/assets/6b471cff-717e-4755-9291-d596da927dc6)
After:

![Screenshot_20241116_162457](https://github.com/user-attachments/assets/96674157-9c86-45b6-8ce9-e433ca0ae8ea)

Release Notes:

- Added Python syntax highlighting for attribute docstrings.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-11-19 18:53:36 +01:00