Commit Graph
325 Commits
Author SHA1 Message Date
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
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
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 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
Quinn Wilton 3cc88904bf Add all Elm functions to the outline, including locals 2023-07-24 10:45:46 -07:00
Quinn Wilton 62ee52a5fc Highlight qualified Elm function calls 2023-07-24 10:45:15 -07:00
Quinn Wilton fbe0108959 Highlight Elm arrows as keywords 2023-07-24 10:44:56 -07:00
Mikayla Maki d95c4fdb2b Remove unbound highlight queries 2023-07-24 09:01:15 -07:00
Mikayla Maki ea74734b0a Touch up elm tree sitter integration 2023-07-24 08:52:51 -07:00
Quinn Wilton 6ad0852a70 Add outline.scm for Elm 2023-07-24 00:58:59 -07:00
Quinn Wilton dd504f5965 Add tree-sitter-glsl 2023-07-23 22:22:11 -07:00
Quinn Wilton a4914fcf3b Add tree-sitter-elm 2023-07-23 22:22:11 -07:00
Quinn Wilton fe388ed71e Add tree-sitter-nix 2023-07-23 17:24:50 -07:00
Nate Butler 5d22a300c3 Add the local and declare keywords to bash syntax highlighting 2023-07-20 13:18:15 -04:00
KCaverlyandmaxbrunsfeld efe973ebe2 add embedding query for json with nested arrays and strings
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-07-19 16:52:44 -04:00
KCaverlyandmaxbrunsfeld 9809ec3d70 update treesitter parsing to accomodate for collapsed nested functions
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-07-19 15:47:05 -04:00
Nate Butler fab26267db Merge branch 'main' into nate/add-bash-highlighting 2023-07-18 12:08:53 -04:00
KCaverly b9fdfd60f0 catch up with main 2023-07-18 10:26:28 -04:00
Piotr Osiewicz 7fde3614fe Remove leftover comment 2023-07-18 12:19:35 +02:00
KCaverly e630ff38c4 add embedding treesitter queries for elixir 2023-07-17 16:29:25 -04:00
KCaverly 1362c5a3d9 add embedding treesitter query for cpp 2023-07-17 14:43:29 -04:00
KCaverly 4bece54655 update jsx family of languages for preceeding comments and nested exports 2023-07-17 09:22:37 -04:00
Piotr Osiewicz ee9123a7da Remove test 2023-07-17 12:56:25 +02:00
Piotr Osiewicz 5b6582a7c2 rustfmt 2023-07-17 12:51:00 +02:00
Piotr Osiewicz 6c7a6d43fc Cargo fix 2023-07-17 12:38:35 +02:00
Piotr Osiewicz 94796e943b Set language id for PHP. LSP works! 2023-07-17 12:36:08 +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
KCaverly 2dae42b1ba update embedding query for tsx to accomodate for leading comments 2023-07-14 14:25:08 -04:00
KCaverly d4971e9ead update typescript parsing to manage for leading tsdoc comments 2023-07-14 13:47:10 -04:00