Lsp Features

Text editor extension features

Extract/Inline Notes

The extract note action enables the creation of a new document from a section (header) This involves:

  1. Creating a new file containing the selected content.
  2. Adding link to the newly created file.

The reverse operation, known as inline, allows you to:

  1. Embed the content into the document with Block-reference
  2. Remove the link and injected file.

Both operations automatically adjust the header levels as needed to maintain proper document structure.

Navigation

IWE supports multiple way to navigate your documents, including:

  • Links Navigation: Implement as Go To Definition LSP command
  • Table of Contents: Provided as Document Symbols to the editor
  • Backlinks List: A backlinks list compiles references or citations linking back to the current document

Search

Search is one of the key features. IWE, creates all possible document paths by considering the block-references structure. This means it can come up with lists like:

Readme - Features
Readme - Features - Navigation
Readme - Features - Search

And provide this list to your text editor as Workspace Symbols.

This allows for context-aware fuzzy searching, making it easier for you to find what you need.

The search results are ordered by page-rank which is based on the number of references to the target note.

Text structure normalization / formatting

LSP offers auto-formatting, which typically kicks in when you save your work. This feature helps tidy things up. Here’s what gets cleaned up:

  1. Uprating link titles to the header of the linked document
  2. Adjusting header levels to ensure tree structure
  3. Updating the numbering of the ordered lists
  4. Fixing newlines, indentations in lists, and much more

Inlay hints

Inlay hints showing the number of references to the current document and the list of parent documents

Auto-complete

IWE can suggest links as you type using standard LSP code completion feature.

Text manipulation

IWE offers a range of actions to help you perform context-aware transformations on your notes. The actions can be called with “code actions” LSP menu of your editor. Some of the actions available are:

  • Transforming list to headers/section and vice-versa
  • Changing list type (bullet/ordered)

Header levels normalization

IWE reads and understands nested structures based on headers. It identifies how sub-headers relationships. Markdown allows header structure where the nesting isn’t clear, like:

## First Header

# Second Header

IWE automatically fixes the header levels to ensure they’re nested correctly. So the example above corrects to:

# First Header

# Second Header

Removing unnecessary levels

IWE can normalize the headers structure dropping unnecessary header-levels, For example:

# First header

### Second header

Will be normalized into dropping unnecessary levels and will look like:

# First header

## Second header

Renaming files

With IWE, you can rename the note file and automatically update all the references throughout your entire library using the rename LSP refactoring feature.