{"id":23004034,"url":"https://github.com/junkblocker/lsp_lines.nvim","last_synced_at":"2025-04-02T14:25:40.977Z","repository":{"id":268130709,"uuid":"870982607","full_name":"junkblocker/lsp_lines.nvim","owner":"junkblocker","description":"Show nvim diagnostics using virtual lines (Unofficial mirror)","archived":false,"fork":false,"pushed_at":"2024-12-22T17:15:59.000Z","size":391,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-08T05:28:02.328Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://git.sr.ht/~whynothugo/lsp_lines.nvim","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/junkblocker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-11T03:15:58.000Z","updated_at":"2024-12-22T17:16:02.000Z","dependencies_parsed_at":"2024-12-14T15:31:19.403Z","dependency_job_id":"7661172b-f0c1-4512-8adb-e484afe9b154","html_url":"https://github.com/junkblocker/lsp_lines.nvim","commit_stats":null,"previous_names":["junkblocker/lsp_lines.nvim"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkblocker%2Flsp_lines.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkblocker%2Flsp_lines.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkblocker%2Flsp_lines.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkblocker%2Flsp_lines.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junkblocker","download_url":"https://codeload.github.com/junkblocker/lsp_lines.nvim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246830406,"owners_count":20840812,"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":[],"created_at":"2024-12-15T07:16:56.278Z","updated_at":"2025-04-02T14:25:40.958Z","avatar_url":"https://github.com/junkblocker.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lsp_lines.nvim\n\n[Source](https://git.sr.ht/~whynothugo/lsp_lines.nvim) |\n[Issues](https://todo.sr.ht/~whynothugo/lsp_lines.nvim) |\n[Discussion/Patches](https://lists.sr.ht/~whynothugo/lsp_lines.nvim) |\n[Chat](irc://ircs.libera.chat:6697/#whynothugo) |\n[Sponsor](https://whynothugo.nl/sponsor/)\n\n`lsp_lines` is a simple neovim plugin that renders diagnostics using virtual\nlines on top of the real line of code.\n\n![A screenshot of the plugin in action](screenshot.png)\n\nFont is [Fira Code][font], a classic.\nTheme is [tokyonight.nvim][theme].\n\n[font]: https://github.com/tonsky/FiraCode\n[theme]: https://github.com/folke/tokyonight.nvim\n\n# Background\n\nLSPs provide lots of useful diagnostics for code (typically: errors, warnings,\nlinting). By default they're displayed using virtual text at the end of the\nline which in some situations might be good enough, but often the diagnostic\nsimply doesn't fit on screen. It's also quite common to have more than one\ndiagnostic per line, but there's no way to view more than the first.\n\n`lsp_lines` solves this issue.\n\n# Installation\n\nClone this repository into neovim's plug-in directory:\n\n    mkdir -p ~/.local/share/nvim/site/pack/plugins/start/\n    cd ~/.local/share/nvim/site/pack/plugins/start/\n    git clone git@git.sr.ht:~whynothugo/lsp_lines.nvim\n\nYou may also use a plug-in manager that does this for you.\n\n## With packer.nvim\n\nUsing packer.nvim (this should probably be registered _after_ `lspconfig`):\n\n```lua\nuse({\n  \"https://git.sr.ht/~whynothugo/lsp_lines.nvim\",\n  config = function()\n    require(\"lsp_lines\").setup()\n  end,\n})\n```\n\n# Setup\n\nWhen using this plug-in, the regular virtual text diagnostics becomes\nredundant. It is recommended to disable it:\n\n```lua\n-- Disable virtual_text since it's redundant due to lsp_lines.\nvim.diagnostic.config({\n  virtual_text = false,\n})\n```\n\n# Usage\n\nThis plugin's functionality can be disabled with:\n\n```lua\nvim.diagnostic.config({ virtual_lines = false })\n```\n\nAnd it can be re-enabled via:\n\n```lua\nvim.diagnostic.config({ virtual_lines = true })\n```\n\nTo show virtual lines only for the current line's diagnostics:\n\n```lua\nvim.diagnostic.config({ virtual_lines = { only_current_line = true } })\n```\n\nIf you don't want to highlight the entire diagnostic line, use:\n\n```lua\nvim.diagnostic.config({ virtual_lines = { highlight_whole_line = false } })\n```\n\nA helper is also provided to toggle, which is convenient for mappings:\n\n```lua\nvim.keymap.set(\n  \"\",\n  \"\u003cLeader\u003el\",\n  require(\"lsp_lines\").toggle,\n  { desc = \"Toggle lsp_lines\" }\n)\n```\n\n# Development\n\nIt would be nice to show connecting lines when there's relationship between\ndiagnostics (as is the case with `rust_analyzer`). Or perhaps surface them via\n`vim.lsp.buf.hover`.\n\n# Licence\n\nThis project is licensed under the ISC licence. See LICENCE for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunkblocker%2Flsp_lines.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunkblocker%2Flsp_lines.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunkblocker%2Flsp_lines.nvim/lists"}