Commit Graph
351 Commits
Author SHA1 Message Date
Piotr Osiewicz ecb037fc0e language: Add block_comment to CSS (#3045)
Fixes zed-industries/community#2081

Release Notes:
- Fixed "toggle comment" action not working in CSS buffers.
2023-09-27 11:56:26 +02:00
Mikayla c2fca054ae Fix compile and test errors 2023-09-25 10:46:09 -07:00
Mikayla ad7c1f3c81 Download next-ls automatically from github 2023-09-25 10:40:20 -07:00
Mikayla 8b63e45f0b Implement LSP adapter methods for syntax highlighting 2023-09-24 05:08:05 -07:00
Mikayla 052cb459a6 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
Mikayla 02a85b1252 Add local next LSP adapter 2023-09-21 18:09:02 -07:00
Mikayla 2be34ef254 Add syntax highlighting for nu scripts 2023-09-09 15:39:39 -07:00
Mikayla ef03e206d6 WIP: Add nushell support 2023-09-09 14:01:53 -07:00
JuliaandMax Brunsfeld 74ccb3df63 Fix Python's cached binary retrieval being borked
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-09-08 12:09:31 -04:00
Julia 1969a12a0b Include JS template literal as string type for overrides 2023-09-07 10:55:04 -04:00
Julia 8d672f5d4c Remove NodeRuntime static & add fake implementation for tests 2023-09-06 11:18:55 -04:00
Kirill Bulatov ddc6214216 Tailwind autocomplete (#2920)
Release Notes:
- Added basic Tailwind CSS autocomplete support
([#746](https://github.com/zed-industries/community/issues/746)).
2023-08-31 16:55:46 +03:00
Kirill Bulatov 5731ef51cd Fix plugin LSP adapter intefrace 2023-08-31 15:32:24 +03:00
Kirill Bulatov 9e12df43d0 Post-rebase fixes 2023-08-31 11:53:46 +03:00
Julia ff3865a4ad Merge branch 'main' into multi-server-completions-tailwind 2023-08-30 22:58:37 -04:00
JuliaandKirill Bulatov 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
Kirill Bulatov 0f619e0b67 Do not write TRACE logs into file for Lua 2023-08-31 01:14:37 +03:00
Julia 35b7787e02 Add Tailwind server to TSX 2023-08-28 15:19:16 -04:00
JuliaandKirill Bulatov ded6decb29 Initial unstyled language server short name in completions
Co-Authored-By: Kirill Bulatov <kirill@zed.dev>
2023-08-28 11:27:45 -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
Mikayla 74565ed0b8 Add feature flags handling to the client, rewrite staff mode to a trait extension style 2023-08-25 17:00:53 -07:00
JuliaandMax Brunsfeld 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
Max Brunsfeld 404f76739c Format let-else statements 2023-08-25 10:11:32 -07:00
Julia 68408f3838 Add VSCode CSS language server & add Tailwind to .css files 2023-08-22 23:50:40 -04:00
Julia affb73d651 Only generate workspace/configuration for relevant adapter 2023-08-22 23:36:04 -04:00
Kirill Bulatov a35b3f39c5 Expand word characters for html and css 2023-08-22 12:41:59 +03:00
Piotr OsiewiczandJulia Risley 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
Conrad Irwin 14fa996cdc Add # and $ for js 2023-08-21 22:36:58 -06:00
Piotr Osiewicz 344a09a4f8 Rename word_boundaries to word_characters 2023-08-22 01:02:25 +02:00
Piotr Osiewicz 00caad2f17 ..and use it in PHP language config 2023-08-21 17:41:05 +02:00
Kirill Bulatov 4f0fa21c04 Provide more data to tailwind langserver
Tailwind needs user languages and language-to-language-id mappings to
start providing completions for those languages.
And also it has emmet completions disabled by default, enable them.
2023-08-17 16:14:55 +03:00
Julia 8839b07a25 Add broken Tailwind language server 2023-08-16 11:53:05 -04:00
Joseph T. Lyons d6ca0a1f24 Associate extensions with language 2023-08-15 16:33:02 -04:00
Joseph T. Lyons c523ccc4c7 Fix code that identifies language via extension 2023-08-08 21:35:11 -04:00
Max Brunsfeld 7288be4251 Make LspAdapter::process_diagnostics synchronous (#2829)
When editing rust code, the project diagnostics view sometimes fails to
update, so that you have to close the view and re-open it to see the
correct state.

This PR fixes one possible cause of that problem. There was an async
step in between *receiving* diagnostics from the language server and
updating the diagnostics, due to an async call to
`LspAdapter::process_diagnostics`. This could cause the following
sequence of events to happen:

1. Rust-analyzer sends us new diagnostics for a file `a.rs`
2. We call `process_diagnostics` with those diagnostics
3. Rust-analyzer sends us a `WorkDoneProgress` message, indicating that
the "flycheck" (aka `cargo check`) process has completed
4. We update the project diagnostics view due to this message.
5. The `process_diagnostics` call for `a.rs` completes
6. 💥 We have the new diagnostics for `a.rs`, but do not update the
project diagnostics view again.

This PR fixes this bug by simply making `process_diagnostics`
synchronous. There is no I/O or expensive computation happening in that
method. If we need to make it asynchronous in the future, we need to
introduce a queue that ensures that `publishDiagnostics` and
`workDoneProgress` messages are processed serially.

Release Notes:

- Fixed a bug where the project diagnostics view would sometimes fail to
update properly when using Rust-analyzer.
2023-08-07 14:31:49 -07:00
Joseph T. Lyons dbf25ea2ff Add syntax highlighting for Cargo.toml files 2023-08-07 17:24:22 -04:00
Max BrunsfeldandNathan 4e33654aba Make LspAdapter::process_diagnostics synchronous
Co-authored-by: Nathan <nathan@zed.dev>
2023-08-07 13:53:41 -07:00
Joseph T. Lyons ef5b982ea5 Fix bash path_suffixes and add line_comment 2023-08-06 02:20:31 -04:00
Max Brunsfeld 9e755bb855 Revert "Extract syntax highlighting properties from tree-sitter highlight queries (#2797)"
This reverts commit 45c635872b, reversing
changes made to f2b82369f2.
2023-08-02 12:15:39 -07:00
KCaverly 300c693d55 catchup with main 2023-08-01 10:40:38 -04:00
KCaverly 599f674827 add php support for semantic search 2023-07-31 16:36:09 -04:00
KCaverly ca4e21881e add ruby support for semantic search 2023-07-31 10:54:30 -04:00
KCaverly a5dd8dd0a9 add lua embedding query for semantic search 2023-07-31 10:02:28 -04:00
Mikayla Maki 1545128ec5 Add Nix language support (#2781)
This adds rudimentary language support for the Nix expression language,
through tree-sitter-nix.

I spent a little bit of time trying to add support for one of the Nix
language servers too, but wasn't able to get any of them running
reliably without crashing, and so I've opted to stick to just the
tree-sitter grammar for now.


![image](https://github.com/zed-industries/zed/assets/285821/c770f3d8-6fa0-4083-9bf3-239cc78ca307)
2023-07-27 18:35:52 -07:00
Nate Butler 86fa27eb54 Update uses of # to . in our scheme files where they are interchangeable.
uses of `#` cause ERRORs in our scheme highlighting
2023-07-27 12:41:19 -04:00
Nate Butler 85f193dd09 Extract syntax highlighting properties from tree-sitter highlight queries 2023-07-27 12:25:53 -04:00
KCaverly 0ac919f6e0 catchup with main 2023-07-26 09:50:38 -04:00
Mikayla Maki b5630eb901 Merge branch 'main' into quinn/nix 2023-07-25 11:34:57 -07:00
KCaverly c86096a886 update semantic index tests for javascript 2023-07-25 10:38:37 -04:00
Quinn Wilton e199a6a3a1 Highlight all Elm function calls 2023-07-24 10:55:15 -07:00