MCPcopy Index your code
hub / github.com/WhiskeyJack96/logseqlsp

github.com/WhiskeyJack96/logseqlsp @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
54 symbols 109 edges 4 files 2 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

A LSP implementation for LogSeq flavored markdown

  • Attempts to improve the cli editing experience of markdown files that have log seq embed and queries by support hover, go to definition, and select references
  • If you have ideas for additional features please let me know :)

Usage

  • Download the release or build from source and copy the binary into your path. Then configure your lsp integration with the binary name.
  • Editor configuration examples:
  • In helix add this to ~/.config/helix/languages.toml
    • yaml [[language]] name = "markdown" scope = "source.md" injection-regex = "md|markdown" file-types = ["md", "markdown"] language-server = { command = "logseqlsp", args=["-t", "{your-token}", "-p", "{lsp-port}", "--log-file", "{/path/to/file}"] } indent = { tab-width = 2, unit = " " }
  • In Emacs, add the following as your eglot config
    • emacs-lisp (use-package eglot :ensure t :config (add-to-list 'eglot-server-programs '(markdown-mode . ("logseqlsp" "-t" "{your-token}" "--log-file" "{/path/to/file}"))) (add-hook 'markdown-mode-hook 'eglot-ensure))

Planned features

  • Support for code actions to do the following will be hit in the next pass
    • Rotate between todo, doing, done
    • Create page if it does not exist
  • Support for autocomplete on tags, properties, links will be added after code actions
  • Refactor/Rename page/tag/property might be possible
  • Tree Sitter syntax file may be added (help appreciated)
  • Virtual text for neovim will likely require an nvim plugin (help appreciate)

Core symbols most depended-on inside this repo

newLink
called by 6
document/document.go
readDocumentIdentifier
called by 4
main.go
linkToURI
called by 3
main.go
FindLinkForPosition
called by 3
document/document.go
Marshal
called by 3
logseq/client.go
URIToReader
called by 2
files/files.go
New
called by 2
document/document.go
UnmarshalPage
called by 2
logseq/client.go

Shape

Method 25
Function 17
Struct 9
TypeAlias 3

Languages

Go100%

Modules by API surface

logseq/client.go25 symbols
main.go20 symbols
document/document.go7 symbols
files/files.go2 symbols

For agents

$ claude mcp add logseqlsp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact