Skip to content

Commit

Permalink
Add support for header folding.
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan McQuen <[email protected]>
  • Loading branch information
ryanpcmcquen committed May 12, 2021
1 parent 1625337 commit f35e6c4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-org-mode",
"name": "Org Mode",
"version": "1.0.1",
"version": "1.1.0",
"minAppVersion": "0.10.12",
"description": "Add Org Mode support to Obsidian.",
"author": "ryanpcmcquen",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-org-mode",
"version": "1.0.1",
"version": "1.1.0",
"description": "Add Org Mode support to Obsidian.",
"main": "main.js",
"scripts": {
Expand Down
10 changes: 10 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ class OrgView extends TextFileView {
// @ts-ignore
this.codeMirror = CodeMirror(this.extContentEl, {
theme: 'obsidian',

// I am not sure autofocus is necessary ...
autofocus: true,
foldGutter: {
minFoldSize: 1,
},
foldOptions: {
widget: ' ...',
},
gutters: ['CodeMirror-foldgutter'],
});

this.codeMirror.on('changes', this.changed);
Expand Down
1 change: 1 addition & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"1.1.0": "0.10.12",
"1.0.1": "0.10.12",
"1.0.0": "0.10.12"
}

0 comments on commit f35e6c4

Please sign in to comment.