Commit Graph
1594 Commits
Author SHA1 Message Date
Antonio Scandurra d34a8e2ea6 Start computing workspace configuration more dynamically 2023-03-16 10:46:55 +01:00
Joseph Lyons 5ad6cb8438 Sort language names case agnostically 2023-03-14 21:45:17 -04:00
Antonio Scandurra 28df591385 Allow waiting for language to be loaded in LanguageRegistry APIs 2023-03-10 12:17:47 +01:00
Antonio Scandurra 0f06a68593 Add randomized test to remove active selections from buffer 2023-03-09 07:47:05 +01:00
Antonio Scandurra 0c22ba5aa0 Clear selections on buffer only if they hadn't been cleared already 2023-03-08 17:04:01 +01:00
Max Brunsfeld 2ddcfd8011 Merge pull request #2234 from zed-industries/error-on-combined-injections-in-injections
Fix range relativization when combined injections occur inside of other injections
2023-03-03 11:58:13 -08:00
Max BrunsfeldandAntonio Scandurra 4781d70974 Fix range relativization when combined injections occur inside of other injections
For example, ERB template inside of a markdown code block

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-03-01 14:38:35 -08:00
Max Brunsfeld be1445076c Apply external command formatting if buffer has changed while computing it 2023-03-01 10:17:04 -08:00
Max Brunsfeld e80e801b44 Avoid calling edits_since in apply_diff 2023-02-28 21:52:00 -08:00
Max Brunsfeld c6362e8cf6 Add a setting for ensuring a single final newline on save 2023-02-28 21:52:00 -08:00
Max Brunsfeld e4dc2de782 Avoid finalizing transactions inside Buffer::apply_diff 2023-02-28 21:52:00 -08:00
Max Brunsfeld e0c9010104 Add setting for removing trailing whitespace on save 2023-02-28 21:52:00 -08:00
Max Brunsfeld 19dc1a1b1e Add APIs for stripping trailing whitespace from a buffer 2023-02-28 21:52:00 -08:00
Max Brunsfeld f517038f77 Add unit test for auto-closing quotation marks with overrides 2023-02-20 13:46:17 -08:00
Max Brunsfeld f52b56715e Add test that loads all bundled languages 2023-02-20 10:53:37 -08:00
Max Brunsfeld d6b369095f Restructure how bracket pairs are overridden to unify lists
This way, a bracket pair that is disabled in a given scope can still be skipped, if
it was auto-closed before that scope existed.
2023-02-20 10:53:37 -08:00
Max Brunsfeld 853c34fdfb Merge pull request #2187 from zed-industries/save-untitled-buffer-bugs
Fix newly-discovered bugs in saving untitled buffers
2023-02-20 10:05:58 -08:00
Max Brunsfeld 62b7fc6d0f Only send UpdateBufferFile messages for buffers whose files have changed
Send that message when saving a buffer as a new path.
2023-02-20 09:41:59 -08:00
Kay Simmons b2e8053742 Merge pull request #2186 from zed-industries/better-vim-matching-motion
Better vim matching motion
2023-02-17 22:10:28 -08:00
Kay Simmons 15cd99c013 Fix failing test 2023-02-17 22:00:39 -08:00
Max Brunsfeld 05e8e2f835 Move the save and save_as code paths close together 2023-02-17 17:21:48 -08:00
Kay Simmons 7e98fc9a86 fix bracket ranges failing test 2023-02-17 17:19:23 -08:00
Kay Simmons 327c58fdc3 fix vim percent motion to better match the docs and observed behavior 2023-02-17 14:55:19 -08:00
Max BrunsfeldandNathan Sobo 8656190d0b Respect UpdateBufferFile messages on guest buffers without file
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-02-17 12:38:04 -08:00
Max Brunsfeld d661d065c2 Merge pull request #2182 from zed-industries/faster-injections
Fix syntax-related performance problems on gigantic files
2023-02-16 12:52:13 -08:00
Kay Simmons 3e152b5d33 wip 2023-02-16 12:23:45 -08:00
Kay Simmons 6f1c04827f use more predictable rules for selecting which bracket to jump to and where 2023-02-15 14:04:16 -08:00
Antonio ScandurraandMax Brunsfeld 53d16a50a6 Limit BufferSnapshot::chunks to the outline item range
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-02-13 19:57:15 +01:00
Max Brunsfeld 278116bc25 Load languages lazily in the background 2023-01-25 17:47:46 -08:00
Max Brunsfeld 9934803399 Merge branch 'main' into markdown-fenced-blocks 2023-01-24 14:13:50 -08:00
Antonio Scandurra 1027bdf977 Merge branch 'main' into markdown-fenced-blocks 2023-01-24 15:43:35 +01:00
Antonio Scandurra ae95a0188e Reparse unknown injection ranges in buffer when adding a new language 2023-01-24 15:29:59 +01:00
Antonio Scandurra cdb95382ec WIP: Start on SyntaxMapSnapshot::unknown_injection_languages 2023-01-24 12:55:49 +01:00
Antonio Scandurra 309d76c932 Store syntax layers even if a language for the injection can't be found 2023-01-24 12:25:12 +01:00
Nathan Sobo 3826d9257e Document Buffer::reparse 2023-01-23 21:51:10 -07:00
Mikayla Maki fc7532d74d Added complete scripts for generating third party license files 2023-01-23 12:47:12 -08:00
Antonio ScandurraandMax Brunsfeld d1bb98c27b Ensure injection layer is recomputed when language changes
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-01-23 19:02:06 +01:00
Antonio Scandurra 4157175324 WIP: Add test for dynamic language injection 2023-01-23 09:45:36 +01:00
Antonio Scandurra 53db679c84 WIP: Search language injections also by file extension
There are still a few things left:

1. Add test to verify we can successfully locate a language by its extension
2. Add test to reproduce bug where changing the fenced code block language
   won't reparse the block with the new language
3. Reparse injections for which we couldn't find a language when the language
   registry changes.
4. Check why the markdown grammar considers the trailing triple backtick as
   `(code_block_content)`, as opposed to being part of the outer markdown.
2023-01-23 08:56:41 +01:00
Antonio Scandurra e8eb69d10e Avoid allocating a string to compare language names 2023-01-23 08:56:41 +01:00
Antonio Scandurra 366000e263 Rename LanguageRegistry::get_language to language_for_name 2023-01-23 08:56:41 +01:00
Max Brunsfeld 71b684108d Add test for avoiding indent adjustment inside newly-created errors 2023-01-20 17:02:38 -08:00
Max Brunsfeld fdd0542498 Avoid adjusting indentation of lines inside newly-created errors 2023-01-20 15:56:45 -08:00
Max BrunsfeldandJulia Risley 21cc5ebbcf Drop 'override.' prefix from capture names in override query
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-20 10:44:33 -08:00
Max BrunsfeldandJulia Risley 2c5bb8ff1b Add overrides for all languages
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-20 10:39:31 -08:00
Max BrunsfeldandJulia Risley b3dc191963 Implement scope-specific bracket matching and comment toggling
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-19 15:04:27 -08:00
Max BrunsfeldandJulia Risley 786ff5ab05 Start work on language config overrides
Co-authored-by: Julia Risley <julia@zed.dev>
2023-01-19 12:32:08 -08:00
Antonio Scandurra 89ccd53f33 Merge branch 'main' into optimize-large-multi-buffers 2023-01-19 16:18:21 +01:00
Max Brunsfeld 30863cf803 Prevent outline items from accidentally spanning multiple lines 2023-01-18 16:43:18 -08:00
Antonio ScandurraandPetros Amoiridis 28e547e774 WIP: Avoid converting RopeFingerprint into a string
Co-Authored-By: Petros Amoiridis <petros@zed.dev>
2023-01-18 12:22:08 +01:00