Skip to content

Commit

Permalink
Merge branch 'pulsar-edit:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
asiloisad authored Dec 19, 2024
2 parents 1eb6491 + a5fccfc commit 506ed55
Show file tree
Hide file tree
Showing 24 changed files with 730 additions and 121 deletions.
6 changes: 3 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
env:
PYTHON_VERSION: 3.12
GITHUB_TOKEN: ENCRYPTED[!06df1c93af902fc78fbd143724c5d11733607c6e743665859073de9aa2a317a5ac67b302f5ed92b232f6d28fae602e92!]
GITHUB_TOKEN: ENCRYPTED[!587e64c0e1412de985721fd9a82605b5b359a3565854235f9b092824dd50c847e5ed3fcf34acf5ead8b2707cd50ec895!]
# The above token, is a GitHub API Token, that allows us to download RipGrep without concern of API limits

# linux_task:
Expand Down Expand Up @@ -63,7 +63,7 @@ arm_linux_task:
memory: 8G
env:
USE_SYSTEM_FPM: 'true'
ROLLING_UPLOAD_TOKEN: ENCRYPTED[50debc954fd1b46513fa44d6270491edaba4c9c0ab6fbf0a3fb8e3bdfe9e380d203bd90857ae720b5af31d8a02c6389f]
ROLLING_UPLOAD_TOKEN: ENCRYPTED[bc554e7208b73b37e2b776c70905b142a5023cea4a9b89e1370b8815adea18f8436e8b075e6cf1bcb62133d659b5d198]
prepare_script:
- apt-get update
- export DEBIAN_FRONTEND="noninteractive"
Expand Down Expand Up @@ -135,7 +135,7 @@ silicon_mac_task:
APPLEID: ENCRYPTED[549ce052bd5666dba5245f4180bf93b74ed206fe5e6e7c8f67a8596d3767c1f682b84e347b326ac318c62a07c8844a57]
APPLEID_PASSWORD: ENCRYPTED[774c3307fd3b62660ecf5beb8537a24498c76e8d90d7f28e5bc816742fd8954a34ffed13f9aa2d1faf66ce08b4496e6f]
TEAM_ID: ENCRYPTED[11f3fedfbaf4aff1859bf6c105f0437ace23d84f5420a2c1cea884fbfa43b115b7834a463516d50cb276d4c4d9128b49]
ROLLING_UPLOAD_TOKEN: ENCRYPTED[50debc954fd1b46513fa44d6270491edaba4c9c0ab6fbf0a3fb8e3bdfe9e380d203bd90857ae720b5af31d8a02c6389f]
ROLLING_UPLOAD_TOKEN: ENCRYPTED[bc554e7208b73b37e2b776c70905b142a5023cea4a9b89e1370b8815adea18f8436e8b075e6cf1bcb62133d659b5d198]
prepare_script:
- brew update
- brew uninstall node@20
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ jobs:
needs: build

steps:
- name: Install build dependencies - Linux
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get update && sudo apt-get install -y git python3 python3-pip make gcc g++ libx11-dev libxkbfile-dev pkg-config libsecret-1-dev rpm xvfb ffmpeg zstd wget squashfs-tools

- name: Checkout the latest code
uses: actions/checkout@v4

Expand Down
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,45 @@

## [Unreleased]

## 1.124.0

- Enhanced spellcheck to allow spellchecking on sections of a buffer. Making it possible to spellcheck comments within code, which has been enabled by default.
- Tree-sitter fixes and enhancements for `language-c`.
- Updated error message received when deleting a file in Linux to be more accurate.
- Fixed error that could cause some keymaps to not appear under a package in `settings-view`.

### Pulsar

- CI: Add build dependencies for Linux 'test bins' job [@DeeDeeG](https://github.com/pulsar-edit/pulsar/pull/1165)
- Tree-sitter rolling fixes, 1.124 edition [@savetheclocktower](https://github.com/pulsar-edit/pulsar/pull/1148)
- Fix Linux trash error message [@mauricioszabo](https://github.com/pulsar-edit/pulsar/pull/1151)
- electron-builder: Don't create differential update blockmaps [@DeeDeeG](https://github.com/pulsar-edit/pulsar/pull/1139)
- CI: Update Cirrus Rolling release upload token [@DeeDeeG](https://github.com/pulsar-edit/pulsar/pull/1141)

#### spell-check

- [spell-check] Allow the user to whitelist sections of a buffer for spellchecking on a per-language basis. [@savetheclocktower](https://github.com/pulsar-edit/pulsar/pull/1147)

#### settings-view

- [settings-view] Fix Package keymap compatibility check [@confused-Techie](https://github.com/pulsar-edit/pulsar/pull/1161)

## 1.123.0

- Fixed SQL State Storage not loading when starting Pulsar from a self-contained binary like appImage, tar.gz, etc.
- [symbols-view] Allow project-wide symbol search to consider results from more than one provider.
- Tree-sitter fixes and enhancements for hyperlinks, C, and shell scripts.
- Restore use of `shell.moveItemToTrash` API in tree-view, for Electron 12 compatibility.

### Pulsar

- Tree-sitter rolling fixes, 1.123 edition [@savetheclocktower](https://github.com/pulsar-edit/pulsar/pull/1118)
- [symbols-view] Allow project-wide symbol searches to consider multiple providers [@savetheclocktower](github.com/pulsar-edit/pulsar/pull/1133)
- electron-builder: Fix race condition when preparing to copy binaries [@DeeDeeG](https://github.com/pulsar-edit/pulsar/pull/1137)
- [ci] Update GitHub Token in CirrusCI config [@confused-Techie](https://github.com/pulsar-edit/pulsar/pull/1134)
- Fixing requiring of better-sqlite3 [@mauricioszabo](github.com/pulsar-edit/pulsar/pull/1122)
- Revert removal of `shell.moveItemToTrash` [@savetheclocktower](https://github.com/pulsar-edit/pulsar/pull/1125)
- CI: Bump macOS runner images from macos-12 to macos-13 [@DeeDeeG](https://github.com/pulsar-edit/pulsar/pull/1120)

## 1.122.0

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pulsar",
"author": "Pulsar-Edit <admin@pulsar-edit.dev>",
"productName": "Pulsar",
"version": "1.122.0-dev",
"version": "1.124.0-dev",
"description": "A Community-led Hyper-Hackable Text Editor",
"branding": {
"id": "pulsar",
Expand Down Expand Up @@ -311,4 +311,4 @@
"random-seed": "0.3.0",
"webdriverio": "7.20.9"
}
}
}
15 changes: 10 additions & 5 deletions packages/language-c/grammars/tree-sitter-cpp/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,23 @@
; VARIABLES
; =========

; The "x" in `FSEvent& x`;
(reference_declarator
[(identifier) (field_identifier)] @variable.other.declaration._LANG_
(#is? test.descendantOfType "declaration field_declaration"))


; Function parameters
; -------------------

; Common naming idiom for C++ instanced vars: "fMemberName"
; ((identifier) @variable.other.readwrite.member.cpp
; (#match? @variable.other.readwrite.member.cpp "^(f|m)[A-Z]\\w*$"))

; The "foo" in `int &foo` with in a parameter list.
(parameter_declaration
declarator: (reference_declarator
(identifier) @variable.parameter.cpp))

; The "foo" in `const char *foo` within a parameter list.
; (Should work no matter how many pointers deep we are.)
(reference_declarator (identifier) @variable.parameter.cpp
(#is? test.descendantOfType "parameter_declaration"))

; KEYWORDS
; ========
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ parser: 'tree-sitter-hyperlink'

injectionRegex: 'hyperlink'
treeSitter:
parserSource: 'github:savetheclocktower/tree-sitter-hyperlink#04c3a667ba432236578ac99bbacd0412f88d6fac'
parserSource: 'github:savetheclocktower/tree-sitter-hyperlink#0704b3e5a72892495dd13b85a5064582414cb39a'
grammar: 'ts/tree-sitter-hyperlink.wasm'
highlightsQuery: 'ts/highlights.scm'
Binary file modified packages/language-hyperlink/grammars/ts/tree-sitter-hyperlink.wasm
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,15 @@
(binary_expression ["&&" "||"] @keyword.operator.logical.shell)

(pipeline "|" @keyword.operator.pipe.shell)
(expansion operator: "#" @keyword.operator.expansion.shell)

; Any expansion operator, including all `#`s and `%`s in the following examples:
;
; foo="${bar#*.}"
; foo="${bar##*.}"
; foo="${bar%*.}"
; foo="${bar%%*.}"
;
(expansion operator: _ @keyword.operator.expansion.shell)


; "*" @keyword.operator.glob.shell
Expand Down
12 changes: 9 additions & 3 deletions packages/settings-view/lib/package-keymap-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import KeybindingsPanel from './keybindings-panel'
export default class PackageKeymapView {
constructor (pack) {
this.pack = pack
this.otherPlatformPattern = new RegExp(`\\.platform-(?!${_.escapeRegExp(process.platform)}\\b)`)
this.namespace = this.pack.name
this.disposables = new CompositeDisposable()
etch.initialize(this)
Expand Down Expand Up @@ -128,8 +127,8 @@ export default class PackageKeymapView {
continue
}

if (this.otherPlatformPattern.test(selector)) {
continue
if (!this.selectorIsCompatibleWithPlatform(selector)) {
continue;
}

const keyBindingRow = document.createElement('tr')
Expand Down Expand Up @@ -183,4 +182,11 @@ export default class PackageKeymapView {

atom.clipboard.write(content)
}

selectorIsCompatibleWithPlatform(selector, platform = process.platform) {
const otherPlatformPattern = new RegExp(`\\.platform-(?!${_.escapeRegExp(platform)}\\b)`);
const currentPlatformPattern = new RegExp(`\\.platform-(${_.escapeRegExp(platform)}\\b)`);

return !(otherPlatformPattern.test(selector) && !currentPlatformPattern.test(selector));
}
}
35 changes: 35 additions & 0 deletions packages/settings-view/spec/package-keymap-view-spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

const PackageKeymapView = require("../lib/package-keymap-view.js");
let view;

describe("PackageKeymapView", () => {

beforeEach(() => {
// Just prevent this stuff from calling through, it doesn't matter for this test
spyOn(atom.packages, "getLoadedPackage").andReturn({ keymaps: [] });

view = new PackageKeymapView({
name: "test-package"
});
});

it("should say a selector with no platform listed is compatible with the current one", () => {
expect(view.selectorIsCompatibleWithPlatform("atom-text-editor", "win32")).toBe(true);
});

it("should say a selector with a platform other than the current is not compatible", () => {
expect(view.selectorIsCompatibleWithPlatform(".platform-darwin", "linux")).toBe(false);
expect(view.selectorIsCompatibleWithPlatform(".platform-win32", "darwin")).toBe(false);
});

it("should say a selector with the current platform listed is compatible", () => {
expect(view.selectorIsCompatibleWithPlatform(".platform-linux", "linux")).toBe(true);
expect(view.selectorIsCompatibleWithPlatform(".platform-win32", "win32")).toBe(true);
expect(view.selectorIsCompatibleWithPlatform(".platform-darwin", "darwin")).toBe(true);
});

it("should say a selector with the current platform and others listed is compatible", () => {
expect(view.selectorIsCompatibleWithPlatform(".platform-linux, .platform-win32", "win32")).toBe(true);
expect(view.selectorIsCompatibleWithPlatform(".platform-linux, .platform-win32", "linux")).toBe(true);
});
});
20 changes: 3 additions & 17 deletions packages/spell-check/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,9 @@ module.exports = {
// Hook up changes to the configuration settings.
this.excludedScopeRegexLists = [];
this.subs.add(
atom.config.observe(
'spell-check.excludedScopes',
(excludedScopes) => {
this.excludedScopeRegexLists = excludedScopes.map(
(excludedScope) =>
excludedScope
.split(/\s+/)[0]
.split('.')
.filter((className) => className)
.map(
(className) =>
new RegExp(`\\b${className}\\b`)
)
);
return this.updateViews();
}
)
atom.config.onDidChange('spell-check.excludedScopes', () => {
return this.updateViews();
})
);

this.subs.add(
Expand Down
Loading

0 comments on commit 506ed55

Please sign in to comment.