Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danymat/lsp-zettelkasten
Barebone implementation of a Language Server Protocol for Zettelkasten
https://github.com/danymat/lsp-zettelkasten
language-server language-server-protocol lsp obsidian obsidian-md zettelkasten zettelkasten-methodology
Last synced: 2 months ago
JSON representation
Barebone implementation of a Language Server Protocol for Zettelkasten
- Host: GitHub
- URL: https://github.com/danymat/lsp-zettelkasten
- Owner: danymat
- Created: 2021-05-06T15:36:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-06T15:32:04.000Z (over 3 years ago)
- Last Synced: 2024-08-09T17:30:27.702Z (5 months ago)
- Topics: language-server, language-server-protocol, lsp, obsidian, obsidian-md, zettelkasten, zettelkasten-methodology
- Language: TypeScript
- Homepage:
- Size: 4.48 MB
- Stars: 18
- Watchers: 6
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lsp-zettelkasten
This repo is a basic implementation of a lsp for zettelkasten markdown files
![movie-1](https://github.com/lsp-zettelkasten/lsp-zettelkasten/blob/main/.assets/vid1.mov)
## Features
- ✔️ Support for link completion for type `[[link here]]`.
- 🚧 Clickable links inside `[[..]]`.
- ✔️ Support for file content preview in completion (with onCompletionResolve).
- 🚧 Hover option on clickable links, in order to preview the file.
- 🚧 Support tag completions with `#` character (needs a grammar).## Installation
```bash
git clone https://github.com/lsp-zettelkasten/lsp-zettelkasten.git
cd lsp-zettelkasten/server
npm install
npm run compile
```After compiling, the compiled javascript will be in `out` directory.
## Usage
The command to start the lsp is `node out/server.js --stdio`.
However, you'll need a working client for your text editor.
- Neovim (using [lspconfig](https://github.com/lsp-zettelkasten/lsp-zettelkasten.git))
~/.config/nvim/init.lua
```lua
local lspconfig = require'lspconfig'
local configs = require'lspconfig/configs'if not lspconfig.zettelkastenlsp then
configs.zettelkastenlsp = {
default_config = {
cmd = {'node', 'path/to/lsp-zettelkasten/out/server.js', '--stdio'};
filetypes = {'markdown'};
root_dir = function(fname)
return lspconfig.util.find_git_ancestor(fname) or vim.loop.os_homedir()
end;
settings = {};
};
}
end
lspconfig.zettelkastenlsp.setup{}
```