{"id":40288740,"url":"https://github.com/rochacbruno/doc_lsp","last_synced_at":"2026-01-20T04:35:50.977Z","repository":{"id":310547718,"uuid":"1040215991","full_name":"rochacbruno/doc_lsp","owner":"rochacbruno","description":"Document variables in a separate md text file and this LSP will show the docs on your editor.","archived":false,"fork":false,"pushed_at":"2025-08-20T20:14:24.000Z","size":480,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-14T23:56:17.802Z","etag":null,"topics":["configuration","documentation","language-server-protocol","lsp","lsp-server","markdown","settings","vim-lsp","vscode-extension","vscode-lsp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rochacbruno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-18T16:21:08.000Z","updated_at":"2025-09-12T10:04:45.000Z","dependencies_parsed_at":"2025-08-18T20:40:28.245Z","dependency_job_id":"f6217b75-2791-463a-b4dc-8e0d873af2fc","html_url":"https://github.com/rochacbruno/doc_lsp","commit_stats":null,"previous_names":["rochacbruno/doc_lsp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rochacbruno/doc_lsp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochacbruno%2Fdoc_lsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochacbruno%2Fdoc_lsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochacbruno%2Fdoc_lsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochacbruno%2Fdoc_lsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rochacbruno","download_url":"https://codeload.github.com/rochacbruno/doc_lsp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochacbruno%2Fdoc_lsp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28596081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration","documentation","language-server-protocol","lsp","lsp-server","markdown","settings","vim-lsp","vscode-extension","vscode-lsp"],"created_at":"2026-01-20T04:35:50.915Z","updated_at":"2026-01-20T04:35:50.970Z","avatar_url":"https://github.com/rochacbruno.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# doc-lsp\n\n[![Tests](https://github.com/rochacbruno/doc_lsp/actions/workflows/test.yml/badge.svg)](https://github.com/rochacbruno/doc_lsp/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/rochacbruno/doc_lsp/graph/badge.svg?token=YOUR_TOKEN)](https://codecov.io/gh/rochacbruno/doc_lsp)\n[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n[![License](https://img.shields.io/github/license/rochacbruno/doc_lsp)](https://github.com/rochacbruno/doc_lsp/blob/main/LICENSE)\n\ndoc-lsp is a simple specification and LSP (Language Server) that loads comments from a separate file.\n\nDocument variables in a separate markdown file and this LSP will show the docs on your editor.\n\nWorks on:\n\n- Python\n- YAML\n- JSON\n- TOML\n- INI\n- Properties\n- Conf\n- .env files\n- and more...\n\n![doc-lsp](./screenshot.png)\n\n## Standard\n\nAssuming a file named `settings.py` \n\n```py\nSERVER = \"localhost\"\nPORT = 4545\n```\n\nOr a `config.conf`\n\n```conf\nmax_open_windows    true\nfont_size           18\n```\n\nThen the LSP will lookup information about each variable on a separate file.\n\n`settings.py.md`\n```markdown\n## SERVER\n\u003e This variable defines which server the system is connected to,         \n\u003e when used together with port this will define the connection string.   \n\u003e example: `hostname:port`                                             \n\n## PORT\n\u003e Port used to connect ot server\n\n```\n\n`config.conf.md`\n```markdown\n## max_open_windows\n\u003e This variable is used to set how many multiple tiles can be opened\n\u003e at the same time.\n\n## font_size = 18\n\u003e Set the default size for the system font.\n```\n\n## Usage\n\nWith the LSP Server `doc-lsp` enabled on your editor,\nhaving the variable selected or with cursor focus, trigger the action `view_doc` \nand the editor will show the overlay with the full text from the respective comment file.\n\n`|` = mouse cursor position\n```py\nSERV|ER = \"foo\"\n```\n\nHovering the mouse over the variable will show the documentation.\n\n```plain\nSERV|ER = \"foo\"\n    _________________________________________________________________________\n    | SERVER                                                                  |\n    | This variable defines which server the system is connected to,         |\n    | when used together with port this will define the connection string.   |\n    | example: `hostname:port`                                               |\n    _________________________________________________________________________\n```\n\nIf the `settings.py.md` does not exist, then the action will be NOOP and just emit a INFO `Doc not found for variable`.\n\n\n## Installation\n\n### Install the Language Server\n\n```bash\n# Using pip\npip install doc-lsp\n\n# Using uv\nuv tool install doc-lsp\n\n# From source\ngit clone https://github.com/rochacbruno/doc_lsp.git\ncd doc_lsp\nuv pip install -e .\n```\n\n### Editor Integration\n\n#### VS Code Extension\n\nThe easiest way to use doc-lsp in VS Code is with the official extension:\n\n1. **Build and install the extension**:\n   ```bash\n   cd code/doc-lsp-vscode\n   npm install\n   npm run package\n   code --install-extension doc-lsp-*.vsix\n   ```\n\n2. **Configure** (optional):\n   ```json\n   {\n     \"docLsp.enabled\": true,\n     \"docLsp.serverPath\": \"doc-lsp\",\n     \"docLsp.additionalFileExtensions\": [\".cfg\", \".env\"]\n   }\n   ```\n\nSee [code/doc-lsp-vscode/README.md](code/doc-lsp-vscode/README.md) for detailed instructions.\n\n#### Generic LSP Proxy (Alternative for VS Code)\n\nYou can also use the [Generic LSP Proxy](https://marketplace.visualstudio.com/items?itemName=statiolake.vscode-generic-lsp-proxy) extension:\n\n1. Install the extension\n2. Create `.vscode/lsp-proxy.json` in your workspace (see example in `.vscode/lsp-proxy.json`)\n3. Reload VS Code\n\n#### Other Editors\n\ndoc-lsp implements the Language Server Protocol and can be used with any LSP-compatible editor.\n\nSee the comprehensive [Editor Setup Guide](EDITORS_SETUP.md) for detailed instructions on configuring:\n- **Helix** - Modern modal editor with built-in LSP support\n- **Neovim** - Using nvim-lspconfig\n- **Zed** - High-performance collaborative editor  \n- **Emacs** - Using lsp-mode or eglot\n- **Sublime Text** - Using LSP package\n- **Kate** - See dedicated [Kate Setup Guide](KATE_SETUP.md)\n\n## Implementation\n\n- The doc-lsp is implemented in Python\n- It is designed to run from `uv`\n- It will cache the documentation for each variable, so if the file is not changed, the documentation will be read from the cache, it can use `workspace/didChangeWatchedFiles` to invalidate the cache.\n\n## Specs\n\n- doc-lsp is filetype agnostic\n- doc-lsp lookup will match `filename.ext` -\u003e `filename.ext.md`\n- Lookup is made from the doc-lsp parser\n- The last occurence wins in case of duplication\n\n \nSee [./examples](examples) \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frochacbruno%2Fdoc_lsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frochacbruno%2Fdoc_lsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frochacbruno%2Fdoc_lsp/lists"}