mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 19:17:09 +03:00
Merge branch 'master' into fix-issues-on-cinnamon
This commit is contained in:
commit
f96f295c74
@ -8,6 +8,7 @@
|
||||
|
||||
- Fixed bug that happens on some systems when trying to launch Pulsar using the Cinnamon desktop environment
|
||||
- Added a modern implementation of Tree-sitter grammars behind an experimental flag. Enable the “Use Modern Tree-Sitter Implementation” in the Core settings to try it out
|
||||
- Bugfix: fixed Clojure indentation on tree-sitter
|
||||
- Improved the Clojure language support by migrating it to tree-sitter and support block comments, quoting, and other advanced features on modern tree-sitter implementation
|
||||
- Added a modern implementation of Tree-sitter grammars behind an experimental flag. Enable the “Use Modern Tree-Sitter Implementation” in the Core settings to try it out.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
833
packages/autocomplete-css/package-lock.json
generated
833
packages/autocomplete-css/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -18,6 +18,6 @@
|
||||
"devDependencies": {
|
||||
"@webref/css": "^6.3.4",
|
||||
"content": "github:mdn/content",
|
||||
"request": "^2.53.0"
|
||||
"superagent": "^8.0.9"
|
||||
}
|
||||
}
|
||||
|
@ -87,6 +87,7 @@
|
||||
|
||||
const css = require("@webref/css");
|
||||
const fs = require("fs");
|
||||
const superagent = require("superagent");
|
||||
const CSSParser = require("./cssValueDefinitionSyntaxExtractor.js");
|
||||
const manualPropertyDesc = require("./manual-property-desc.json");
|
||||
|
||||
@ -103,8 +104,11 @@ async function update(params) {
|
||||
pseudoSelectors: pseudoSelectors
|
||||
};
|
||||
|
||||
completions.properties = sortByLength(completions.properties);
|
||||
completions.properties = await sortByPopularity(completions.properties);
|
||||
|
||||
// Now to write out our updated file
|
||||
fs.writeFileSync("completions.json", JSON.stringify(completions, null, 2));
|
||||
fs.writeFileSync("./completions.json", JSON.stringify(completions, null, 2));
|
||||
|
||||
// Now to determine how many properties have empty descriptions.
|
||||
|
||||
@ -134,6 +138,65 @@ async function update(params) {
|
||||
};
|
||||
}
|
||||
|
||||
function sortByLength(obj) {
|
||||
let keys = Object.keys(obj);
|
||||
|
||||
keys.sort((a, b) => {
|
||||
if (a.length > b.length) {
|
||||
return 1;
|
||||
} else if (a.length < b.length) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
let newObj = {};
|
||||
|
||||
// Now rebuild the object according to our new keys
|
||||
for (i in keys) {
|
||||
newObj[keys[i]] = obj[keys[i]];
|
||||
}
|
||||
|
||||
return newObj;
|
||||
}
|
||||
|
||||
async function sortByPopularity(obj) {
|
||||
try {
|
||||
const res = await superagent.get("https://chromestatus.com/data/csspopularity");
|
||||
if (res.status !== 200) {
|
||||
console.error(res);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
let newObj = {};
|
||||
|
||||
for (prop in res.body) {
|
||||
let property = res.body[prop].property_name;
|
||||
|
||||
if (typeof obj[property] === "object") {
|
||||
newObj[property] = obj[property];
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.keys(obj).length === Object.keys(newObj).length) {
|
||||
return newObj;
|
||||
}
|
||||
|
||||
for (prop in obj) {
|
||||
if (typeof newObj[prop] !== "object") {
|
||||
newObj[prop] = obj[prop];
|
||||
}
|
||||
}
|
||||
|
||||
return newObj;
|
||||
|
||||
} catch(err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
async function buildProperties(css) {
|
||||
// This function will take a CSS object of all values from @webref/css
|
||||
// and will gather descriptions from mdn/content for these properties.
|
||||
@ -346,7 +409,7 @@ async function getPseudoSelectors() {
|
||||
// For now since there is no best determined way to collect all modern psudoselectors
|
||||
// We will just grab the existing list for our existing `completions.json`
|
||||
|
||||
let existingCompletions = require("./completions.json");
|
||||
let existingCompletions = require("../completions.json");
|
||||
|
||||
return existingCompletions.pseudoSelectors;
|
||||
}
|
@ -88,7 +88,7 @@
|
||||
},
|
||||
"useCoreMovementCommands": {
|
||||
"title": "Use Core Movement Commands",
|
||||
"description": "Disable this if you want to bind your own keystrokes to move around the suggestion list. You will also need to add definitions to your keymap. See: https://github.com/atom/autocomplete-plus#remapping-movement-commands",
|
||||
"description": "Disable this if you want to bind your own keystrokes to move around the suggestion list. You will also need to add definitions to your keymap. See: https://github.com/pulsar-edit/pulsar/blob/master/packages/autocomplete-plus/README.md#remapping-movement-commands",
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"order": 5
|
||||
@ -107,7 +107,7 @@
|
||||
},
|
||||
"scopeBlacklist": {
|
||||
"title": "Scope Blacklist",
|
||||
"description": "Suggestions will not be provided for scopes matching this list. See: http://flight-manual.atom.io/behind-atom/sections/scoped-settings-scopes-and-scope-descriptors/",
|
||||
"description": "Suggestions will not be provided for scopes matching this list. See: https://pulsar-edit.dev/docs/launch-manual/sections/behind-pulsar/#scoped-settings-scopes-and-scope-descriptors",
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
|
@ -40,6 +40,4 @@ parser: 'tree-sitter-clojure'
|
||||
treeSitter:
|
||||
grammar: 'ts/grammar.wasm'
|
||||
highlightsQuery: 'ts/highlights.scm'
|
||||
# localsQuery: 'ts/locals.scm'
|
||||
foldsQuery: 'ts/folds.scm'
|
||||
indentsQuery: 'ts/indents.scm'
|
||||
|
@ -10,6 +10,4 @@ fileTypes: [
|
||||
treeSitter:
|
||||
grammar: 'ts/grammar.wasm'
|
||||
highlightsQuery: 'ts/edn-highlights.scm'
|
||||
# localsQuery: 'ts/locals.scm'
|
||||
foldsQuery: 'ts/folds.scm'
|
||||
indentsQuery: 'ts/indents.scm'
|
||||
|
@ -6,6 +6,4 @@ parser: 'tree-sitter-clojure'
|
||||
treeSitter:
|
||||
grammar: 'ts/grammar.wasm'
|
||||
highlightsQuery: 'ts/edn-highlights.scm'
|
||||
# localsQuery: 'ts/locals.scm'
|
||||
foldsQuery: 'ts/folds.scm'
|
||||
indentsQuery: 'ts/indents.scm'
|
||||
|
@ -4,7 +4,14 @@ exports.activate = function() {
|
||||
atom.grammars.addInjectionPoint('source.clojure', {
|
||||
type: 'quoting_lit',
|
||||
language: () => 'source-edn',
|
||||
content: (node) => node,
|
||||
content: (node) => {
|
||||
let parent = node.parent
|
||||
while(parent) {
|
||||
if(parent.type === 'dis_expr') return null
|
||||
parent = parent.parent
|
||||
}
|
||||
return node
|
||||
},
|
||||
includeChildren: true,
|
||||
languageScope: 'source.edn',
|
||||
coverShallowerScopes: true
|
||||
|
@ -87,6 +87,13 @@ error/
|
||||
; ^ comment.block
|
||||
; ^ comment.block
|
||||
|
||||
#_
|
||||
(+ '1 '(:foo))
|
||||
; ^ comment.block
|
||||
; ^ !constant.numeric
|
||||
; ^ comment.block
|
||||
; ^ !constant.keyword
|
||||
|
||||
(comment 1 2 3)
|
||||
; ^ keyword.control
|
||||
; ^ constant.numeric
|
||||
|
@ -227,6 +227,11 @@ let options = {
|
||||
"runAfterFinish": true,
|
||||
"createDesktopShortcut": true,
|
||||
"createStartMenuShortcut": true,
|
||||
"guid": "0949b555-c22c-56b7-873a-a960bdefa81f"
|
||||
// The GUID is generated from Electron-Builder based on our AppID
|
||||
// Hardcoding it here means it will always be used as generated from
|
||||
// the AppID 'dev.pulsar-edit.pulsar'. If this value ever changes,
|
||||
// A PR to GitHub Desktop must be made with the updated value
|
||||
},
|
||||
"extraMetadata": {
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user