Skip to content

Commit

Permalink
feat: add codemirror & use .tmLanguage directly as grammar (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonreshetov committed Aug 5, 2022
1 parent 3837b32 commit a36bcf0
Show file tree
Hide file tree
Showing 233 changed files with 210,843 additions and 1,376 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# [3.0.0-beta.1](https://github.com/massCodeIO/massCode/compare/v2.10.0...v3.0.0-beta.1) (2022-08-04)

### Breaking Changes
- Drop Ace editor
- 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
- Remove Light: Crome, Light: Textmate, Light: Xcode themes


### Bug Fixes

* **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))


### Features

* add codemirror & use `.tmLanguage` directly as grammar ([#186](https://github.com/massCodeIO/massCode/issues/186)) ([d81536c](https://github.com/massCodeIO/massCode/commit/d81536ca362c4905bab807d4cb5c7397ef85c681))
* **i18n:** add Chinese traditional locale ([#161](https://github.com/massCodeIO/massCode/issues/161)) ([8b00fcd](https://github.com/massCodeIO/massCode/commit/8b00fcd58eca6c42402a747f23ac57ee8be28927))
* **i18n:** add Spanish locale ([bd68311](https://github.com/massCodeIO/massCode/commit/bd6831123158a38166025a3683412a290ca74114))



# [2.10.0](https://github.com/massCodeIO/massCode/compare/v2.9.0...v2.10.0) (2022-07-21)


Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,24 @@

## Support

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.
massCode is open source project and completely free to use.

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:

<div align="center">

[![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)
[![Donate via PayPal](https://img.shields.io/badge/donate-PayPal-blue.svg?style=popout&logo=paypal)](https://paypal.me/antongithub)
[![Donate via Ko-Fi](https://img.shields.io/badge/donate-Ko--Fi-blue?style=popout&logo=ko-fi)](https://ko-fi.com/antonreshetov)

</div>

## Features
### Organization
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.

### Editor
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.
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.

### Real-time Render for HTML & CSS
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.
Expand Down
4 changes: 4 additions & 0 deletions config/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export default defineConfig({
emptyOutDir: true,
target: 'esnext'
},
define: {
// прокладка для pseudomap при билде
'process.env.TEST_PSEUDOMAP': {}
},
plugins: [
vuePlugin(),
AutoImport({
Expand Down
2,843 changes: 2,843 additions & 0 deletions demo/db/db.json

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "masscode",
"productName": "massCode",
"version": "2.11.0",
"version": "3.0.0-beta.1",
"description": "A free and open source code snippets manager for developers",
"license": "AGPL-3.0",
"main": "build/src/main/index.js",
Expand All @@ -16,6 +16,7 @@
"lint": "eslint --ext .js,.ts,.vue . src",
"lint:fix": "eslint --ext .js,.ts,.vue . --fix src",
"release": "bumpp -c 'build: release v' -t",
"generate:language-readme": "node build/scripts/generate-language-readme.js ",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"prepare": "husky install"
},
Expand All @@ -28,6 +29,9 @@
"*.{js,ts,vue}": [
"prettier --write",
"eslint --fix"
],
"*.json": [
"prettier --write"
]
},
"dependencies": {
Expand All @@ -39,8 +43,9 @@
"@sipec/vue3-tags-input": "^3.0.4",
"@types/universal-analytics": "^0.4.5",
"@vueuse/core": "^8.3.1",
"ace-builds": "^1.4.14",
"axios": "^0.26.1",
"codemirror": "^5.65.7",
"codemirror-textmate": "^1.1.0",
"date-fns": "^2.28.0",
"electron-store": "^8.0.1",
"floating-vue": "^2.0.0-beta.17",
Expand All @@ -56,6 +61,7 @@
"mermaid": "^9.1.3",
"mitt": "^3.0.0",
"nanoid": "^3.3.1",
"onigasm": "^2.2.5",
"pinia": "^2.0.13",
"prettier": "^2.6.2",
"prettier-plugin-java": "^1.6.1",
Expand All @@ -72,7 +78,7 @@
"@commitlint/cli": "^15.0.0",
"@commitlint/config-conventional": "^15.0.0",
"@tsconfig/node14": "^1.0.1",
"@types/ace": "^0.0.48",
"@types/codemirror": "^5.60.5",
"@types/estree": "^0.0.51",
"@types/i18next-fs-backend": "^1.1.2",
"@types/lowdb": "^1.0.11",
Expand Down Expand Up @@ -100,6 +106,7 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^8.2.0",
"handlebars": "^4.7.7",
"husky": "^7.0.0",
"lint-staged": "^12.1.4",
"npm-run-all": "^4.1.5",
Expand Down

0 comments on commit a36bcf0

Please sign in to comment.