Keith Simmons
0a3ab68c09
Merge pull request #877 from zed-industries/misc-normal-commands
...
Add inclusive vs exclusive motions to vim mode
2022-04-22 14:25:56 -07:00
Nathan Sobo and Antonio Scandurra
73c0d58830
Apply cursor styles during paint
...
This makes the editor's cursor an IBeam and properly deals with nested cursor styles.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-04-22 10:54:18 -06:00
Antonio Scandurra
873e654e28
Merge pull request #887 from zed-industries/fix-typescript-rename
...
Use document highlights to prepare rename if LSP doesn't support it
2022-04-22 16:37:13 +02:00
Antonio Scandurra
e551cf0636
Use document highlights to prepare rename if LSP doesn't support it
2022-04-22 15:43:57 +02:00
Nathan Sobo
9a8cb43695
Delete selected text when deleting to beginning of line
2022-04-22 06:04:14 -06:00
Keith Simmons
8e7fcb3b05
Add inclusive vs exclusive motions to vim mode
2022-04-21 16:50:23 -07:00
Antonio Scandurra and Max Brunsfeld
6956f6199c
Always wrap lines that are wider than 512 em advances
...
We went with a more conservative upper bound so that the number of
characters (hopefully) never exceeds `MAX_LINE_LEN` (1024) when laying
out text.
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-04-21 19:29:37 +02:00
Antonio Scandurra
4beffbe00d
Always clear rename state when selections change
...
At some point during the implementation of rename, we added logic for
invalidating the rename state when the selection moved outside the original
rename range. After transitioning to displaying renames as a block decoration,
we don't need that anymore given that a new, temporary editor is used instead.
This commit removes that invalidation logic and always calls `Editor::take_rename`
when the editor selections change. Doing so also fixes a bug that was causing Zed
to hide the cursor when clicking on the editor to dismiss the rename.
2022-04-15 10:32:07 +02:00
Max Brunsfeld
d0089e79ef
Merge pull request #817 from zed-industries/dynamic-editor-highlights
...
Store accessors for editor highlight colors not colors themselves
2022-04-14 10:36:38 -07:00
Antonio Scandurra
4fb8fff645
Fix warning
2022-04-14 13:03:46 +02:00
Antonio Scandurra
33d3501d8c
Speed up WrapSnapshot::line_len using the indexed transforms
2022-04-14 13:01:29 +02:00
Antonio Scandurra
bd4271d466
Introduce TabMap::line_len
2022-04-14 12:55:33 +02:00
Keith Simmons
23737d988d
Store accessors for editor highlight colors not colors themselves
2022-04-13 15:30:57 -07:00
Keith Simmons
6d2be6e44d
rename NavigationData anchor and offset to cursor_anchor and cursor_offset
2022-04-13 14:53:47 -07:00
Keith Simmons
d9ec747d49
add comment explaining offsets
2022-04-13 13:30:07 -07:00
Keith Simmons
e9525e3875
Record scroll position in nav history
2022-04-13 12:30:33 -07:00
Max Brunsfeld and Nathan Sobo
476165f242
Allow dumping the project diagnostic view's state as JSON
...
Also, improve DebugElements action so that it shows the JSON in an editor.
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-04-11 19:51:46 -07:00
Max Brunsfeld
2d723723b8
Merge branch 'main' into cancel-buffer-search
2022-04-11 17:38:26 -07:00
Keith Simmons
9931a12de1
Handle editor cancel in pane in order to dismiss find toolbar
2022-04-11 15:11:23 -07:00
Max Brunsfeld
4fbd45fe00
Load workspace and editor key bindings from a JSON file
2022-04-10 11:18:08 -07:00
Max Brunsfeld
0908a8799c
Allow actions to be deserialized from JSON
...
Introduce separate macro for implementing 'internal' actions which
are not intended to be loaded from keymaps.
2022-04-08 15:47:51 -07:00
83095256dc
Convert some actions to use named fields
...
Co-authored-by: Nathan Sobo <nathan@zed.dev >
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-07 16:44:37 -07:00
0cf9925cb1
Restructure action macro to assign a namespace to every action
...
Also, allow arbitrary types to be used as Actions via the impl_actions macro
Co-authored-by: Nathan Sobo <nathan@zed.dev >
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-07 16:20:49 -07:00
Antonio Scandurra
4ab12722bf
Pass visible bounds to Element::dispatch_event
2022-04-07 15:10:09 +02:00
Antonio Scandurra
90c24e3fda
Merge pull request #745 from zed-industries/scroll-tabs
...
Allow pane tabs to be scrolled when they overflow
2022-04-07 09:48:54 +02:00
Max Brunsfeld
b00373f24c
Update breadcrumbs when multibuffers' excerpts change
2022-04-06 17:12:36 -07:00
Max Brunsfeld
0f94cd0eeb
Don't activate the next pane when opening excerpts
2022-04-06 15:46:11 -07:00
Keith Simmons and Max Brunsfeld
33a33439de
Use language specific tabsize in editor commands
...
Co-authored-by: Max Brunsfeld <max@zed.dev >
2022-04-06 15:10:29 -07:00
Keith Simmons
b6f15ecc50
Tab size is pulled properly from settings instead of hardcoded
2022-04-06 10:23:37 -07:00
Max Brunsfeld and Keith Simmons
dce66e6f9e
Move Settings to its own crate
...
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-06 10:23:33 -07:00
Max Brunsfeld and Keith Simmons
e7039c123d
Avoid maintaining indent size as state on buffers
...
Indent size is still hard-coded, but it's now controlled by the
editor and not the buffer.
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-06 10:22:29 -07:00
Nathan Sobo
4c4b516b19
Remove stray dbg! expressions
2022-04-05 20:02:45 -06:00
Keith Simmons and Nate Butler
ea707eac18
Move style source files to src and build to dist
...
Co-authored-by: Nate Butler <nate@zed.dev >
2022-04-04 14:43:13 -07:00
Antonio Scandurra
91a2fe2d5e
Merge pull request #687 from zed-industries/vim-word-and-line-movement
...
Add word and line movement in vim normal mode
2022-04-04 14:42:27 +02:00
Antonio Scandurra
16e476a4a8
Re-render breadcrumbs when buffer has been reparsed
2022-04-02 16:33:24 +02:00
Antonio Scandurra
f252da61a6
Show full path for file worktrees or when there is more than 1 worktree
2022-04-02 16:10:10 +02:00
Max Brunsfeld
a8a42e4b1f
Merge branch 'main' into prompt-on-close
2022-04-01 15:29:23 -07:00
Max Brunsfeld
c190735d28
Merge pull request #702 from zed-industries/typescript
...
Add support for JS/Typescript/TSX, allow language servers to support multiple languages
2022-04-01 15:24:58 -07:00
Max Brunsfeld
5add351d21
Handle LSP apply workspace edit request fully before responding
2022-04-01 11:59:21 -07:00
Antonio Scandurra
cc11f45a1a
Introduce workspace::Item::reload to manually trigger a reload
2022-04-01 14:02:49 +02:00
Antonio Scandurra
91c003ee59
Merge pull request #705 from zed-industries/breadcrumbs
...
Introduce breadcrumbs
2022-04-01 11:02:54 +02:00
Max Brunsfeld
df45c44872
Let fake and real LanguageServer access AsyncAppContext in handler callbacks
...
Also, reimplement FakeLanguageServer by wrapping LanguageServer, instead of
duplicating its functionality differently.
2022-03-31 21:57:00 -07:00
Max Brunsfeld
199d4d07f5
Merge branch 'main' into typescript
2022-03-30 14:44:07 -07:00
Max Brunsfeld
fa6e6fd8fe
Restructure fake language server setup
...
Replace FakeLanguageServerConfig with FakeLanguageServerAdapter
2022-03-29 17:55:57 -07:00
Keith Simmons
7cedb28a82
Properly dedup restarts of language servers
2022-03-29 17:46:39 -07:00
Keith Simmons
598d2433bf
Add restart-lsp keybinding
2022-03-29 17:24:23 -07:00
Antonio Scandurra
f75734351c
Introduce MultiBuffer::symbols_containing
2022-03-29 15:08:37 +02:00
Max Brunsfeld
c6b04f7797
Make language's language server config non-optional
2022-03-28 18:14:49 -07:00
Antonio Scandurra
87cb21b390
Avoid unnecessary clones when undoing/redoing selections
2022-03-28 17:47:14 +02:00
Antonio Scandurra
b905efe0c3
Merge branch 'main' into selection-history
2022-03-28 17:24:46 +02:00