Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
oeyoews committed Oct 22, 2023
1 parent 4b09b88 commit 57d4f98
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 155 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@codemirror/lint": "^6.4.2",
"@codemirror/search": "^6.5.4",
"@codemirror/state": "^6.3.1",
"@codemirror/theme-one-dark": "^6.1.2",
"@codemirror/view": "^6.21.3",
"@lezer/common": "^1.1.0",
"@lezer/highlight": "^1.1.6",
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/tiddlywiki-codemirror-6/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import {
} from '@codemirror/view';
import { tags } from '@lezer/highlight';
import { Vim, vim } from '@replit/codemirror-vim';
// import { oneDarkTheme, oneDarkHighlightStyle, } from '@codemirror/theme-one-dark';

// import { tiddlywiki, tiddlywikiLanguage } from '@codemirror/lang-tiddlywiki';

Expand Down Expand Up @@ -333,10 +334,12 @@ class CodeMirrorEngine {
editorExtensions.push(keymap.of([indentWithTab]));
}

// vim
editorExtensions.push(vim());
Vim.map('jk', '<Esc>', 'insert'); // in insert mode
Vim.map('H', '0', 'normal');
Vim.map('L', '$', 'normal');
// editorExtensions.push(oneDarkTheme);

if (
this.widget.wiki.getTiddlerText(
Expand Down
146 changes: 0 additions & 146 deletions src/tiddlywiki-codemirror-6/files/lib/one-dark.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/tiddlywiki-codemirror-6/files/tiddlywiki.files
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"tiddlers": [
{
"file": "lib/one-dark.js",
"fields": {
"type": "application/javascript",
"title": "$:/plugins/BTC/tiddlywiki-codemirror-6/lib/one-dark.js",
"module-type": "library"
}
},
{
"file": "modules/startup/load-codemirror-modules.js",
"fields": {
Expand Down
4 changes: 3 additions & 1 deletion src/tiddlywiki-codemirror-6/readme.tid
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ If you like the plugin, feel free to leave me a star on [ext[GitHub|https://gith
* lang-tiddlywiki
* refactor engine.js to es6 class
* 焦点残留问题
* 调色板问题
* theme: https://github.com/codemirror/theme-one-dark
* tab to completion
* min completion length
3 changes: 3 additions & 0 deletions wiki/tiddlers/22nd October 2023.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const demo = 1;

console.log(demo)
5 changes: 5 additions & 0 deletions wiki/tiddlers/22nd October 2023.js.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
created: 20231022083508728
modified: 20231022083643066
tags: Journal
title: 22nd October 2023
type: application/javascript

0 comments on commit 57d4f98

Please sign in to comment.