Commit Graph
415 Commits
Author SHA1 Message Date
ForLoveOfCatsandMikayla 8ba2f77148 One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Max Brunsfeld 7527850546 Handle RPC requests for type definitions on server and host 2022-08-04 15:10:46 -07:00
ForLoveOfCats c21314bfbd Add ability to provide custom LSP server initialization options 2022-08-04 14:47:06 -04:00
ForLoveOfCats 5149c15329 Add "go to type definition" action 2022-07-29 11:41:08 -04:00
Max BrunsfeldandMikayla Maki fa5af4383d Introduce AutoindentMode parameter to Buffer::edit
This controls whether or not we preserve the relative indentation
of inserted text blocks.

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2022-07-28 14:03:31 -07:00
Antonio Scandurra 8552ba15dc Show symbols located in visible paths before ones located externally 2022-07-26 14:48:18 +02:00
Antonio Scandurra 45eb0e7889 Clip invalid edits from LSP instead of reporting an error
This fixes an issue with the Go language server, which reports invalid
formatting ranges when there's a missing newline at the end of the file.
Specifically, if the buffer is `N` lines long, it will try to insert the
newline at `Point(N + 1, 0)`.

I confirmed the behavior is the same in VS Code, and they indeed clip the
LSP ranges as well.
2022-07-26 08:43:27 +02:00
Max Brunsfeld 2a478462b6 Fix association of 'json' lsp language id with JSON language 2022-07-12 15:43:59 -07:00
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
Antonio Scandurra b1e3b38cb3 Don't prompt guest to save when closing window after disconnection 2022-07-12 09:05:39 +02:00
Isaac Clayton be41ad44a7 Fix minor issues in plugin and project raised during review 2022-07-11 16:40:12 +02:00
Isaac Clayton bc94d0d1a9 Restore main version of Project::symbols and convert to async 2022-07-11 16:22:58 +02:00
Isaac Clayton 0600157c38 Restore main version of Project::completions and convert to async 2022-07-11 15:55:07 +02:00
Isaac Clayton 3ad8d5363c Remove the blocking call and inline on_lsp_diagnostics_published 2022-07-11 12:11:00 +02:00
Isaac Clayton 8c91c5c575 Minor fixes found during review 2022-07-11 10:37:51 +02:00
Max Brunsfeld 5bafabcb8e Merge pull request #1314 from zed-industries/code-action-with-edit-and-command
Run code action's commands if their edits are empty
2022-07-08 16:58:12 -07:00
Max Brunsfeld e101f4e705 Run code action's commands if their edits are empty 2022-07-08 16:12:20 -07:00
Isaac Clayton 8931218dc6 Remove debug statements 2022-07-08 21:28:35 +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
Antonio Scandurra 56f9c7bc1b Include ignored files in fuzzy search when root entry is ignored 2022-07-08 11:54:45 +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 39fdbc593b Fix most warnings 2022-07-07 16:19:49 +02:00
Isaac Clayton 6585daccf9 Further unpropogate async 2022-07-07 16:16:58 +02:00
Isaac Clayton 4f016d5fc4 Switch LspAdapter to struct and revert some async/await 2022-07-07 16:12:10 +02:00
Isaac Clayton 0872e9b1a7 use join_all to build partial symbols and completions asynchronously 2022-07-07 15:44:21 +02:00
Isaac Clayton 602fe14aa4 Going to move LspAdapter from trait to struct 2022-07-07 15:44:21 +02:00
Isaac Clayton e4a680f47b Uncommented previously commented sections 2022-07-07 15:44:18 +02:00
Isaac Clayton 2b0b341415 Move await outside of a closure, remove future_wrap dependency 2022-07-07 15:42:53 +02:00
Isaac Clayton 172e276411 Fix warnings and propogate async further 2022-07-07 15:42:48 +02:00
Isaac Clayton ce90dbd06a Temporarily comment out closure errors to address other errors in project 2022-07-07 15:41:34 +02:00
Isaac Clayton 2ff67ef9f6 Factor out await in doubly-nested for loop 2022-07-07 15:40:39 +02:00
Isaac Clayton db7b863d8c Fix on_settings_changed, need to review that impl is correct 2022-07-07 15:40:01 +02:00
Isaac Clayton 4dad2eb7d7 Refactor closure to extract async 2022-07-07 15:40:01 +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 f4b4212932 More work on transitioning to async, need to figure out when to stop 2022-07-07 15:38:28 +02:00
Isaac Clayton feb6cf6789 Allow async to infect some more functions 2022-07-07 15:34:27 +02:00
Isaac Clayton 2c637b83bf Work on updating code to be async 2022-07-07 15:32:41 +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
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 4aa19c1a7f Select the last root when right-clicking below all project panel entries 2022-07-05 13:21:41 -07:00
Antonio Scandurra eac76df0ac Transmit new line ending when buffer is reloaded 2022-07-05 08:01:14 +02:00
Max Brunsfeld b0efa4f5c1 Move project tests into their own file 2022-07-04 12:00:15 -07:00
Antonio Scandurra 3480b50920 Detect buffer newline style and honor it when saving 2022-07-04 17:40:26 +02:00
Antonio Scandurra d3b9eca791 Merge branch 'main' into user-timeline 2022-07-04 09:23:16 +02:00
Antonio Scandurra 0b2452f666 Merge pull request #1265 from zed-industries/worktree-performance
Fix problems that arise when large numbers of files change on disk
2022-07-04 09:19:18 +02:00
Keith Simmons ebe733a393 Restart language server using original root path rather than the path of the buffer restarted from 2022-06-30 19:11:21 -07:00