Introduction

The DeepSeek Harness (DSH) ecosystem emphasizes “everything is a plugin.” When using dsh-better-sidebar, the default code preview feature is usually quite basic. dsh-code-nav is a companion plugin that takes over code preview in the sidebar, providing more professional syntax highlighting, symbol navigation, and in-file search functionality based on file type, and solving the problem of a poor code-reading experience.

Plugin Overview

dsh-code-nav is a DSH Web plugin that exists as an extension of dsh-better-sidebar. It identifies languages by file extension and automatically takes over the preview when code files are opened in the sidebar. The plugin is maintained by AnakinCao and is licensed under the MIT License.

Core Features

Syntax Highlighting by File Type

Automatically recognizes the programming language based on the file extension and supports following the light or dark theme. The parsing logic covers elements such as keywords, comments, strings, types, numbers, and functions.

Symbol Outline

Parses the symbol structure in the code, including classes, interfaces, functions, variables, and more. Supports filtering by “All / Classes / Methods / Variables,” and clicking an item in the list jumps to the corresponding line.

When searching in the preview area, it supports highlighting all matches and the current match. It supports n / m key actions, uses ↑/↓ or Enter/Shift+Enter to navigate up or down, and supports toggling case sensitivity.

Installation and Enablement

  1. Run the installation command:
    dsh plugin --profile web add <dsh-code-nav-0.1.0.tgz>
  1. Restart the dsh web service (a new bundle requires a host-side reload).
  2. Hard-refresh the page in the browser (Cmd/Ctrl + Shift + R).
  3. In the better-sidebar settings page, find the “Code Preview Navigation” switch in the “Sidebar Cards” section to enable or disable it.

Typical Usage

After installation and enablement, simply open a code file in the dsh web sidebar to make it take effect.

  • Navigation: Click an item in the symbol outline list, or use keyboard shortcuts to jump.
  • Search: Enter a keyword in the search box, press n for the next match, m for the previous match, and Enter to jump.

Applicable Scenarios and Notes

  • Applicable Scenarios: Suitable for scenarios that require quick code review, syntax highlighting, and symbol navigation.
  • Known Limitations:
    • Highlighting and outlines are based on lightweight regular-expression parsing and do not have compiler-level precision. Complex generics, macros, and template metaprogramming may result in missed or false detections.
    • Code preview is read-only. If editing is required, disable this plugin in the better-sidebar settings to fall back to the built-in editor.
    • The maximum file size is 500KB. Files exceeding this limit will only display a prompt.
    • Vue / Svelte files only highlight the JS/TS code inside <script> blocks; the template portion is not highlighted.

Conclusion

This plugin enhances the code-reading experience by taking over the default preview. For more plugin details and source code, please see: