Commit Graph
159 Commits
Author SHA1 Message Date
Caius Durling 45902c29ce Add Terraform & HCL syntax highlighting (#6882)
Terraform and HCL are almost the same language, but not quite so
proposing them as separate languages within Zed. (Terraform is an
extension of HCL, with a different formatter.)

This is just adding the language definition, parsing and highlighting
functionality, not any LSP or formatting beyond that for either
language.

I've taken a bunch of inspiration from Neovim for having the separate
languages, and also lifted some of their `scm` files (with attribution
comments in this codebase) as the tree-sitter repo doesn't contain them.
(Neovim's code is Apache-2.0 licensed, so should be fine here with
attribution from reading Zed's licenses files.) I've then amended to
make sure the capture groups are named for things Zed understands. I'd
love someone from Zed to confirm that's okay, or if I should clean-room
implement the `scm` files.

Highlighting in Terraform & HCL with a moderate amount of syntax in a
file (Terraform on left, HCL on right.)

<img width="1392" alt="Screenshot 2024-01-31 at 18 07 45"
src="https://github.com/zed-industries/zed/assets/696/1d3c9a08-588e-4b8f-ad92-98ce1e419659">

Release Notes:

- (|Improved) ...
([#5098](https://github.com/zed-industries/zed/issues/5098)).
2024-02-05 11:38:30 -08:00
Andrew Lygin a3f81f29f8 Editor toolbar configuration (#7338)
Adds settings for hiding breadcrumbs and quick action bar from
the editor toolbar. If both elements are hidden, the toolbar disappears
completely.

Example:

```json
"toolbar": {
  "breadcrumbs": true,
  "quick_actions": false
}
```

- It intentionally doesn't hide breadcrumbs in other views (for
instance, in the search result window) because their usage there differ
from the main editor.
- The editor controls how breadcrumbs are displayed in the toolbar, so
implementation differs a bit for breadcrumbs and quick actions bar.

Release Notes:

- Added support for configuring the editor toolbar ([4756](https://github.com/zed-industries/zed/issues/4756))
2024-02-03 22:40:54 +02:00
Rashid Almheiri a02d46320d Modify the default tab size of OCaml & OCaml Interface to 2 (#7315)
Thanks @pseudomata for the heads up.

Release Notes:
- N/A
2024-02-03 12:04:15 +02:00
bc3ec60520 vim hml (#7298)
- Add a setting for `vertical_scroll_offset`
- Fix H/M/L in vim with scrolloff



Release Notes:

- Added a settings for `vertical_scroll_offset`
- vim: Fix H/M/L with various values of vertical_scroll_offset

---------

Co-authored-by: Vbhavsar <vbhavsar@gmail.com>
Co-authored-by: fdionisi <code@fdionisi.me>
2024-02-02 19:24:36 -07:00
Conrad Irwin 979b72f427 Do more on channel join (#7268)
This change makes it so that if you are the first to join a channel,
your project is automatically shared.

It also makes it so that if you join a channel via a link and there are
no shared projects, you open the notes instead of an empty workspace
with nothing.

This is to try and address the discoverability of project sharing: we've
had
two reviews that have talked about channels, but not talked about
sharing
projects into them, which makes me suspect they didn't know about the
feature.

Release Notes:

- Added a setting `share_on_join` (defaulting to true). When set, and
you join an empty channel, your project is automatically shared.
2024-02-02 09:52:30 -07:00
Bennet Bo Fenner 56e8126a6e Show diagnostics in scrollbar (#7175)
This PR implements support for displaying diagnostics in the scrollbar,
similar to what is already done for search results, symbols, git diff,
...

For example, changing a field name (`text`) without changing the
references looks like this in `buffer.rs` (note the red lines in the
scrollbar):

![image](https://github.com/zed-industries/zed/assets/53836821/c46f0d55-32e3-4334-8ad7-66d1578d5725)

As you can see, the errors, warnings, ... are displayed in the scroll
bar, which helps to identify possible problems with the current file.

Relevant issues: #4866, #6819

Release Notes:

- Added diagnostic indicators to the scrollbar
2024-02-02 12:10:42 +02:00
Mikayla MakiandNathan 9941122e44 WIP: Add a setting to visually redact enviroment variables (#7124)
Release Notes:

- Added bash syntax highlighting to `.env` files. 
- Added a `private_files` setting for configuring which files should be
considered to contain environment variables or other sensitive
information.
- Added a `redact_private_values` setting to add or remove censor bars
over variable values in files matching the `private_files` patterns.
-(internal) added a new `redactions.scm` query to our language support,
allowing different config file formats to indicate where environment
variable values can be identified in the syntax tree, added this query
to `bash`, `json`, `toml`, and `yaml` files.

---------

Co-authored-by: Nathan <nathan@zed.dev>
2024-01-31 11:42:09 -08:00
Julia 8bada3941c Add debounce for re-querying completion documentation 2024-01-31 09:50:26 -05:00
Felix Salazar a4d69275fb Show highlighted symbol in the scrollbar (#7029)
Release Notes:

- Added highlighted symbols to the scrollbar; partially mentioned in:
  - https://github.com/zed-industries/zed/issues/5308
  - https://github.com/zed-industries/zed/issues/4866
2024-01-30 13:57:42 -08:00
Conrad Irwin 79e50f734c nightly url setting (#7037)
Release Notes:

- Added the ability to set settings per-release stage
- Added a `"server_url"` setting
2024-01-30 11:35:07 -07:00
Lino Le Van d998875945 Add Deno LSP support (#5816)
This PR adds support for the deno LSP. Should be reviewable now.

Release Notes:

- Added support for the Deno LSP
([#5361](https://github.com/zed-industries/zed/issues/5361)).
2024-01-25 17:44:51 -08:00
Conrad Irwin 9d5e3fe30f Add a setting "use_autoclose" to control autoclose
Also disable autoclose for Chat
2024-01-20 13:33:03 -07:00
Conrad Irwin 0fdbce875b Default to Zed Sans for UI 2024-01-13 22:38:22 -07:00
Piotr OsiewiczandMarshall Bowers f90b05b716 Display setting documentation in settings.json (#3936)
Let this screenshot of settings.json speak for itself: 

![image](https://github.com/zed-industries/zed/assets/24362066/fca60383-1788-43f9-803b-00f083394c8a)

Release Notes:
- Added code completion & on-hover documentation to Zed's settings.json
file.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-08 19:30:18 +01:00
Kirill Bulatov ab027aa72e Rework the way project panel auto reveals entries
* gitignored entries are never auto revealed
* `project_panel::auto_reveal_entries = true` settings entry was added,
setting it to `false` will disable the auto reveal
* `pane::RevealInProjectPanel` action was added that activates the project panel and reveals the entry it got triggered on (including the gitignored ones)
2023-12-12 11:38:51 +02:00
Nate Butler cf0c36763c Update default ui font settings 2023-11-21 10:43:18 -05:00
Kirill Bulatov 96f3f81c6c Fix most of the TODOs 2023-11-17 21:40:57 +02:00
Kirill Bulatov 0c58d9b130 Use a better name 2023-11-17 21:40:57 +02:00
Kirill Bulatov 078ae9256a Add default scan excluded files settings 2023-11-17 21:40:56 +02:00
Nate Butler 31ed4fddff Revert change to default buffer font size 2023-11-16 13:13:03 -05:00
Nate ButlerandMarshall Bowers fc3bba86c8 Change the default buffer font size to 16
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-16 11:38:04 -05:00
Nate ButlerandMarshall Bowers 4f9f0ce53c Allow users to set UI font properties in their settings
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-16 11:37:46 -05:00
Joseph T. Lyons e90f157320 Add gpt-4-1106-preview model 2023-11-14 08:28:57 -05:00
Kirill Bulatov 943bc66a9a Do not add diagnostics for any selection in the diagnostics panel 2023-11-10 13:35:58 +02:00
Max Brunsfeld c9bd5548ae Add a setting for when to seed the search query from the text under the cursor 2023-11-09 14:03:14 -08:00
Nate Butler 02628f163d Give notifications a bit more breathing room by default 2023-10-24 09:25:49 -04:00
Max Brunsfeld b7207c5533 Merge branch 'main' into notifications 2023-10-13 11:31:53 -07:00
Julia e3e012b4b4 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
Julia 8985fca6a9 Add setting to disable completion docs 2023-10-12 22:08:47 -04:00
Max Brunsfeld 7d663b7290 Start work on notification panel 2023-10-12 17:41:09 -07:00
Kirill Bulatov 1c58aafd9c Allow to configure default prettier 2023-10-11 12:56:29 +03:00
Kirill Bulatov df2c2470c8 Make language adapters able to require certain bundled formatters 2023-10-11 12:56:29 +03:00
Kirill Bulatov a7f42aa29e Slightly better prettier settings and discovery 2023-10-11 12:56:29 +03:00
Kirill Bulatov 0410fee03d Prepare prettier file lookup code infra 2023-10-11 12:56:28 +03:00
Conrad Irwin f867bbf5c4 More progress and some debug logs to remove 2023-10-06 16:48:29 -06:00
Joseph T. Lyons 07cbcd9cb5 Add Nushell support to venv activation 2023-10-01 23:38:30 -04:00
Mikayla f6e1b47202 Refactor elixir LSP settings 2023-09-29 14:12:50 -07:00
Antonio Scandurra 04bedbd30f Introduce the ability to include or exclude warnings from project diagnostics (#3056)
![CleanShot 2023-09-27 at 18 09
37](https://github.com/zed-industries/zed/assets/482957/317d31e4-81f8-44d8-b94f-8ca7150d3fd2)

Release Notes:

- Added the ability to exclude warnings from project diagnostics. By
default, they will be on but they can be disabled temporarily by
clicking on the warnings icon. The default behavior can be changed by
changing the new `diagnostics.include_warnings` setting.
2023-09-29 13:13:04 +01:00
Joseph T. Lyons 3190bfa2e5 Enable semantic_index by default 2023-09-28 17:17:26 -04:00
Antonio Scandurra f84a84bf07 Introduce a new include_warnings setting under diagnostics 2023-09-27 18:08:08 -06:00
Mikayla Maki 9c3518e8fc 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 2c6ef3a45d Improve lsp log viewer's behavior in the presence of LSP restarts
Improve settings interface to local LSP
2023-09-24 04:59:55 -07:00
KCaverly 57f49a6530 remove conditional action registration for activate semantic search mode 2023-09-20 12:38:29 -04:00
Mikayla 20a8d98b73 Get nextLS running 2023-09-20 06:55:24 -07:00
Max Brunsfeld 4172be8abf Create chat panel settings 2023-09-08 13:28:19 -07:00
Conrad Irwin 548218effc relative line numbers (#2887)
- Add relative_line_mode
- vim change for wrapped lines

Release Notes:

- Add a `relative_line_numbers` setting
([#988](https://github.com/zed-industries/community/issues/998)).
2023-08-25 14:17:41 -06:00
Joseph T. LyonsandMikayla Maki 4218484d0f WIP
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-08-25 15:06:31 -04:00
Conrad Irwinand af7c4ea748 Add relative_line_mode
Co-Authored-By: joseph@zed.dev
2023-08-25 11:50:41 -06:00
Joseph T. Lyons 8026edceb7 Shorten setting name 2023-08-23 04:07:10 -04:00
Joseph T. LyonsandJulia da4fd139ca WIP
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-08-22 15:29:25 -04:00