A Neovim plugin that provides LSP features like code completion and diagnostics for embedded code blocks in documents.
Otter.nvim is a Neovim plugin that provides full Language Server Protocol (LSP) support for code embedded within documents like Markdown, Quarto, or Org files. It solves the problem of getting intelligent code assistance—such as completions, hover documentation, and diagnostics—for code blocks in multi-language notebooks by creating and synchronizing hidden buffers for each embedded language.
Neovim users who work with mixed-language documents containing executable code blocks, such as data scientists and researchers using Quarto notebooks, or developers writing technical documentation with embedded code examples.
Developers choose Otter.nvim because it seamlessly integrates with Neovim's native LSP ecosystem, requiring no special configuration or keybindings, and it provides accurate LSP features by maintaining synchronized hidden buffers that keep line numbers aligned.
Just ask an otter! 🦦
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages Neovim's native LSP ecosystem, allowing users to use standard keybindings like vim.lsp.buf.hover without extra configuration, as highlighted in the activation note about removing old keybindings.
Creates hidden buffers with aligned line numbers by inserting blank lines, ensuring precise LSP responses such as hover and definitions, a technique borrowed from Quarto's VS Code extension as explained in the README.
Supports LSP features for multiple programming languages within a single document, like providing completions for Python and R in Quarto markdown, demonstrated in the embedded demo video.
Offers flexible activation options, diagnostic update events, and export functionality for linting, with detailed setup and configuration examples in the README's opts table.
As admitted in the limitations section, otter-ls runs only in single file mode, so it cannot automatically handle cross-notebook renames or references, restricting use in multi-file projects.
The README explicitly states formatting requests are tricky and recommends using external tools like conform.nvim, indicating a gap in core functionality that requires additional setup.
Diagnostics are managed via autocommands instead of LSP requests, which the README notes could be more elegant and might lead to performance issues with frequent updates.