fix: resolve clippy warnings in lsp module
- Replace map_or(false, ...) with is_none_or(... !=) - Replace explicit auto-derefs (&*Static) with auto-deref (&Static) - Refactor range-indexed loop to iterator with enumerate + skip/take - Suppress deprecated root_path field with allow(deprecated) docs: update README and REQUIREMENTS for streamd lsp - Add streamd lsp to commands table in README - Add Editor Integration section with Zed, Neovim, VS Code snippets - Add R25 LSP requirements (R25a–R25e) to REQUIREMENTS.md
This commit is contained in:
parent
448cf31b39
commit
d0316e8dac
3 changed files with 129 additions and 6 deletions
66
README.md
66
README.md
|
|
@ -69,6 +69,7 @@ Within files, `@`-prefixed markers at the beginning of paragraphs or headings de
|
|||
- `streamd todo --show-future` — Include tasks with future dates in the listing
|
||||
- `streamd edit [number]` — Edit a stream file by index (most recent first)
|
||||
- `streamd timesheet` — Generate time reports from `@Timesheet` markers
|
||||
- `streamd lsp` — Start the LSP server (stdin/stdout transport; see [Editor Integration](#editor-integration) below)
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
@ -110,3 +111,68 @@ Running `streamd todo` finds all shards marked as open tasks and displays them n
|
|||
You can quickly edit or complete tasks by number:
|
||||
- `streamd todo 1 edit` opens task 1 in your editor at the correct line
|
||||
- `streamd todo 1 done` marks task 1 as done by inserting `@Done` after `@Task`
|
||||
|
||||
## Editor Integration
|
||||
|
||||
`streamd lsp` starts a Language Server Protocol server that provides IDE features for your stream markdown files. The server communicates over **stdin/stdout** and auto-activates only when a `.streamd.toml` file is present in the workspace root.
|
||||
|
||||
### Features
|
||||
|
||||
| Feature | Description |
|
||||
|---|---|
|
||||
| `@` completions | Suggests known markers from your config; conditional suggestions (e.g. `@Done` when `@Task` is on the line) |
|
||||
| Temporal snippets | `@` followed by a digit offers `YYYYMMDD` / `HHMMSS` format snippets |
|
||||
| Diagnostics | File-name format warnings (R15); timesheet errors (overlapping timecards, unclosed days) |
|
||||
| Document symbols | Shard tree exposed as outline symbols |
|
||||
| "Mark task as done" | Quick-fix code action: inserts `@Done` after `@Task` |
|
||||
| Workspace symbols | Search shards across all `.md` files |
|
||||
| References | Find all occurrences of an `@Marker` across the workspace |
|
||||
| Rename | Rename an `@Marker` across all files |
|
||||
|
||||
### Zed
|
||||
|
||||
Add to `~/.config/zed/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"languages": {
|
||||
"Markdown": {
|
||||
"language_servers": ["streamd-lsp", "..."]
|
||||
}
|
||||
},
|
||||
"lsp": {
|
||||
"streamd-lsp": {
|
||||
"binary": {
|
||||
"path": "streamd",
|
||||
"arguments": ["lsp"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The `"..."` keeps Zed's default Markdown servers (e.g. `marksman`) active alongside streamd.
|
||||
|
||||
### Neovim (nvim-lspconfig)
|
||||
|
||||
```lua
|
||||
local lspconfig = require('lspconfig')
|
||||
local configs = require('lspconfig.configs')
|
||||
|
||||
if not configs.streamd then
|
||||
configs.streamd = {
|
||||
default_config = {
|
||||
cmd = { 'streamd', 'lsp' },
|
||||
filetypes = { 'markdown' },
|
||||
root_dir = lspconfig.util.root_pattern('.streamd.toml'),
|
||||
single_file_support = false,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
lspconfig.streamd.setup {}
|
||||
```
|
||||
|
||||
### VS Code (tasks.json / manual)
|
||||
|
||||
Use any extension that lets you configure custom LSP servers, pointing `cmd` to `streamd lsp`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue