docs: expand Neovim LSP setup with step-by-step guide and keymaps
This commit is contained in:
parent
2307891d0d
commit
61c4c00a57
1 changed files with 19 additions and 0 deletions
19
README.md
19
README.md
|
|
@ -155,6 +155,8 @@ The `"..."` keeps Zed's default Markdown servers (e.g. `marksman`) active alongs
|
|||
|
||||
### Neovim (nvim-lspconfig)
|
||||
|
||||
**1. Register the server** — add to your Neovim config (e.g. `~/.config/nvim/init.lua` or a plugin file):
|
||||
|
||||
```lua
|
||||
local lspconfig = require('lspconfig')
|
||||
local configs = require('lspconfig.configs')
|
||||
|
|
@ -173,6 +175,23 @@ end
|
|||
lspconfig.streamd.setup {}
|
||||
```
|
||||
|
||||
The server activates automatically when Neovim opens a Markdown file inside a directory that contains a `.streamd.toml` file.
|
||||
|
||||
**2. Using LSP features** — standard Neovim LSP keymaps apply (`:help lsp`):
|
||||
|
||||
| Action | Default keymap | Notes |
|
||||
|---|---|---|
|
||||
| Trigger `@` completions | `<C-x><C-o>` (insert mode) | Or via your completion plugin (`nvim-cmp`, `blink.cmp`, …) |
|
||||
| Show diagnostics for current line | `<C-w>d` / `gl` | File-name format warnings, timesheet errors |
|
||||
| Jump to next / previous diagnostic | `]d` / `[d` | Navigate between warnings |
|
||||
| Code actions (mark task as done) | `<leader>ca` (Neovim ≥ 0.10) | Place cursor on a line with `@Task` |
|
||||
| Rename marker across all files | `<leader>cr` / `grn` | Renames the `@Marker` under the cursor everywhere |
|
||||
| Find all references to a marker | `grr` / `<leader>fr` | Lists every occurrence of `@Marker` across the workspace |
|
||||
| Document outline (shard tree) | `:lua vim.lsp.buf.document_symbol()` | Or via Telescope: `:Telescope lsp_document_symbols` |
|
||||
| Workspace symbol search | `:lua vim.lsp.buf.workspace_symbol()` | Or via Telescope: `:Telescope lsp_workspace_symbols` |
|
||||
|
||||
> **Note:** default keymaps (`grn`, `grr`, `<C-w>d`, `]d`/`[d`) are available from Neovim 0.10+. On older versions use `:lua vim.lsp.buf.*` commands or set up keymaps manually in your `on_attach` callback.
|
||||
|
||||
### 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