From 5529929a8255de726339fc5ea2b79c1c8f4f1b22 Mon Sep 17 00:00:00 2001 From: kortina Date: Sun, 10 May 2020 21:17:50 -0700 Subject: [PATCH 1/7] update settings. bump version --- .vscode/settings.json | 5 +++++ package.json | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..245ba82 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "cSpell.words": [ + "Backlinks" + ] +} \ No newline at end of file diff --git a/package.json b/package.json index 86f31f1..ab9a398 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "vscode-markdown-notes", "displayName": "VS Code Markdown Notes", - "description": "Navigate notes with [[wiki-links]] and #tags (like Bear, Roam, etc). Use Peek Definition to preview linked notes. Quickly creatre new notes with a command.", - "version": "0.0.4", + "description": "Navigate notes with [[wiki-links]] and #tags (like Bear, Roam, etc). Use Peek Definition to preview linked notes. Quickly create new notes with a command.", + "version": "0.0.5", "publisher": "kortina", "repository": { "url": "https://github.com/kortina/vscode-markdown-notes.git", From a352f8d8ca84853232204b4d3472af97d6133a78 Mon Sep 17 00:00:00 2001 From: kortina Date: Sun, 10 May 2020 22:27:17 -0700 Subject: [PATCH 2/7] fix a bunch of typos --- .vscode/settings.json | 14 +++++++++++++- README.md | 21 ++++++++++----------- src/extension.ts | 23 +++++++++++------------ 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 245ba82..0fc7f8f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,17 @@ { "cSpell.words": [ - "Backlinks" + "Backlinks", + "Devops", + "Suping", + "basenames", + "filepath", + "jumplist", + "notetaking", + "nvalt", + "prefill", + "vpackage", + "vpublish", + "vsce", + "vsix" ] } \ No newline at end of file diff --git a/README.md b/README.md index ff1d8b2..50dfaa3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # VS Code Markdown Notes -Use `[[wiki-links]]` and `#tags` for fast-navigation between notes kept in in a VS Code workspace. Quickly create new notes from a Tilte Case Note Name. +Use `[[wiki-links]]` and `#tags` for fast-navigation between notes kept in in a VS Code workspace. Quickly create new notes from a Title Case Note Name. There are many great note-taking applications ([Notational Velocity](http://notational.net/), [nvalt](https://brettterpstra.com/projects/nvalt/), [Bear](https://bear.app/), [FSNotes](https://fsnot.es/)), but few of them offer the extensibility of VS Code and the ability to use Vim bindings for editing notes. @@ -28,7 +28,7 @@ You can bind this to a keyboard shortcut by adding to your `keybindings.json`: ```json { - "key": "al+shiftt+n", + "key": "al+shift+n", "command": "vscodeMarkdownNotes.newNote", }, ``` @@ -66,15 +66,14 @@ Run `npm install` first. ### FAQ - "Autocomplete / Intellisense is not working - why?" - - Make sure that quick suggestions are enabled in Markdown. Put this in settings.json: - - ``` - "[markdown]": { - "editor.quickSuggestions": true - } - ``` + - Make sure that quick suggestions are enabled in Markdown. Put this in settings.json: + ``` + "[markdown]": { + "editor.quickSuggestions": true + } + ``` - "New note is not working - why?" - - New Note works only when you are in a workspace. Look [here](https://stackoverflow.com/questions/44629890/what-is-a-workspace-in-visual-studio-code) for more information on workspaces in VS Code. + - New Note works only when you are in a workspace. Look [here](https://stackoverflow.com/questions/44629890/what-is-a-workspace-in-visual-studio-code) for more information on workspaces in VS Code. ### Known Issues @@ -99,7 +98,7 @@ To create a new release, ```sh npm install # bump version number in package.json -npm run vpackage # package the release, creates ,vsix +npm run vpackage # package the release, creates vsix npm run vpublish # publish to store, see https://code.visualstudio.com/api/working-with-extensions/publishing-extension # Will prompt for Azure Devops Personal Access Token, get fresh one at: # https://dev.azure.com/andrewkortina/ diff --git a/src/extension.ts b/src/extension.ts index 6aded10..93ed34c 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -48,7 +48,7 @@ class WorkspaceTagList { this.STARTED_INIT = true; let files = (await workspace.findFiles('**/*')) .filter( - // TODO: paramaterize extensions. Add $ to end? + // TODO: parameterize extensions. Add $ to end? (f) => f.scheme == 'file' && f.path.match(/\.(md|markdown)/i) ) .map((f) => { @@ -78,6 +78,8 @@ interface ContextWord { const NULL_CONTEXT_WORD = { type: ContextWordType.Null, word: '', hasExtension: null }; const TAG_REGEX___NO_ANCHORS = /\#[\w\-\_]+/i; // used to match tags that appear within lines const TAG_REGEX_WITH_ANCHORS = /^\#[\w\-\_]+$/i; // used to match entire words +const WIKI_LINK_REGEX = /\[\[[\w\.\-\_\/\\]+/i; // [[wiki-link-regex +const MARKDOWN_WORD_PATTERN_OVERRIDE = /([\#\.\/\\\w_]+)/; // had to add [".", "/", "\"] to get relative path completion working and ["#"] to get tag completion working function getContextWord(document: TextDocument, position: Position): ContextWord { let contextWord: string; @@ -98,9 +100,7 @@ function getContextWord(document: TextDocument, position: Position): ContextWord } } - // [[wiki-link-regex - // regex = /[\w\.\-\_\/\\]+\.(md|markdown)/i; - regex = /\[\[[\w\.\-\_\/\\]+/i; + regex = WIKI_LINK_REGEX; range = document.getWordRangeAtPosition(position, regex); if (range) { contextWord = document.getText(range); @@ -108,7 +108,7 @@ function getContextWord(document: TextDocument, position: Position): ContextWord return { type: ContextWordType.WikiLink, word: contextWord.replace(/^\[+/, ''), - // TODO: paramaterize extensions. Add $ to end? + // TODO: parameterize extensions. Add $ to end? hasExtension: !!contextWord.match(/\.(md|markdown)/i), }; } @@ -126,9 +126,6 @@ class MarkdownFileCompletionItemProvider implements CompletionItemProvider { ) { const contextWord = getContextWord(document, position); // console.debug(`provideCompletionItems ${ContextWordType[contextWord.type]}`); - /////////////////////////// - // TODO: add handling for ContextWorkType.Tag - /////////////////////////// let items = []; switch (contextWord.type) { case ContextWordType.Null: @@ -136,7 +133,7 @@ class MarkdownFileCompletionItemProvider implements CompletionItemProvider { break; case ContextWordType.Tag: // console.debug(`ContextWordType.Tag`); - // console.debug(`TAG_WORD_SET: ${Array.from(WorkspaceTagList.TAG_WORD_SET)}`); + console.debug(`TAG_WORD_SET: ${Array.from(WorkspaceTagList.TAG_WORD_SET)}`); items = Array.from(WorkspaceTagList.TAG_WORD_SET).map((t) => { let kind = CompletionItemKind.File; let label = `${t}`; // cast to a string @@ -146,7 +143,7 @@ class MarkdownFileCompletionItemProvider implements CompletionItemProvider { break; case ContextWordType.WikiLink: let files = (await workspace.findFiles('**/*')).filter( - // TODO: paramaterize extensions. Add $ to end? + // TODO: parameterize extensions. Add $ to end? (f) => f.scheme == 'file' && f.path.match(/\.(md|markdown)/i) ); items = files.map((f) => { @@ -197,7 +194,7 @@ class MarkdownDefinitionProvider implements vscode.DefinitionProvider { // However, only check for basenames in the entire project if: if (useUniqueFilenames()) { const filename = selectedWord; - // there should be exactly 1 file with name = selecteWord + // there should be exactly 1 file with name = selectedWord files = (await workspace.findFiles('**/*')).filter((f) => { return basename(f.path) == filename; }); @@ -282,7 +279,9 @@ function newNote(context: vscode.ExtensionContext) { export function activate(context: vscode.ExtensionContext) { // console.debug('vscode-markdown-notes.activate'); const md = { scheme: 'file', language: 'markdown' }; - vscode.languages.setLanguageConfiguration('markdown', { wordPattern: /([\#\.\/\\\w_]+)/ }); + vscode.languages.setLanguageConfiguration('markdown', { + wordPattern: MARKDOWN_WORD_PATTERN_OVERRIDE, + }); // const triggerCharacters = ['.', '#']; // const triggerCharacters = []; From 6db9c91cf07ac579044e4882b006e6806e365b00 Mon Sep 17 00:00:00 2001 From: kortina Date: Sun, 10 May 2020 22:44:12 -0700 Subject: [PATCH 3/7] comment out debug --- src/extension.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index 93ed34c..06abf90 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -133,7 +133,11 @@ class MarkdownFileCompletionItemProvider implements CompletionItemProvider { break; case ContextWordType.Tag: // console.debug(`ContextWordType.Tag`); - console.debug(`TAG_WORD_SET: ${Array.from(WorkspaceTagList.TAG_WORD_SET)}`); + // console.debug( + // `contextWord.word: ${contextWord.word} TAG_WORD_SET: ${Array.from( + // WorkspaceTagList.TAG_WORD_SET + // )}` + // ); items = Array.from(WorkspaceTagList.TAG_WORD_SET).map((t) => { let kind = CompletionItemKind.File; let label = `${t}`; // cast to a string From 2e9982c6ccd75c6d97f87e7024958088e31b1c22 Mon Sep 17 00:00:00 2001 From: kortina Date: Sun, 10 May 2020 22:45:49 -0700 Subject: [PATCH 4/7] npm install --- package-lock.json | 48 +++++++++++++++++++++++++++-------------------- package.json | 2 +- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6128264..c934fb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vscode-markdown-notes", - "version": "0.0.4", + "version": "0.0.5", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -376,12 +376,6 @@ "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=", "dev": true }, - "didyoumean": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.1.tgz", - "integrity": "sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=", - "dev": true - }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -930,6 +924,12 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -956,16 +956,24 @@ "dev": true }, "markdown-it": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", - "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", "dev": true, "requires": { "argparse": "^1.0.7", - "entities": "~1.1.1", + "entities": "~2.0.0", "linkify-it": "^2.0.0", "mdurl": "^1.0.1", "uc.micro": "^1.0.5" + }, + "dependencies": { + "entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.2.tgz", + "integrity": "sha512-dmD3AvJQBUjKpcNkoqr+x+IF0SdRtPz9Vk0uTy4yWqga9ibB6s4v++QFWNohjiUGoMlF552ZvNyXDxz5iW0qmw==", + "dev": true + } } }, "mdurl": { @@ -1242,9 +1250,9 @@ } }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "safer-buffer": { @@ -1509,9 +1517,9 @@ "dev": true }, "vsce": { - "version": "1.73.0", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.73.0.tgz", - "integrity": "sha512-6W37Ebbkj3uF3WhT+SCfRtsneRQEFcGvf/XYz+b6OAgDCj4gPurWyDVrqw/HLsbP1WflGIyUfVZ8t5M7kQp6Uw==", + "version": "1.75.0", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.75.0.tgz", + "integrity": "sha512-qyAQTmolxKWc9bV1z0yBTSH4WEIWhDueBJMKB0GUFD6lM4MiaU1zJ9BtzekUORZu094YeNSKz0RmVVuxfqPq0g==", "dev": true, "requires": { "azure-devops-node-api": "^7.2.0", @@ -1519,10 +1527,10 @@ "cheerio": "^1.0.0-rc.1", "commander": "^2.8.1", "denodeify": "^1.2.1", - "didyoumean": "^1.2.1", "glob": "^7.0.6", - "lodash": "^4.17.10", - "markdown-it": "^8.3.1", + "leven": "^3.1.0", + "lodash": "^4.17.15", + "markdown-it": "^10.0.0", "mime": "^1.3.4", "minimatch": "^3.0.3", "osenv": "^0.1.3", diff --git a/package.json b/package.json index ab9a398..72cdb7e 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,6 @@ "@typescript-eslint/parser": "^2.28.0", "eslint": "^6.8.0", "typescript": "^3.5.1", - "vsce": "^1.73.0" + "vsce": "^1.75.0" } } From eabc9f79232e7af5debe27751d21e79b1761a312 Mon Sep 17 00:00:00 2001 From: kortina Date: Sun, 10 May 2020 22:51:45 -0700 Subject: [PATCH 5/7] add back debugging --- src/extension.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 06abf90..b6772ca 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -133,11 +133,11 @@ class MarkdownFileCompletionItemProvider implements CompletionItemProvider { break; case ContextWordType.Tag: // console.debug(`ContextWordType.Tag`); - // console.debug( - // `contextWord.word: ${contextWord.word} TAG_WORD_SET: ${Array.from( - // WorkspaceTagList.TAG_WORD_SET - // )}` - // ); + console.debug( + `contextWord.word: ${contextWord.word} TAG_WORD_SET: ${Array.from( + WorkspaceTagList.TAG_WORD_SET + )}` + ); items = Array.from(WorkspaceTagList.TAG_WORD_SET).map((t) => { let kind = CompletionItemKind.File; let label = `${t}`; // cast to a string From 5d42240aaa6e89aa245457dbfebaab7d88c5e7de Mon Sep 17 00:00:00 2001 From: kortina Date: Mon, 11 May 2020 22:09:44 -0700 Subject: [PATCH 6/7] calculate+return range for CompletionItem INCLUDING # EXCLUDING [[ --- src/extension.ts | 61 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index b6772ca..f0979f2 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -73,9 +73,15 @@ interface ContextWord { type: ContextWordType; word: string; hasExtension: boolean | null; + range: vscode.Range | undefined; } -const NULL_CONTEXT_WORD = { type: ContextWordType.Null, word: '', hasExtension: null }; +const NULL_CONTEXT_WORD = { + type: ContextWordType.Null, + word: '', + hasExtension: null, + range: undefined, +}; const TAG_REGEX___NO_ANCHORS = /\#[\w\-\_]+/i; // used to match tags that appear within lines const TAG_REGEX_WITH_ANCHORS = /^\#[\w\-\_]+$/i; // used to match entire words const WIKI_LINK_REGEX = /\[\[[\w\.\-\_\/\\]+/i; // [[wiki-link-regex @@ -90,12 +96,15 @@ function getContextWord(document: TextDocument, position: Position): ContextWord regex = TAG_REGEX___NO_ANCHORS; range = document.getWordRangeAtPosition(position, regex); if (range) { + // here we do nothing to modify the range because the replacements + // will include the # character, so we want to keep the leading # contextWord = document.getText(range); if (contextWord) { return { type: ContextWordType.Tag, word: contextWord.replace(/^\#+/, ''), hasExtension: null, + range: range, }; } } @@ -103,13 +112,19 @@ function getContextWord(document: TextDocument, position: Position): ContextWord regex = WIKI_LINK_REGEX; range = document.getWordRangeAtPosition(position, regex); if (range) { - contextWord = document.getText(range); + // account for the (exactly) 2 [[ chars at beginning of the match + // since our replacement words do not contain [[ chars + let s = new vscode.Position(range.start.line, range.start.character + 2); + // keep the end + let r = new vscode.Range(s, range.end); + contextWord = document.getText(r); if (contextWord) { return { type: ContextWordType.WikiLink, - word: contextWord.replace(/^\[+/, ''), + word: contextWord, // .replace(/^\[+/, ''), // TODO: parameterize extensions. Add $ to end? hasExtension: !!contextWord.match(/\.(md|markdown)/i), + range: r, // range, }; } } @@ -117,6 +132,8 @@ function getContextWord(document: TextDocument, position: Position): ContextWord return NULL_CONTEXT_WORD; } +// perhaps there is a race condition in the setting of markdown wordPattern? +// ???????????????????????????????????? 🧐 class MarkdownFileCompletionItemProvider implements CompletionItemProvider { public async provideCompletionItems( document: TextDocument, @@ -125,6 +142,9 @@ class MarkdownFileCompletionItemProvider implements CompletionItemProvider { context: CompletionContext ) { const contextWord = getContextWord(document, position); + // console.debug( + // `contextWord: '${contextWord.word}' start: (${contextWord.range?.start.line}, ${contextWord.range?.start.character}) end: (${contextWord.range?.end.line}, ${contextWord.range?.end.character}) context: (${position.line}, ${position.character})` + // ); // console.debug(`provideCompletionItems ${ContextWordType[contextWord.type]}`); let items = []; switch (contextWord.type) { @@ -133,15 +153,19 @@ class MarkdownFileCompletionItemProvider implements CompletionItemProvider { break; case ContextWordType.Tag: // console.debug(`ContextWordType.Tag`); - console.debug( - `contextWord.word: ${contextWord.word} TAG_WORD_SET: ${Array.from( - WorkspaceTagList.TAG_WORD_SET - )}` - ); + // console.debug( + // `contextWord.word: ${contextWord.word} TAG_WORD_SET: ${Array.from( + // WorkspaceTagList.TAG_WORD_SET + // )}` + // ); items = Array.from(WorkspaceTagList.TAG_WORD_SET).map((t) => { let kind = CompletionItemKind.File; let label = `${t}`; // cast to a string - return new CompletionItem(label, kind); + let item = new CompletionItem(label, kind); + if (contextWord && contextWord.range) { + item.range = contextWord.range; + } + return item; }); return items; break; @@ -153,7 +177,11 @@ class MarkdownFileCompletionItemProvider implements CompletionItemProvider { items = files.map((f) => { let kind = CompletionItemKind.File; let label = filenameForConvention(f, document); - return new CompletionItem(label, kind); + let item = new CompletionItem(label, kind); + if (contextWord && contextWord.range) { + item.range = contextWord.range; + } + return item; }); return items; break; @@ -280,15 +308,18 @@ function newNote(context: vscode.ExtensionContext) { ); } -export function activate(context: vscode.ExtensionContext) { - // console.debug('vscode-markdown-notes.activate'); - const md = { scheme: 'file', language: 'markdown' }; +const overrideMarkdownWordPattern = () => { + // console.debug('overrideMarkdownWordPattern'); vscode.languages.setLanguageConfiguration('markdown', { wordPattern: MARKDOWN_WORD_PATTERN_OVERRIDE, }); +}; + +export function activate(context: vscode.ExtensionContext) { + // console.debug('vscode-markdown-notes.activate'); + const md = { scheme: 'file', language: 'markdown' }; + overrideMarkdownWordPattern(); - // const triggerCharacters = ['.', '#']; - // const triggerCharacters = []; context.subscriptions.push( vscode.languages.registerCompletionItemProvider(md, new MarkdownFileCompletionItemProvider()) ); From eaeeef7324fe02772c65ebd5c97a11abf2fdc4a4 Mon Sep 17 00:00:00 2001 From: kortina Date: Mon, 11 May 2020 22:35:32 -0700 Subject: [PATCH 7/7] minor edits / comments --- README.md | 4 +--- src/extension.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 50dfaa3..dc889be 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Run `npm install` first. ### FAQ - "Autocomplete / Intellisense is not working - why?" - - Make sure that quick suggestions are enabled in Markdown. Put this in settings.json: + - Quick suggestions are not enabled by default in Markdown, so you have to manually `triggerSuggest` OR put this in settings.json: ``` "[markdown]": { "editor.quickSuggestions": true @@ -77,7 +77,6 @@ Run `npm install` first. ### Known Issues -- Filename completion seems to be triggering when not in the `[[` context. - The `ctrl+o` VSCodeVim jumplist shortcut does not return you to the correct place after using "Go to Definition" (`ctrl+]`): https://github.com/VSCodeVim/Vim/issues/3277 (The VSCode `Go Back` command (`ctrl+-`) does work, however.) - This extension sets the `wordPattern` for 'markdown' in order to (1) enable proper completion of relative paths and (2) make it such that if you `cmd+shift+f` on a `#tag` the search will prefill with "#tag" and not just "tag":
`vscode.languages.setLanguageConfiguration('markdown', { wordPattern: /([\#\.\/\\\w_]+)/ });` @@ -89,7 +88,6 @@ Run `npm install` first. - Provide better support for ignore patterns, eg, don't complete `file.md` if it is within `ignored_dir/` - Should we support filename without extension, eg, assume `[[file]]` is a reference to `file.md`? - Should we support links to headings? eg, `file.md#heading-text`? -- Add syntax highlighting and search for `#tags`. See [also](https://stackoverflow.com/questions/60293955/is-cmdshiftf-in-vscode-supposed-to-respect-the-editor-wordseparators-setting) ### Development and Release diff --git a/src/extension.ts b/src/extension.ts index f0979f2..82575f4 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -318,7 +318,7 @@ const overrideMarkdownWordPattern = () => { export function activate(context: vscode.ExtensionContext) { // console.debug('vscode-markdown-notes.activate'); const md = { scheme: 'file', language: 'markdown' }; - overrideMarkdownWordPattern(); + overrideMarkdownWordPattern(); // still nec to get ../ to trigger suggestions in `relativePaths` mode context.subscriptions.push( vscode.languages.registerCompletionItemProvider(md, new MarkdownFileCompletionItemProvider())