A Community-led Hyper-Hackable Text Editor
Go to file
Andrew Dupont 6de4da995b Optimizations for indents and folds
Spent a lot of time on indents today. Now that `nvim-treesitter` has renamed their indent captures, I figured I should switch to a system whose names made more sense to me.

`@indent_end` and `@branch` were too similar to keep as separate things, and have been consolidated into `@dedent`.

This system is pretty easy to write queries for, but it's awfully hard to _explain_, so I wonder if I have to go back to the drawing board here. I was convinced of its theoretical elegance, but then found a situation where I needed a different sort of capture, so I also invented `@dedent.next`. So now I'm not so sure.

Folds also got a look because they really did need some optimization. When we perform a transaction in the editor, we invalidate the folds cache, and since we know we'll end up querying against each of those lines individually, we can pre-capture each range with a folds query and save some time.

The worst thing about indents is the prospect of needing to re-parse the tree separate from the ordinary update process, since the editor calls `suggestedIndentForBufferRow` before the editor transaction finishes. It's not a bottleneck yet, but it could be if a given tree-sitter grammar were particularly slow. We can at least re-use the same tree when one of the `suggestedIndent` methods calls another.
2023-03-24 23:01:59 -07:00
.github Missing setup node? 2023-02-22 12:01:56 -03:00
docs GH Action Documentation 2023-02-02 04:23:50 +00:00
dot-atom rebrand and relinking to new site 2022-12-31 20:07:22 +00:00
exports Reformat all JS files using prettier 2019-05-31 18:33:56 +02:00
hooks Replace incorrect spellings of 'macOS' with the correct one 2023-01-19 18:54:05 +01:00
integration Disabled package specs for now 2022-11-20 23:08:19 -03:00
keymaps [keymaps] Rename A[a]tom -> P[p]ulsar 2022-08-17 01:22:11 -03:00
menus Remove "Run Benchmarks" menu item 2022-11-01 17:06:10 -07:00
packages Optimizations for indents and folds 2023-03-24 23:01:59 -07:00
ppm@a46537c0b7 git pull origin master 2023-02-14 20:43:22 -08:00
resources Merge pull request #372 from mdibella-dev/add-new-macos-icon 2023-02-12 01:19:25 -08:00
script implement signing (monterey, xcode 14) 2023-02-15 17:57:27 -08:00
spec Add TypeScript and TSX grammars 2023-03-23 17:33:25 -07:00
src Optimizations for indents and folds 2023-03-24 23:01:59 -07:00
static add default selected text style 2022-12-16 07:45:45 +00:00
vendor Allow a non-match for scope :) 2023-03-11 00:17:50 -03:00
.cirrus.yml implement signing (monterey, xcode 14) 2023-02-15 17:57:27 -08:00
.codacy.yaml File Glob not having the effect expected 2022-11-20 22:32:37 -08:00
.eslintrc.js I am in hell 2023-03-03 11:02:32 -08:00
.gitattributes removed unused snippets 2022-11-10 09:00:10 +01:00
.gitignore add binaries to gitignore 2022-11-13 10:55:09 +02:00
.gitmodules Update submodule to use the public URL 2022-09-07 18:54:44 -03:00
.nvmrc bump .nvmrc to 16 2022-09-26 01:02:20 +01:00
CHANGELOG.md Merge branch 'changelog-updates' of https://github.com/pulsar-edit/pulsar into changelog-updates 2023-02-15 19:07:27 -08:00
CODE_OF_CONDUCT.md 📝 Update Contributing.md (#20707) 2021-01-19 06:34:39 +03:00
CONTRIBUTING.md use init.js by default 2022-11-03 14:15:11 +01:00
Dockerfile rename Atom to Pulsar in Dockerfile 2022-12-13 19:33:04 +00:00
LICENSE.md update copyright year (2023) 2023-01-16 20:12:46 -06:00
package.json Merge remote-tracking branch 'origin/master' into feature/modernize-tree-sitter 2023-02-16 17:57:01 -03:00
playwright.config.ts Packages test 2022-11-19 01:04:18 -03:00
pnpm-workspace.yaml chore: sync with the repository template 2021-07-21 17:59:40 -05:00
PULL_REQUEST_TEMPLATE.md Apply suggestions from code review 2019-06-14 09:21:07 -07:00
pulsar.sh Foregrounding also package 2022-12-27 12:32:37 -03:00
README.md Update README.md 2022-12-15 00:15:57 -08:00
SUPPORT.md SUPPORT.md add developer documentation, and a minor update (#430) 2022-07-05 19:03:49 -07:00
yarn.lock Lockfile update 2023-03-09 11:09:21 -03:00


Badge Discussions Badge Discord Badge Reddit

Badge Status Badge License


Pulsar


Button Install Button Documentation Button Build

Badge Codacy Badge Crowdin Badge OpenCollective


A Community-led Hyper-Hackable Text Editor, built on Electron,
and based on everything we love about our favorite editors.

We designed it to be deeply customizable, but still
approachable using the default configuration.



Preview