Commit Graph
409 Commits
Author SHA1 Message Date
Max Brunsfeld fad4365565 Fix association of 'json' lsp language id with JSON language 2022-07-12 15:43:59 -07:00
Antonio Scandurra 810a5d5318 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 99f67fde8c Rename LspAdapterTrait to LspAdapter and LspAdapter to CachedLspAdapter 2022-07-12 09:29:38 +02:00
Isaac Clayton 6a1f649d6a Fix minor issues pointed out in the review 2022-07-11 15:54:03 +02:00
Isaac Clayton aa6fc12980 Remove the blocking call and inline on_lsp_diagnostics_published 2022-07-11 12:11:00 +02:00
Max Brunsfeld 559f6854d0 Upgrade Tree-sitter and limit query cursors' concurrently-buffered matches 2022-07-08 14:09:34 -07:00
Isaac Clayton ce8898acf1 Remove debug statements 2022-07-08 21:28:35 +02:00
Isaac Clayton bf71eb0ae0 Highlight languages as languages load 2022-07-08 21:19:07 +02:00
Isaac Clayton 3a4657614f Added theme to language 2022-07-08 18:11:28 +02:00
Isaac Clayton 5a48e0fa2a Require theme directly when creating language 2022-07-08 16:08:40 +02:00
Isaac Clayton 2140c81501 Add channel to notify project when languages are added 2022-07-08 14:37:27 +02:00
Isaac Clayton c4c1977bdb Fix errors resulting from rebase 2022-07-07 18:14:16 +02:00
Isaac Clayton 0b85613a86 Done! Finish transition to async, very close to merging 2022-07-07 16:21:20 +02:00
Isaac Clayton ae5262e93a Fix all residual errors, need to polish off warnings and TODOS 2022-07-07 16:17:03 +02:00
Isaac Clayton 2d4bc1704b Switch LspAdapter to struct and revert some async/await 2022-07-07 16:12:10 +02:00
Isaac Clayton 5f055cd352 Going to move LspAdapter from trait to struct 2022-07-07 15:44:21 +02:00
Isaac Clayton 0ba6d9618e 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 b74f90639c Work on updating code to be async 2022-07-07 15:32:41 +02:00
Isaac Clayton eb958dfbb8 Make into async trait, will refactor everything Monday 2022-07-07 15:25:49 +02:00
Isaac Clayton 56a6a81a24 Add JSON LSP plugin 2022-07-07 15:22:16 +02:00
Isaac Clayton f3b8e93a8a Start switching JSON LSP adapter to plugin (take 2) 2022-07-07 15:16:59 +02:00
Antonio Scandurra 3b345cba67 Allow providing an external format in format_on_save setting 2022-07-07 11:04:03 +02:00
Antonio ScandurraandMax Brunsfeld 6d573a2822 Normalize line endings when parsing completions
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-07-06 19:32:45 +02:00
Antonio Scandurra f94bfeb1cc 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 e6c9549bbd 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 69ed736484 Change Buffer constructors to construct the History internally 2022-07-05 14:51:52 -07:00
Antonio Scandurra a90a086c3e Transmit new line ending when buffer is reloaded 2022-07-05 08:01:14 +02:00
Max Brunsfeld bf20993000 Rename NewlineStyle -> LineEnding 2022-07-04 12:47:40 -07:00
Max Brunsfeld 31ca4c5efa Handle a file's line endings changing on disk 2022-07-04 12:30:28 -07:00
Antonio Scandurra 472b53db01 Ignore carriage returns when reloading buffer 2022-07-04 17:40:35 +02:00
Antonio Scandurra f356219cd2 Detect buffer newline style and honor it when saving 2022-07-04 17:40:26 +02:00
Max Brunsfeld d9de9f4afa In most languages, use prev non-empty line as basis for preserving indent 2022-06-28 12:21:54 -07:00
Max Brunsfeld 7610a6a72d Add new indentation features to support Python 2022-06-27 22:34:14 -07:00
Max Brunsfeld 3527013928 Add python outline and bracket queries 2022-06-22 16:28:09 -07:00
Max BrunsfeldandAntonio Scandurra c47abf1d47 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 18631fd3d0 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 42064f76b0 Don't compute fingerprint for every text summary 2022-06-17 15:15:27 +02:00
Antonio Scandurra 5ad9e9e6c8 Determine Buffer::is_dirty based on the rope's fingerprint 2022-06-17 12:38:25 +02:00
Max Brunsfeld 54abc9864a Disable auto-indent entirely for markdown 2022-06-16 14:20:09 -07:00
Antonio Scandurra 306b76e782 Use word boundaries instead of syntax to infer completion edit ranges 2022-06-16 11:27:22 +02:00
Antonio Scandurra 7fbfa16b68 Open a buffer for every language server error when clicking on status 2022-06-16 10:00:29 +02:00
Keith Simmons 2232ebf584 Add hover test and tweak dismiss logic 2022-06-09 17:03:45 -07:00
Max Brunsfeld 2e11995a75 Merge pull request #1155 from zed-industries/golang
Add Go support
2022-06-09 14:18:37 -07:00
Max Brunsfeld 01aca3b128 Add tests and fix bugs for editor indent/outdent commands w/ hard tabs 2022-06-09 10:26:09 -07:00
Max Brunsfeld 1c9d3d551d Add buffer test for autoindent with hard tabs 2022-06-09 09:05:07 -07:00
Antonio Scandurra be274c940e Start/stop language servers when enable_language_server changes 2022-06-09 10:08:11 +02:00
Max Brunsfeld 60335c5d1c 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 96602c79bc Render a "Jump to Buffer" icon on all excerpt headers 2022-06-08 15:31:29 +02:00
Antonio Scandurra 19047bd204 Snapshot file instead of path when creating a buffer snapshot 2022-06-08 14:29:14 +02:00
Max Brunsfeld 13f3799374 Start work on installing gopls 2022-06-07 18:38:37 -07:00