Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gw31415/obsidian-lsp
LSP server for operating the note-taking system Obsidian
https://github.com/gw31415/obsidian-lsp
lsp lsp-server obsidian obsidian-md
Last synced: 30 days ago
JSON representation
LSP server for operating the note-taking system Obsidian
- Host: GitHub
- URL: https://github.com/gw31415/obsidian-lsp
- Owner: gw31415
- License: mit
- Created: 2023-06-24T08:42:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-23T06:46:46.000Z (8 months ago)
- Last Synced: 2024-04-23T19:38:09.818Z (7 months ago)
- Topics: lsp, lsp-server, obsidian, obsidian-md
- Language: TypeScript
- Homepage:
- Size: 183 KB
- Stars: 35
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# obsidian-lsp : Language Server for Obsidian.md
## Development has stalled
Updates have been delayed due to lack of time allocated for development. Furthermore, I have no plans to make this project more functional.
If you are looking for something more versatile, I recommend [markdown-oxide](https://github.com/Feel-ix-343/markdown-oxide).---
![Screen record](https://github.com/gw31415/obsidian-lsp/assets/24710985/be3e8a1b-230a-4af0-9a0a-ea2e747eed35)
## Motivation
[Obsidian.md](https://obsidian.md/) is a fantastic tool that enables you to
create your own Wiki using Markdown. It's not only convenient but also boasts an
iOS app that makes viewing easy. However, my goal was to further enhance this
experience by allowing the use of any text editor like Neovim. The need for such
flexibility is what led me to the development of this LSP server for
Obsidian.md. It aims to make editing your Obsidian notes more efficient and
flexible, all in your editor of choice.## Features
The Obsidian.md LSP server provides the following main features:
- [x] `textDocument/completion`: Provides search within the Vault and
autocompletion of links, enabling efficient navigation within your wiki.- [x] `textDocument/codeAction`: If the alias on WikiLink is not listed in the
alias settings in the document's frontmatter, add the string into the alias
entry in the document's frontmatter.- [x] `textDocument/publishDiagnostics`: Detects and alerts you of broken or
empty links, ensuring the consistency and integrity of your wiki.- [x] `textDocument/definition`: Allows you to jump directly to a page from
its link, aiding swift exploration within your wiki.- [x] `textDocument/hover`: Displays the content of the linked article in a
hover-over preview, saving you the need to follow the link.- [x] `textDocument/rename`: When Rename is performed on a document being edited,
the string of the renamed symbol is added to the alias. If the title has not
been set, it will also be set to the title of the document.- [ ] `textDocument/references`: (Will) display a list of all articles that
contain a link to a specific article, helping you understand the context and
relationships of your notes. This feature is currently under development.- [ ] `workspace/symbol`: (Will) enable searching for symbols across the
entire workspace, helping you quickly locate specific topics or keywords.
This feature is currently under development.The Obsidian.md LSP server makes your Obsidian usage more potent and efficient.
You can edit your Obsidian Wiki in your preferred editor, maximising its
potential.## How to use?
This is not a plugin itself and does not provide each function directly to the
editor. If you still want to try it, you can access each function with the
following settings.### Neovim
```lua
vim.api.nvim_create_autocmd("BufRead", {
pattern = "*.md",
callback = function()
local lspconfig = require('lspconfig')
local configs = require('lspconfig.configs')
if not configs.obsidian then
configs.obsidian = {
default_config = {
cmd = { "npx", "obsidian-lsp", "--", "--stdio" },
single_file_support = false,
root_dir = lspconfig.util.root_pattern ".obsidian",
filetypes = { 'markdown' },
},
}
end
lspconfig.obsidian.setup {}
end,
})
```## Related Projects
- [markdown-oxide](https://github.com/Feel-ix-343/markdown-oxide) : Better-updated
LSP for obsidian markdown system. I recommend to use it.
- [obsidian.nvim](https://github.com/epwalsh/obsidian.nvim) : The Neovim
plugin that inspired this project