Commit Graph

1504 Commits

Author SHA1 Message Date
confused-Techie
9afc0948c1 Add new changelog 2024-05-15 19:18:38 -07:00
Andrew Dupont
217313b911
Merge pull request #984 from savetheclocktower/markdown-preview-performance
[markdown-preview] Optimize re-rendering of content in a preview pane…
2024-05-14 20:23:38 -07:00
Andrew Dupont
678c1b7bd7
Address feedback
Co-authored-by: Maurício Szabo <mauricioszabo@users.noreply.github.com>
2024-05-14 18:37:24 -07:00
Andrew Dupont
5024f052e0
Merge pull request #974 from savetheclocktower/tree-sitter-may
Tree-sitter rolling fixes, 1.117 edition
2024-05-13 22:53:46 -07:00
confused_techie
93ff819122
Update packages/README.md
Co-authored-by: DeeDeeG <DeeDeeG@users.noreply.github.com>
2024-05-07 07:40:39 -07:00
confused_techie
b2eff87510
Update packages/README.md
Co-authored-by: DeeDeeG <DeeDeeG@users.noreply.github.com>
2024-05-07 07:40:33 -07:00
Andrew Dupont
4ff4a8bd42 [language-sass] Bump tree-sitter-scss to fix a bug 2024-05-06 17:11:41 -07:00
Andrew Dupont
74589feb9c Remove the loading indicator when there's a rendering error 2024-05-05 23:30:29 -07:00
Andrew Dupont
054100b43c Rework loading indicator for markdown-preview
…and make the pane appear earlier on first open.
2024-05-05 23:30:29 -07:00
Andrew Dupont
b46a7e8e86 Don't make TextEditor instances render synchronously…
…because we don't need it for our use case. Helps performance.
2024-05-05 23:30:29 -07:00
Andrew Dupont
62a35bccad Optimize re-rendering of content in a preview pane…
…especially syntax highlighting.

This change brings in `morphdom` to allow us to be more efficient about how we apply the changes needed when the Markdown source re-renders. Instead of replacing all the content with every single change, we apply only the selective edits needed to adapt our existing markup to the target markup.

Once this process is done, we introduce one `TextEditor` instance for each `pre` tag in the markup, then persist those editor elements in the rendered output so that we don't have to spend so much time creating and destroying editors. This is a _huge_ performance win, especially in documents with lots of code blocks. The editor instances are cached using the `pre` elements as keys, which is now possible because the `pre` elements themselves are preserved across re-renders.

Editors are created when new `pre` elements appear, and are destroyed when they are no longer needed, change their contents whenever the contents of the `pre` changes, and change language modes whenever the code fence language identifier changes.

This approach is now used no matter which Markdown renderer is employed; we manage syntax highlighting ourselves in all cases rather than letting `atom.ui.markdown` do it.
2024-05-05 23:30:29 -07:00
Andrew Dupont
8e9e05db44 [language-typescript] More highlighting fixes, especially for operators 2024-05-05 22:45:41 -07:00
Andrew Dupont
3d70f62953 [language-gfm] Make each block-level HTML tag its own injection…
…which, surprising as it sounds, has a _huge_ performance benefit.
2024-05-05 22:45:41 -07:00
Andrew Dupont
6d36685df3 [language-ruby] Update to latest Tree-sitter Ruby parser 2024-05-05 22:45:41 -07:00
Andrew Dupont
5472e32e21 [language-sass] Force the TextMate grammar when running SassDoc specs 2024-05-05 22:45:41 -07:00
Andrew Dupont
da1912d1a7 [language-sass] Add SCSS Tree-sitter grammar 2024-05-05 22:45:41 -07:00
confused-Techie
15dd4f29c0 Update packages info 2024-04-28 13:22:01 -07:00
confused-Techie
4f02ca3b71 Bundle snippets 2024-04-28 13:16:43 -07:00
Andrew Dupont
b1b6883c57
Merge pull request #973 from savetheclocktower/regenerate-github-css
[markdown-preview] Add dark mode for GitHub-style preview
2024-04-20 11:35:14 -07:00
confused-Techie
9f0e8a2c8a Stop detecting .org files as language-clojure 2024-04-17 19:29:57 -07:00
confused-Techie
2636f1e982 Add #935 2024-04-15 16:55:14 -07:00
confused-Techie
0c73a6cc84 Add 1.116.0 Changelog entries 2024-04-15 16:44:19 -07:00
Andrew Dupont
8b4fbbd23c Remove primer-markdown.less 2024-04-14 14:45:42 -07:00
Andrew Dupont
41d891582b
Merge pull request #968 from savetheclocktower/tree-sitter-april
Tree-sitter fixes (1.116 edition)
2024-04-14 13:19:42 -07:00
Andrew Dupont
2369395ba2 [markdown-preview] Add specs for GitHub light/dark themes 2024-04-14 12:58:52 -07:00
Andrew Dupont
596a3cd798 [markdown-preview] Add dark mode GitHub styles for Markdown…
…and the ability to choose a specific theme via a config setting (or use the system default).
2024-04-14 12:58:52 -07:00
Andrew Dupont
5d6af88dd7 [language-python] Fix highlighting of some constructors 2024-04-11 20:39:26 -07:00
Andrew Dupont
03af1244d3 [language-python] Prevent type annotations from hinting at indents 2024-04-11 17:53:25 -07:00
Andrew Dupont
035595d1c2 Add TextEditor specs for new getCommentDelimitersForPosition 2024-04-06 16:36:13 -07:00
Andrew Dupont
b9ee65f6a3 Add extensive comment delimiter metadata to most built-in grammars 2024-04-06 13:00:55 -07:00
DeeDeeG
ace4180d9f
Merge pull request #957 from pulsar-edit/rework-windows-path-modification
[core] (Windows) Remove all `Machine` PATH handling, add safety mechanisms
2024-04-06 15:41:43 -04:00
Andrew Dupont
bf62b01757 [language-typescript] Fix scopes on type annotations…
…so they don’t also apply to namespaced TSX tags.
2024-04-05 10:05:33 -07:00
Andrew Dupont
93ed91716b [language-typescript] Change scopes for template string punctuation…
…to match the names we use in JavaScript.
2024-04-04 17:20:20 -07:00
Andrew Dupont
cc42807574 [language-typescript] Add scope names to namespaced events…
…and a `meta` scope to every type annotation.
2024-04-04 17:18:18 -07:00
Andrew Dupont
27ee8b3edf [language-gfm] Fix name of modern grammar for Markdown 2024-04-04 15:59:52 -07:00
Andrew Dupont
ca0b1d7bb1 [language-typescript] Improve highlighting of TSX fragments 2024-04-03 23:41:58 -07:00
Andrew Dupont
22b27afd32 [language-(java|type)script] Highlight wildcard export specifiers…
…like `export * from 'foo'`.
2024-04-03 23:32:48 -07:00
Andrew Dupont
9583449e57 [language-gfm] Replace the modern Tree-sitter GFM grammar…
…with one based on a better parser.

The `ikatyang` parser is great… until multi-byte input comes into play, or some other construct it doesn't understand. It doesn't have any way to recover when it hits those cases; it just throws exceptions, and WASM can't catch them.

The `MDeiml` parser for Markdown had one deal-breaking issue (https://github.com/tree-sitter-grammars/tree-sitter-markdown/issues/92), and once that got solved, it emerged as the clear victor.

Several people have been using this grammar as `language-markdown-alpha` on the repository, and none of them have encountered any problems of the sort they did with the `ikatyang` parser.
2024-04-03 23:16:25 -07:00
Andrew Dupont
a8fb526fa2 [language-bash] Fix injectionRegex for bash grammar 2024-04-03 22:59:16 -07:00
confused-Techie
eda5443bda Ensure script can launch, override path values on logging, add reboot warning 2024-03-25 16:58:06 -07:00
DeeDeeG
d3853eee34 changelog: Adjust/add changelog entry for PR 956 2024-03-22 20:16:06 -04:00
confused_techie
657026a11e 1.115.0 Changelog Entries 2024-03-22 07:22:08 -07:00
Andrew Dupont
15b3a49703 [language-hyperlink] Allow includeChildren option…
…when defining hyperlink injection.
2024-03-21 16:02:51 -07:00
Andrew Dupont
4c5ef99281 [language-typescript] Add highlighting for regular expressions
(Apologies for this oversight.)
2024-03-21 16:01:32 -07:00
Maurício Szabo
ab2df0ebf1
Merge branch 'master' into tree-sitter-ruby-folds 2024-03-21 19:49:02 -03:00
Andrew Dupont
1481d392bd
Merge pull request #941 from savetheclocktower/tree-sitter-march
Tree-sitter rolling fixes: 1.115 edition
2024-03-19 18:56:08 -07:00
Andrew Dupont
6fe8e5377a Address feedback 2024-03-19 18:55:31 -07:00
confused-Techie
90d71d0391 Remove all Machine handling of path modification, ensure to safely modify path 2024-03-17 23:54:48 -07:00
Andrew Dupont
a294c88a47 [language-c] C/C++ highlighting fixes…
* GOTO labels
* Members like `foo.bar`
* Marking of constants in C++
2024-03-17 20:49:17 -07:00
Maurício Szabo
0e8a54fdaf Symbol and string arrays folds for Ruby 2024-03-16 02:27:44 -03:00