Using Obsidian with DS-Algo Practice

Install VS Code Editor Plugin

For the best experience with Java files in Obsidian:

  1. Open Obsidian Settings (Cmd+,)
  2. Community Plugins → Browse
  3. Search: “VS Code Editor”
  4. Install & Enable the plugin

Result: Java files open with VS Code’s editor embedded in Obsidian - full syntax highlighting, IntelliSense, and all code editing features!

Plugin URL: obsidian://show-plugin?id=vscode-editor

Configuration Applied

Obsidian has been configured to show Java files in the file explorer:

Settings Updated

  • showUnsupportedFiles: true - Java files are now visible
  • textFileExtensions - Java recognized as text file
  • userIgnoreFilters - Hides bin/ folder (compiled files) from view

📁 File Structure in Obsidian

You can now navigate through:

DS-Algo-Practice/
├── 📄 README.md                    ← Start here
├── 📄 GET_STARTED.md              ← Your roadmap
├── 📄 QUICK_REFERENCE.md          ← Pattern cheat sheet
├── 📄 PRACTICE_INDEX.md           ← Problem index
│
├── 📁 src/
│   ├── 📁 patterns/
│   │   ├── ☕ TwoPointers.java     ← Now visible!
│   │   ├── ☕ SlidingWindow.java
│   │   ├── ☕ BinarySearch.java
│   │   └── ☕ HashMapPatterns.java
│   │
│   └── 📁 utils/
│       ├── ☕ TreeNode.java
│       ├── ☕ ListNode.java
│       ├── ☕ GraphNode.java
│       ├── ☕ ArrayUtils.java
│       └── ☕ TestHelper.java
│
└── 📁 practice-sessions/
    ├── 📄 Session-01-TwoPointers.md
    ├── 📄 Session-02-SlidingWindow.md
    ├── 📄 Session-03-BinarySearch.md
    └── 📄 Session-04-HashMap.md

1. Start with Markdown

Read the practice session in Obsidian:

  • practice-sessions/Session-01-TwoPointers.md

2. Reference the Pattern

Open the Java pattern file:

  • src/patterns/TwoPointers.java

3. External Editor

For coding, use your preferred IDE/editor:

  • VS Code
  • IntelliJ IDEA
  • Or compile from terminal

4. Review in Obsidian

Come back to review notes and cross-reference patterns

📝 Reading Java Files in Obsidian

Java files will open in Obsidian’s text editor. You can:

  • ✅ Read the code
  • ✅ Search within files (Cmd/Ctrl + F)
  • ✅ Link to them from markdown notes
  • ✅ See them in graph view
  • ❌ Syntax highlighting (limited)
  • ❌ Code completion (not an IDE)

💡 Linking Java Files in Your Notes

You can link to Java files from your markdown notes:

## Pattern Reference
See [[TwoPointers.java]] for implementation details.
 
## Problem Solution
The solution uses the pattern from [[BinarySearch.java#Binary search on answer space]].

🔍 What’s Hidden

These exist on disk but are hidden in Obsidian:

  • bin/ folder (contains all compiled .class files - proof of compilation)
  • .jar, .war files (Java archives)
  • .DS_Store (macOS metadata)

Why? Compiled files clutter the view but are kept as proof that code compiles. All .class files are in the bin/ directory, separate from source code.

🔧 If You Want to Show bin/ Folder

Edit .obsidian/app.json and remove "DS-Algo-Practice/bin" from userIgnoreFilters:

{
  "showUnsupportedFiles": true,
  "userIgnoreFilters": [
    "*.jar",
    "*.war",
    ".DS_Store"
  ]
}

Then restart Obsidian to see the compiled files in bin/ directory.

🚀 Quick Actions

  1. Open file explorer (Cmd/Ctrl + O)
  2. Type: TwoPointers.java
  3. Press Enter

Search Across All Files

  1. Open search (Cmd/Ctrl + Shift + F)
  2. Type your query (e.g., “sliding window”)
  3. Results include both markdown and Java files
  • Use [[filename]] syntax
  • Works with .java files too!
  • Example: [[TwoPointers.java]]

📚 Best Practices

  1. Use Markdown for Notes - Write summaries, insights, and study notes in .md files
  2. Read Java in Obsidian - Quick reference and understanding
  3. Code in IDE - For actual implementation and testing
  4. Cross-Reference - Link Java patterns from practice session notes

🔄 If Files Still Don’t Show

  1. Restart Obsidian - Close and reopen the vault
  2. Check Vault - Ensure you opened /Users/niladri.roy/Learn as the vault
  3. Verify Settings - Check .obsidian/app.json has showUnsupportedFiles: true
  4. File Extension - Confirm files have .java extension (not .java.txt)

Note: The configuration has been applied. Restart Obsidian if files still don’t appear.