Skip to content

Commit a36bcf0

Browse files
feat: add codemirror & use .tmLanguage directly as grammar (#190)
1 parent 3837b32 commit a36bcf0

File tree

233 files changed

+210843
-1376
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+210843
-1376
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# [3.0.0-beta.1](https://github.com/massCodeIO/massCode/compare/v2.10.0...v3.0.0-beta.1) (2022-08-04)
2+
3+
### Breaking Changes
4+
- Drop Ace editor
5+
- Does not support syntax highlighting for AQL, C9 Search Results, FSL, Gobstones, Jack, JSSM, LogiQL, LuaPage, Lucene, Maze, MIXAL, MUSHCode, RDoc, Redshift, RHTML, RST, Space
6+
- Remove Light: Crome, Light: Textmate, Light: Xcode themes
7+
8+
9+
### Bug Fixes
10+
11+
* **snippets:** folder rename [#162](https://github.com/massCodeIO/massCode/issues/162) ([#169](https://github.com/massCodeIO/massCode/issues/169)) ([c5ddd23](https://github.com/massCodeIO/massCode/commit/c5ddd231c6baecda6df572dda4406d50cc803575))
12+
13+
14+
### Features
15+
16+
* add codemirror & use `.tmLanguage` directly as grammar ([#186](https://github.com/massCodeIO/massCode/issues/186)) ([d81536c](https://github.com/massCodeIO/massCode/commit/d81536ca362c4905bab807d4cb5c7397ef85c681))
17+
* **i18n:** add Chinese traditional locale ([#161](https://github.com/massCodeIO/massCode/issues/161)) ([8b00fcd](https://github.com/massCodeIO/massCode/commit/8b00fcd58eca6c42402a747f23ac57ee8be28927))
18+
* **i18n:** add Spanish locale ([bd68311](https://github.com/massCodeIO/massCode/commit/bd6831123158a38166025a3683412a290ca74114))
19+
20+
21+
122
# [2.10.0](https://github.com/massCodeIO/massCode/compare/v2.9.0...v2.10.0) (2022-07-21)
223

324

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,24 @@
3434

3535
## Support
3636

37-
massCode need your support, give a [star](https://github.com/massCodeIO/massCode/stargazers) on this repo or [donate](https://opencollective.com/masscode). All of this is valuable and will inspire further development.
37+
massCode is open source project and completely free to use.
38+
39+
However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing. You can support massCode development via the following methods:
40+
41+
<div align="center">
42+
43+
[![Donate via Open Collective](https://img.shields.io/badge/donate-Open%20Collective-blue.svg?style=popout&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyNTZweCIgaGVpZ2h0PSIyNTZweCIgdmlld0JveD0iMCAwIDI1NiAyNTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPjxnPjxwYXRoIGQ9Ik0yMDkuNzY1MTQ0LDEyOC4xNDk5NzkgQzIwOS43NjUxNDQsMTQ0LjE2MzMgMjA0Ljg2NDM4MSwxNTkuNDg5ODkgMTk2LjQ5ODc0NywxNzIuNzI1MDcyIEwyMjkuOTQ1Njc1LDIwNi4xNzE5OTkgQzI0Ni42ODIxMDUsMTgzLjg1Njc1OSAyNTUuNzI5MzA3LDE1Ni43MTUxNTIgMjU1LjcyOTMwNywxMjguODIxMTAyIEMyNTUuNzI5MzA3LDk5LjU1Njk5MTcgMjQ1Ljk3NDYwMyw3My4wNzEwMjA3IDIyOS4yNTg5NDQsNTEuNDg1ODEyOCBMMTk2LjQ4MzE0LDg0LjIxNDc5NCBDMjA1LjEyMjU2MSw5Ny4yMjI0NjgzIDIwOS43MzY5MDcsMTEyLjQ4NzgxIDIwOS43NDk1MzcsMTI4LjEwMzE1NiBMMjA5Ljc2NTE0NCwxMjguMTQ5OTc5IFoiIGZpbGw9IiNCOEQzRjQiPjwvcGF0aD48cGF0aCBkPSJNMTI3LjUxMzQ4NCwyMTAuMzU0ODE2IEM4Mi4xNDYwODcyLDIxMC4yNjg5NTggNDUuMzg3NTA5NCwxNzMuNTE3MzU4IDQ1LjI5MzAzOTMsMTI4LjE0OTk3OSBDNDUuMzYxNzUwMiw4Mi43NjQzMTM4IDgyLjEyNzg0ODcsNDUuOTg0MjU3IDEyNy41MTM0ODQsNDUuODk4MzE4NiBDMTQ0LjI0NDc1Miw0NS44OTgzMTg2IDE1OS41NzEzNDIsNTAuNzk5MDgxNyAxNzIuMTE5NzkyLDU5LjE2NDcxNTQgTDIwNC44NjQzODEsMjYuMzg4OTExNiBDMTgyLjU0MzY1LDkuNjY2NjUxMjkgMTU1LjQwMzQyOSwwLjYzMDg2MzI5OCAxMjcuNTEzNDg0LDAuNjM2NDk0NDAzIEM1Ny4xMjM1NDM3LDAuNjM2NDk0NDAzIDAsNTcuNzYwMDM4MSAwLDEyOC4xNDk5NzkgQzAsMTk4LjUwODcwNCA1Ny4xMjM1NDM3LDI1NS42NjM0NjMgMTI3LjUxMzQ4NCwyNTUuNjYzNDYzIEMxNTUuNTM3MzUyLDI1NS43NDA4NzYgMTgyLjc3NTk4OSwyNDYuNDA4NTEgMjA0Ljg2NDM4MSwyMjkuMTYxODg0IEwxNzEuNDE3NDU0LDE5NS43MzA1NjQgQzE1OS41NTU3MzQsMjA1LjQ4NTI2OCAxNDQuMjYwMzU5LDIxMC4zNTQ4MTYgMTI3LjUxMzQ4NCwyMTAuMzU0ODE2IEwxMjcuNTEzNDg0LDIxMC4zNTQ4MTYgWiIgZmlsbD0iIzdGQURGMiI+PC9wYXRoPjwvZz48L3N2Zz4=)](https://opencollective.com/masscode)
44+
[![Donate via PayPal](https://img.shields.io/badge/donate-PayPal-blue.svg?style=popout&logo=paypal)](https://paypal.me/antongithub)
45+
[![Donate via Ko-Fi](https://img.shields.io/badge/donate-Ko--Fi-blue?style=popout&logo=ko-fi)](https://ko-fi.com/antonreshetov)
46+
47+
</div>
3848

3949
## Features
4050
### Organization
4151
massCode allows you to organize snippets using multi-level folders as well as tags. Each snippet has fragments - tabs, which gives even greater level of organization.
4252

4353
### Editor
44-
A snippet manager must not only provide organization of snippets but also have a good code editor. That's why under the hood of massCode there's [Ace](https://ace.c9.io). Ace is a high performance code editor which supports syntax highlighting for over 170 languages. We also added a [Prettier](https://prettier.io) to code formatter.
54+
massCode uses [Codemirror](https://github.com/codemirror/codemirror5) as the basis for the editor and `.tmLanguage` as the grammar for syntax highlighting. This tandem opens the door to over [600](https://github.com/github/linguist/blob/master/vendor/README.md) existing grammars. The application currently supports more than [160](https://github.com/massCodeIO/massCode/tree/master/src/renderer/components/editor) grammars. In addition to `.tmLanguage`, the application supports `.tmTheme` for themes. There is also support for [Prettier](https://prettier.io) for code formatting.
4555

4656
### Real-time Render for HTML & CSS
4757
You can not only collect snippets, but also see the rendering result for HTML and CSS in real time. Test the idea or just view the result.

config/vite.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export default defineConfig({
2222
emptyOutDir: true,
2323
target: 'esnext'
2424
},
25+
define: {
26+
// прокладка для pseudomap при билде
27+
'process.env.TEST_PSEUDOMAP': {}
28+
},
2529
plugins: [
2630
vuePlugin(),
2731
AutoImport({

demo/db/db.json

Lines changed: 2843 additions & 0 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "masscode",
33
"productName": "massCode",
4-
"version": "2.11.0",
4+
"version": "3.0.0-beta.1",
55
"description": "A free and open source code snippets manager for developers",
66
"license": "AGPL-3.0",
77
"main": "build/src/main/index.js",
@@ -16,6 +16,7 @@
1616
"lint": "eslint --ext .js,.ts,.vue . src",
1717
"lint:fix": "eslint --ext .js,.ts,.vue . --fix src",
1818
"release": "bumpp -c 'build: release v' -t",
19+
"generate:language-readme": "node build/scripts/generate-language-readme.js ",
1920
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
2021
"prepare": "husky install"
2122
},
@@ -28,6 +29,9 @@
2829
"*.{js,ts,vue}": [
2930
"prettier --write",
3031
"eslint --fix"
32+
],
33+
"*.json": [
34+
"prettier --write"
3135
]
3236
},
3337
"dependencies": {
@@ -39,8 +43,9 @@
3943
"@sipec/vue3-tags-input": "^3.0.4",
4044
"@types/universal-analytics": "^0.4.5",
4145
"@vueuse/core": "^8.3.1",
42-
"ace-builds": "^1.4.14",
4346
"axios": "^0.26.1",
47+
"codemirror": "^5.65.7",
48+
"codemirror-textmate": "^1.1.0",
4449
"date-fns": "^2.28.0",
4550
"electron-store": "^8.0.1",
4651
"floating-vue": "^2.0.0-beta.17",
@@ -56,6 +61,7 @@
5661
"mermaid": "^9.1.3",
5762
"mitt": "^3.0.0",
5863
"nanoid": "^3.3.1",
64+
"onigasm": "^2.2.5",
5965
"pinia": "^2.0.13",
6066
"prettier": "^2.6.2",
6167
"prettier-plugin-java": "^1.6.1",
@@ -72,7 +78,7 @@
7278
"@commitlint/cli": "^15.0.0",
7379
"@commitlint/config-conventional": "^15.0.0",
7480
"@tsconfig/node14": "^1.0.1",
75-
"@types/ace": "^0.0.48",
81+
"@types/codemirror": "^5.60.5",
7682
"@types/estree": "^0.0.51",
7783
"@types/i18next-fs-backend": "^1.1.2",
7884
"@types/lowdb": "^1.0.11",
@@ -100,6 +106,7 @@
100106
"eslint-plugin-prettier": "^4.0.0",
101107
"eslint-plugin-promise": "^6.0.0",
102108
"eslint-plugin-vue": "^8.2.0",
109+
"handlebars": "^4.7.7",
103110
"husky": "^7.0.0",
104111
"lint-staged": "^12.1.4",
105112
"npm-run-all": "^4.1.5",

0 commit comments

Comments
 (0)