Commit Graph
408 Commits
Author SHA1 Message Date
Antonio Scandurra afc8e9050c Merge pull request #1252 from zed-industries/plugin
Language Server WebAssembly Plugin Integration (Part 2)
2022-07-12 11:04:20 +02:00
Isaac Clayton d8b22a200e Rename LspAdapterTrait to LspAdapter and LspAdapter to CachedLspAdapter 2022-07-12 09:29:38 +02:00
Isaac Clayton ec327a30c3 Fix minor issues pointed out in the review 2022-07-11 15:54:03 +02:00
Isaac Clayton 3ad8d5363c Remove the blocking call and inline on_lsp_diagnostics_published 2022-07-11 12:11:00 +02:00
Max Brunsfeld 1f16c68e6b Upgrade Tree-sitter and limit query cursors' concurrently-buffered matches 2022-07-08 14:09:34 -07:00
Isaac Clayton 8931218dc6 Remove debug statements 2022-07-08 21:28:35 +02:00
Isaac Clayton 3e8b230567 Highlight languages as languages load 2022-07-08 21:19:07 +02:00
Isaac Clayton 988f388165 Added theme to language 2022-07-08 18:11:28 +02:00
Isaac Clayton 6f99d59d38 Require theme directly when creating language 2022-07-08 16:08:40 +02:00
Isaac Clayton 73620dad06 Add channel to notify project when languages are added 2022-07-08 14:37:27 +02:00
Isaac Clayton 5cb59dfdab Fix errors resulting from rebase 2022-07-07 18:14:16 +02:00
Isaac Clayton 895747476f Done! Finish transition to async, very close to merging 2022-07-07 16:21:20 +02:00
Isaac Clayton d009e10a46 Fix all residual errors, need to polish off warnings and TODOS 2022-07-07 16:17:03 +02:00
Isaac Clayton 4f016d5fc4 Switch LspAdapter to struct and revert some async/await 2022-07-07 16:12:10 +02:00
Isaac Clayton 602fe14aa4 Going to move LspAdapter from trait to struct 2022-07-07 15:44:21 +02:00
Isaac Clayton 7d128e81aa Add lsp_settings_changed: Task to Project, need to resolve cx in Project::on_settings_changed 2022-07-07 15:39:59 +02:00
Isaac Clayton 2c637b83bf Work on updating code to be async 2022-07-07 15:32:41 +02:00
Isaac Clayton 841a9bd2a7 Make into async trait, will refactor everything Monday 2022-07-07 15:25:49 +02:00
Isaac Clayton 71e0555763 Add JSON LSP plugin 2022-07-07 15:22:16 +02:00
Isaac Clayton 7dd3114a7a Start switching JSON LSP adapter to plugin (take 2) 2022-07-07 15:16:59 +02:00
Antonio Scandurra c6254247c3 Allow providing an external format in format_on_save setting 2022-07-07 11:04:03 +02:00
Antonio ScandurraandMax Brunsfeld 2c1906d710 Normalize line endings when parsing completions
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-07-06 19:32:45 +02:00
Antonio Scandurra d3db700db4 Fix panic on paste when editing with auto-indent
Instead of accepting text as it's input by the user, we will read it
out of the edit operation after it gets sanitized by the buffer.
2022-07-06 19:00:11 +02:00
Max BrunsfeldandKeith Simmons 7e9beaf4bb Strip carriage returns from all text in text::Buffer
* Moving the logic from Rope to text::Buffer makes it easier
  to keep the Rope in sync with the fragment tree.
* Removing carriage return characters is lossier, but is much
  simpler than incrementally maintaining the invariant that
  there are no carriage returns followed by newlines. We may
  want to do something smarter in the future.

Co-authored-by: Keith Simmons <keith@zed.dev>
2022-07-05 17:25:09 -07:00
Max Brunsfeld 116fa92e84 Change Buffer constructors to construct the History internally 2022-07-05 14:51:52 -07:00
Antonio Scandurra eac76df0ac Transmit new line ending when buffer is reloaded 2022-07-05 08:01:14 +02:00
Max Brunsfeld 9804c683c0 Rename NewlineStyle -> LineEnding 2022-07-04 12:47:40 -07:00
Max Brunsfeld 0ba12eab22 Handle a file's line endings changing on disk 2022-07-04 12:30:28 -07:00
Antonio Scandurra d80ecb6f98 Ignore carriage returns when reloading buffer 2022-07-04 17:40:35 +02:00
Antonio Scandurra 3480b50920 Detect buffer newline style and honor it when saving 2022-07-04 17:40:26 +02:00
Max Brunsfeld fae1cc36d6 In most languages, use prev non-empty line as basis for preserving indent 2022-06-28 12:21:54 -07:00
Max Brunsfeld 929615964d Add new indentation features to support Python 2022-06-27 22:34:14 -07:00
Max Brunsfeld c0dbd8f9b9 Add python outline and bracket queries 2022-06-22 16:28:09 -07:00
Max BrunsfeldandAntonio Scandurra e9d19457d6 Add failing test for replication of lsp statuses
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-21 11:27:08 -07:00
Antonio Scandurra ae2273b40a Merge pull request #1204 from zed-industries/accurate-is-dirty
Determine `Buffer::is_dirty` based on the rope's fingerprint
2022-06-17 16:08:07 +02:00
Antonio Scandurra 4f215a77cd Don't compute fingerprint for every text summary 2022-06-17 15:15:27 +02:00
Antonio Scandurra 6f7a893ec9 Determine Buffer::is_dirty based on the rope's fingerprint 2022-06-17 12:38:25 +02:00
Max Brunsfeld 216a275ef2 Disable auto-indent entirely for markdown 2022-06-16 14:20:09 -07:00
Antonio Scandurra dc75b70724 Use word boundaries instead of syntax to infer completion edit ranges 2022-06-16 11:27:22 +02:00
Antonio Scandurra 4e4210ac39 Open a buffer for every language server error when clicking on status 2022-06-16 10:00:29 +02:00
Keith Simmons dddfc7beae Add hover test and tweak dismiss logic 2022-06-09 17:03:45 -07:00
Max Brunsfeld 87ba68e3ea Merge pull request #1155 from zed-industries/golang
Add Go support
2022-06-09 14:18:37 -07:00
Max Brunsfeld 7bb7187619 Add tests and fix bugs for editor indent/outdent commands w/ hard tabs 2022-06-09 10:26:09 -07:00
Max Brunsfeld 77b9ab0885 Add buffer test for autoindent with hard tabs 2022-06-09 09:05:07 -07:00
Antonio Scandurra 36a1a7a819 Start/stop language servers when enable_language_server changes 2022-06-09 10:08:11 +02:00
Max Brunsfeld f62fd3cddd Add support for hard tabs
* Add a `hard_tabs` setting that causes indentation to be performed
  using a tab instead of multiple spaces.
* Change Buffer's indentation-related APIs to return an `IndentSize`
  struct with a length and a kind, instead of just a single u32.
* Use hard tabs by default in Go.
2022-06-08 18:30:10 -07:00
Antonio Scandurra 712d47d94f Render a "Jump to Buffer" icon on all excerpt headers 2022-06-08 15:31:29 +02:00
Antonio Scandurra eda569d6b2 Snapshot file instead of path when creating a buffer snapshot 2022-06-08 14:29:14 +02:00
Max Brunsfeld 8f4387a252 Start work on installing gopls 2022-06-07 18:38:37 -07:00
Keith Simmons b014352740 Syntax highlighting working. Getting started on markdown support 2022-06-07 11:54:33 -07:00