mirror of
https://github.com/kdnk/obsidian-automatic-linker.git
synced 2026-07-22 12:00:30 +00:00
chore: add icons to commands
This commit is contained in:
parent
d40b8d29f7
commit
1dfcc8da0a
2 changed files with 5 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Automatic Linker
|
||||
# 🪄 Automatic Linker 🔮
|
||||
|
||||
Automatically convert plain text file references into Obsidian wiki links as you write. Keep your knowledge graph connected without manual linking.
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ export default class AutomaticLinkerPlugin extends Plugin {
|
|||
const editor = this.getEditor();
|
||||
if (!editor) return;
|
||||
|
||||
let fileContent = editor.getValue();
|
||||
const fileContent = editor.getValue();
|
||||
const oldText = fileContent;
|
||||
const newText = this.modifyLinks(fileContent, activeFile.path);
|
||||
updateEditor(oldText, newText, editor);
|
||||
|
|
@ -342,6 +342,7 @@ export default class AutomaticLinkerPlugin extends Plugin {
|
|||
this.addCommand({
|
||||
id: "format-file",
|
||||
name: "Format file",
|
||||
icon: "wand-sparkles",
|
||||
editorCallback: async () => {
|
||||
try {
|
||||
await this.modifyLinksForActiveFile();
|
||||
|
|
@ -354,6 +355,7 @@ export default class AutomaticLinkerPlugin extends Plugin {
|
|||
this.addCommand({
|
||||
id: "format-vault",
|
||||
name: "Format vault",
|
||||
icon: "drill",
|
||||
editorCallback: async () => {
|
||||
try {
|
||||
await this.modifyLinksForVault();
|
||||
|
|
@ -366,6 +368,7 @@ export default class AutomaticLinkerPlugin extends Plugin {
|
|||
this.addCommand({
|
||||
id: "rebuild-index",
|
||||
name: "Rebuild index",
|
||||
icon: "refresh-ccw",
|
||||
editorCallback: async () => {
|
||||
try {
|
||||
this.refreshFileDataAndTrie();
|
||||
|
|
|
|||
Loading…
Reference in a new issue