Commit Graph
582 Commits
Author SHA1 Message Date
ForLoveOfCatsandMikayla fbea44bc5c One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Max Brunsfeld ac140c478e Handle RPC requests for type definitions on server and host 2022-08-04 15:10:46 -07:00
ForLoveOfCats 4e5bcdc9ce Add ability to provide custom LSP server initialization options 2022-08-04 14:47:06 -04:00
Antonio Scandurra 9a1ae987f4 Fix tests 2022-08-02 18:48:17 +02:00
Antonio Scandurra 47845cade9 Merge pull request #1430 from zed-industries/xdg-compliance
Store config files under `~/.config/zed` and data files under `~/Library/Application Support/Zed`
2022-08-01 12:13:08 +02:00
ForLoveOfCats 3c06dc3982 Deduplicate some lsp_command code 2022-07-29 18:04:14 -04:00
ForLoveOfCats ef6efc9590 Add "go to type definition" action 2022-07-29 11:41:08 -04:00
Antonio Scandurra 186464eeb7 Use XDG-compliant directories for config and cache files 2022-07-29 10:01:48 +02:00
Max BrunsfeldandMikayla Maki 669d716519 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 dcd12f677b Show symbols located in visible paths before ones located externally 2022-07-26 14:48:18 +02:00
Antonio Scandurra 77a1d3aa12 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
Antonio Scandurra d103825bc6 Start indexing UTF-16 offsets
This is needed because cocoa will report ranges as UTF-16 indices.
2022-07-21 09:40:48 +02:00
Max Brunsfeld 3fef7a5e76 Ensure that fs watches are dropped when dropping the event stream 2022-07-18 14:55:24 -07:00
Antonio Scandurra e821602406 Avoid unnecessarily emitting fake fs events for dirs that exist 2022-07-18 17:36:40 +02:00
Antonio Scandurra 6968a0a959 Detect cycles also when processing events 2022-07-18 17:31:09 +02:00
Antonio Scandurra c0e9508002 Create intermediate directories in FakeFs::create_dir 2022-07-18 16:38:26 +02:00
Antonio Scandurra 53fc8c40a1 Detect cycles when scanning a directory 2022-07-18 13:47:15 +02:00
Max Brunsfeld 44cdc14c7a Start work on a test for a worktree with symlink cycles 2022-07-18 12:23:07 +02:00
Max Brunsfeld 747efac8d3 Restructure FakeFs to let it model symlinks
Instead of storing paths, model the FS more directly
as nodes
2022-07-18 12:23:07 +02:00
Antonio Scandurra 9de9d517fd Differentiate among tabs with the same name
This commit introduces a new, optional `Item::tab_description` method
that lets implementers define a description for the tab with a certain
`detail`. When two or more tabs match the same description, we will
increase the `detail` until tabs don't match anymore or increasing the
`detail` doesn't disambiguate tabs any further.

As soon as we find a valid `detail` that disambiguates tabs enough, we
will pass it to `Item::tab_content`. In `Editor`, this is implemented by
showing more and more of the path's suffix as `detail` is increased.
2022-07-14 11:54:11 +02:00
Max Brunsfeld fad4365565 Fix association of 'json' lsp language id with JSON language 2022-07-12 15:43:59 -07:00
Max Brunsfeld aee4f25a7a Rename LanguageSettings -> EditorSettings 2022-07-12 11:42:43 -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 ClaytonandAntonio Scandurra 2312266afa Rewrite test_managing_language_servers to add languages after buffers are open
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2022-07-12 10:25:11 +02:00
Isaac Clayton 99f67fde8c Rename LspAdapterTrait to LspAdapter and LspAdapter to CachedLspAdapter 2022-07-12 09:29:38 +02:00
Antonio Scandurra 985d005da4 Don't prompt guest to save when closing window after disconnection 2022-07-12 09:05:39 +02:00
Isaac Clayton 617068fe7c Fix minor issues in plugin and project raised during review 2022-07-11 16:40:12 +02:00
Isaac Clayton 030587e61b Restore main version of Project::symbols and convert to async 2022-07-11 16:22:58 +02:00
Isaac Clayton faacf63f39 Restore main version of Project::completions and convert to async 2022-07-11 15:55:07 +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
Isaac Clayton 49adbc124e Minor fixes found during review 2022-07-11 10:37:51 +02:00
Max Brunsfeld a71a78fc7f 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 ed31f9fe28 Run code action's commands if their edits are empty 2022-07-08 16:12:20 -07:00
Isaac Clayton ce8898acf1 Remove debug statements 2022-07-08 21:28:35 +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
Antonio Scandurra f2b8f45ac3 Include ignored files in fuzzy search when root entry is ignored 2022-07-08 11:54:45 +02:00
Antonio Scandurra 005bba6203 🎨 2022-07-08 11:42:59 +02:00
Antonio Scandurra b1b78dac12 Honor gitignores above worktree root 2022-07-08 11:19:46 +02:00
Antonio Scandurra a90bf45522 Use absolute paths to compute ignored status
This lays the groundwork for harvesting gitignores up above the
worktree.
2022-07-08 11:19:21 +02:00
Antonio Scandurra 355a214454 Make build_gitignore async 2022-07-08 08:50:21 +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 50db545b00 Fix most warnings 2022-07-07 16:19:49 +02:00
Isaac Clayton 69b1324a93 Further unpropogate async 2022-07-07 16:16:58 +02:00
Isaac Clayton 2d4bc1704b Switch LspAdapter to struct and revert some async/await 2022-07-07 16:12:10 +02:00
Isaac Clayton 9cf2253c88 use join_all to build partial symbols and completions asynchronously 2022-07-07 15:44:21 +02:00
Isaac Clayton 5f055cd352 Going to move LspAdapter from trait to struct 2022-07-07 15:44:21 +02:00
Isaac Clayton a74da62914 Uncommented previously commented sections 2022-07-07 15:44:18 +02:00