{"id":13412478,"url":"https://github.com/luckasRanarison/nvim-devdocs","last_synced_at":"2025-03-14T18:31:38.119Z","repository":{"id":187523625,"uuid":"675191724","full_name":"luckasRanarison/nvim-devdocs","owner":"luckasRanarison","description":"Neovim DevDocs integration","archived":true,"fork":false,"pushed_at":"2024-05-22T18:00:47.000Z","size":608,"stargazers_count":266,"open_issues_count":14,"forks_count":20,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-01T15:38:31.399Z","etag":null,"topics":["devdocs","neovim","neovim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luckasRanarison.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}},"created_at":"2023-08-06T04:56:32.000Z","updated_at":"2024-09-25T23:00:41.000Z","dependencies_parsed_at":"2024-06-19T02:54:54.693Z","dependency_job_id":"6611cac9-4bd6-4308-9b46-420ea3bb1cb7","html_url":"https://github.com/luckasRanarison/nvim-devdocs","commit_stats":null,"previous_names":["luckasranarison/nvim-devdocs"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckasRanarison%2Fnvim-devdocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckasRanarison%2Fnvim-devdocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckasRanarison%2Fnvim-devdocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckasRanarison%2Fnvim-devdocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luckasRanarison","download_url":"https://codeload.github.com/luckasRanarison/nvim-devdocs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221495301,"owners_count":16832455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["devdocs","neovim","neovim-plugin"],"created_at":"2024-07-30T20:01:25.137Z","updated_at":"2024-10-26T04:30:41.253Z","avatar_url":"https://github.com/luckasRanarison.png","language":"Lua","funding_links":[],"categories":["Utility","Lua"],"sub_categories":["Cursorline"],"readme":"# nvim-devdocs\n\nnvim-devdocs is a plugin which brings [DevDocs](https://devdocs.io) documentations into neovim. Install, search and preview documentations directly inside neovim in markdown format with telescope integration. You can also use custom commands like [glow](https://github.com/charmbracelet/glow) to render the markdown for a better experience.\n\n## Preview\n\n![nvim-devdocs search](./.github/preview.png)\n\nUsing [glow](https://github.com/charmbracelet/glow) for rendering markdown:\n\n![nvim-devdocs with glow](./.github/preview-glow.png)\n\n## Features\n\n- Offline usage.\n\n- Search using Telescope.\n\n- Markdown rendering using custom commands.\n\n- Open in browser.\n\n- Internal search using the `K` key (see `:h K`).\n\n## Installation\n\nLazy:\n\n```lua\nreturn {\n  \"luckasRanarison/nvim-devdocs\",\n  dependencies = {\n    \"nvim-lua/plenary.nvim\",\n    \"nvim-telescope/telescope.nvim\",\n    \"nvim-treesitter/nvim-treesitter\",\n  },\n  opts = {}\n}\n```\n\nPacker:\n\n```lua\nuse {\n  \"luckasRanarison/nvim-devdocs\",\n  requires = {\n    \"nvim-lua/plenary.nvim\",\n    \"nvim-telescope/telescope.nvim\",\n    \"nvim-treesitter/nvim-treesitter\",\n  },\n  config = function()\n    require(\"nvim-devdocs\").setup()\n  end\n}\n```\n\nThe plugin uses treesitter API for converting HTML to markdown so make sure you have treesitter `html` parser installed.\n\nInside your treesitter configuration:\n\n```lua\n{\n  ensure_installed = { \"html\" },\n}\n```\n\n## Configuration\n\nHere is the default configuration:\n\n```lua\n{\n  dir_path = vim.fn.stdpath(\"data\") .. \"/devdocs\", -- installation directory\n  telescope = {}, -- passed to the telescope picker\n  filetypes = {\n    -- extends the filetype to docs mappings used by the `DevdocsOpenCurrent` command, the version doesn't have to be specified\n    -- scss = \"sass\",\n    -- javascript = { \"node\", \"javascript\" }\n  },\n  float_win = { -- passed to nvim_open_win(), see :h api-floatwin\n    relative = \"editor\",\n    height = 25,\n    width = 100,\n    border = \"rounded\",\n  },\n  wrap = false, -- text wrap, only applies to floating window\n  previewer_cmd = nil, -- for example: \"glow\"\n  cmd_args = {}, -- example using glow: { \"-s\", \"dark\", \"-w\", \"80\" }\n  cmd_ignore = {}, -- ignore cmd rendering for the listed docs\n  picker_cmd = false, -- use cmd previewer in picker preview\n  picker_cmd_args = {}, -- example using glow: { \"-s\", \"dark\", \"-w\", \"50\" }\n  mappings = { -- keymaps for the doc buffer\n    open_in_browser = \"\"\n  },\n  ensure_installed = {}, -- get automatically installed\n  after_open = function(bufnr) end, -- callback that runs after the Devdocs window is opened. Devdocs buffer ID will be passed in\n}\n```\n\n## Usage\n\nTo use the documentations from nvim-devdocs, you need to install it by executing `:DevdocsInstall`. The documentation is indexed and built during the download. Since the building process is done synchronously and may block input, you may want to download larger documents (more than 10MB) in headless mode: `nvim --headless +\"DevdocsInstall rust\"`.\n\n## Commands\n\nAvailable commands:\n\n- `DevdocsFetch`: Fetch DevDocs metadata.\n- `DevdocsInstall`: Install documentation, 0-n args.\n- `DevdocsUninstall`: Uninstall documentation, 0-n args.\n- `DevdocsOpen`: Open documentation in a normal buffer, 0 or 1 arg.\n- `DevdocsOpenFloat`: Open documentation in a floating window, 0 or 1 arg.\n- `DevdocsOpenCurrent`: Open documentation for the current filetype in a normal buffer.\n- `DevdocsOpenCurrentFloat`: Open documentation for the current filetype in a floating window.\n- `DevdocsToggle`: Toggle floating window.\n- `DevdocsUpdate`: Update documentation, 0-n args.\n- `DevdocsUpdateAll`: Update all documentations.\n\nCommands support completion, and the Telescope picker will be used when no argument is provided.\n\n## Lifecycle Hook\n\nAn `after_open` callback is supplied which accepts the buffer ID of the Devdocs window. It can be used for things like buffer-specific keymaps:\n\n```lua\nrequire('nvim-devdocs').setup({\n  -- ...\n  after_open = function(bufnr)\n    vim.api.nvim_buf_set_keymap(bufnr, 'n', '\u003cEsc\u003e', ':close\u003cCR\u003e', {})\n  end\n})\n```\n\n## TODO\n\n- More search options\n- External previewers.\n- More features.\n\n## Contributing\n\nThe HTML converter is still experimental, and not all documentation has been thoroughly tested yet. If you encounter rendering issues, feel free to submit an [issue](https://github.com/luckasRanarison/nvim-devdocs/issues).\n\nPull requests and feature requests are welcome!\n\n## Similar projects\n\n- [nvim-telescope-zeal-cli](https://gitlab.com/ivan-cukic/nvim-telescope-zeal-cli) Show Zeal documentation pages in Neovim Telescope.\n- [devdocs.vim](https://github.com/girishji/devdocs.vim) Offers similar features but uses vimscript and pandoc.\n\n## Credits\n\n- [The DevDocs project](https://github.com/freeCodeCamp/devdocs) for the documentations.\n- [devdocs.el](https://github.com/astoff/devdocs.el) for inspiration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FluckasRanarison%2Fnvim-devdocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FluckasRanarison%2Fnvim-devdocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FluckasRanarison%2Fnvim-devdocs/lists"}