Max Brunsfeld
263e3d8176
Start work on interpreting 'label/insertText' completions
...
These completions don't supply a range that should be overwritten, so
the client needs to infer it via substring matching.
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-03-30 17:47:25 -07:00
Max Brunsfeld
c280c85ce7
Hard-code LSP formatting options for now
...
This is needed for auto-formatting to work properly in TypeScript and JSON
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-30 17:08:40 -07:00
Max Brunsfeld
cf9efd7005
Improve installation of npm-based language servers
...
* Use --prefix flag to guarantee that they are installed in .zed
* Use the @latest tag when available
* Extract helper functions
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-03-30 16:48:59 -07:00
Max Brunsfeld
4805cfe48c
Merge branch 'main' into typescript
2022-03-30 14:44:07 -07:00
Max Brunsfeld
cfa0269b1b
Merge pull request #701 from zed-industries/restart-lsp
...
Add restart-lsp keybinding
2022-03-30 13:59:04 -07:00
Keith Simmons
0dce371b3e
Add assert_set_eq macro to make test clearer
...
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-30 13:53:38 -07:00
Keith Simmons
32d2e5952c
Test language server restart works as expected
...
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-30 13:08:36 -07:00
Max Brunsfeld
45ad5f343f
Parse JS as TSX
2022-03-29 18:26:58 -07:00
Max Brunsfeld
3b4cab9094
Move all configuration of individual LSP servers to LspAdapter
2022-03-29 18:14:30 -07:00
Max Brunsfeld
ebc711f9f5
Restructure fake language server setup
...
Replace FakeLanguageServerConfig with FakeLanguageServerAdapter
2022-03-29 17:55:57 -07:00
Keith Simmons
ec57c1f4ac
Properly dedup restarts of language servers
2022-03-29 17:46:39 -07:00
Keith Simmons
6d91fd078c
Add restart-lsp keybinding
2022-03-29 17:24:23 -07:00
Max Brunsfeld
158d987965
Start work on allowing language servers to support multiple languages
2022-03-29 16:57:18 -07:00
Keith Simmons
0e1d371a67
Add typescript language server
...
Currently not tested for tsx files
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-29 13:42:21 -07:00
Max Brunsfeld
d466768eed
WIP
2022-03-29 11:06:08 -07:00
Max Brunsfeld
dd1c88afa5
Add basic TypeScript and TSX support
...
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-29 10:42:46 -07:00
Max Brunsfeld
a8600e76a3
Make language's language server config non-optional
2022-03-28 18:14:49 -07:00
Max Brunsfeld
4d456d3847
Remove duplication in build_language_registry
2022-03-28 18:01:29 -07:00
Antonio Scandurra
cc9843c90e
Merge pull request #692 from zed-industries/selection-history
...
Allow undoing and redoing selections via `cmd-u` and `cmd-shift-u`
2022-03-28 17:55:09 +02:00
Antonio Scandurra
f274a6ab4f
Avoid unnecessary clones when undoing/redoing selections
2022-03-28 17:47:14 +02:00
Antonio Scandurra
5ef6337b09
Merge branch 'main' into selection-history
2022-03-28 17:24:46 +02:00
Antonio Scandurra
aec82ef71e
Test selection history
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-28 17:20:52 +02:00
Antonio Scandurra
45ecd8e0a6
Always use square brackets in marked_text_ranges
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-28 17:11:35 +02:00
Antonio Scandurra
686085dd60
Merge pull request #690 from zed-industries/indent-keybindings
...
Bind `Outdent` and `Indent` respectively to `cmd-[` and `cmd-]`
2022-03-28 16:50:23 +02:00
Antonio Scandurra
bbfb63ff89
Cap selection history to 1024 entries
2022-03-28 16:37:48 +02:00
Antonio Scandurra
2a1fed1387
Insert tabs instead of indenting only when all selections are empty
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-28 16:36:12 +02:00
Antonio Scandurra
0cd356ce06
Merge pull request #689 from zed-industries/format-timeout
...
Skip formatting during save if it takes too long
2022-03-28 16:17:56 +02:00
Antonio Scandurra
aa3e2ef4a4
Merge pull request #691 from zed-industries/snap-icons-to-pixel-grid
...
Snap icon sprites to pixel grid
2022-03-28 16:16:06 +02:00
Antonio Scandurra
73c2f52158
Implement cmd-u
and cmd-shift-u
to undo and redo selections
2022-03-28 16:05:44 +02:00
Antonio Scandurra
4ed0607e1e
Extract SelectionHistory
in preparation to store an undo/redo stack
2022-03-28 14:52:54 +02:00
Antonio Scandurra
3cfa2c65b3
Autoscroll to newest cursor on cmd-d instead of fitting all selections
2022-03-28 14:38:51 +02:00
Antonio Scandurra
f69bd0e327
Snap icon sprites to pixel grid
...
This should resolve some rendering artifacts potentially caused by
floating point errors when sampling the texture. It should also lead
to crisper images when icons are rendered midway through a pixel.
2022-03-28 11:52:13 +02:00
Antonio Scandurra
ac88003c19
Bind Outdent
and Indent
respectively to cmd-[
and cmd-]
2022-03-28 11:34:46 +02:00
Antonio Scandurra
a2c4205c5c
Make indent and outdent explicit actions and unify tab
bing logic
2022-03-28 11:34:38 +02:00
Antonio Scandurra
03752f913d
Fix warnings
2022-03-28 11:05:55 +02:00
Antonio Scandurra
2c78c830eb
Skip formatting during save if it takes too long
2022-03-28 11:02:20 +02:00
Antonio Scandurra
26aa138429
Fire fake timers waking up at the same time as the current clock
2022-03-28 10:57:52 +02:00
Antonio Scandurra
cbd266052d
Allow returning futures in fake language server request handlers
2022-03-28 10:44:32 +02:00
Nathan Sobo
3ae5fc74c9
Merge pull request #686 from zed-industries/disable-vim-on-start
...
Fully disable vim mode on start unless it's enabled
2022-03-26 19:23:46 -06:00
Nathan Sobo
c6ad667d49
Assign normal mode when re-enabling
2022-03-26 19:19:12 -06:00
Nathan Sobo
daf999c3be
Fully disable vim mode on start unless it's enabled
...
Also: Make some structural adjustments to remove the need for defer. Instead of accessing the global in associated VimState functions, have a single method that allows us to call update instance methods.
2022-03-26 19:19:12 -06:00
Nathan Sobo
30e31f6561
Test that vim mode can be disabled on startup
2022-03-26 19:19:12 -06:00
Nathan Sobo
2837125098
0.23.0
2022-03-26 07:22:01 -06:00
Nathan Sobo
fe1f857e84
Merge pull request #684 from zed-industries/subword
...
Add bindings for subword movement and deletion
2022-03-26 07:18:29 -06:00
Nathan Sobo
d4436277ee
Merge pull request #682 from zed-industries/vim-hjkl
...
Vim hjkl
2022-03-26 07:11:46 -06:00
Nathan Sobo
2dc76a2b58
Add bindings for subword movement and deletion
2022-03-26 07:10:16 -06:00
Keith Simmons
1a29180185
Fixed issue with enabling and disabling vim mode dynamically
...
Also added indoc and marked text utility to vim tests to improve readability
2022-03-25 20:10:52 -07:00
Keith Simmons
0aaf270650
Add clip_to_line_end to display_map/snapshot and set it to ensure vim positioning in normal mode
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-25 20:10:52 -07:00
Keith Simmons
bb9b36dccd
Add initial vim mode mode switching
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-25 20:10:37 -07:00
Nathan Sobo
d74221829c
Merge pull request #680 from zed-industries/unregister-on-disconnect
...
Properly clear out registration and sharing state when a host loses their connection
2022-03-25 11:52:25 -06:00