{"id":13898258,"url":"https://github.com/bfrg/vim-qf-diagnostics","last_synced_at":"2025-04-09T19:24:12.354Z","repository":{"id":48475010,"uuid":"220322458","full_name":"bfrg/vim-qf-diagnostics","owner":"bfrg","description":"Highlight quickfix errors, and display error messages as virtual text or in a popup window","archived":false,"fork":false,"pushed_at":"2024-07-26T22:28:19.000Z","size":162,"stargazers_count":27,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T21:22:44.412Z","etag":null,"topics":["vim","vim-plugin","vim-qf","vim9script"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bfrg.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":"2019-11-07T20:22:52.000Z","updated_at":"2024-10-12T17:58:53.000Z","dependencies_parsed_at":"2024-07-26T23:44:46.505Z","dependency_job_id":null,"html_url":"https://github.com/bfrg/vim-qf-diagnostics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-qf-diagnostics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-qf-diagnostics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-qf-diagnostics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfrg%2Fvim-qf-diagnostics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfrg","download_url":"https://codeload.github.com/bfrg/vim-qf-diagnostics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248096310,"owners_count":21047022,"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":["vim","vim-plugin","vim-qf","vim9script"],"created_at":"2024-08-06T18:04:11.610Z","updated_at":"2025-04-09T19:24:12.333Z","avatar_url":"https://github.com/bfrg.png","language":"Vim Script","funding_links":[],"categories":["Vim Script","Quickfix"],"sub_categories":[],"readme":"# vim-qf-diagnostics\n\n- Highlight the locations in the quickfix list (errors of a project-build,\n  linter, or locations of a `grep` search) in the sign column, and in the text\n  using `text-properties` (top left screenshot).\n- Display the error messages next to the lines containing the errors using\n  `virtual-text` (bottom screenshot).\n- Show the error messages for the current line in a popup window next to the\n  cursor (top right screenshot).\n\n![screenshot1](https://user-images.githubusercontent.com/6266600/203570744-ad5db96a-30c0-44e6-aa87-780ac3ffd5a1.png)\n![screenshot2](https://user-images.githubusercontent.com/6266600/203899380-ae800092-3c91-45e3-9c84-2e224dd24b65.png)\n\n\n## Usage\n\n### Signs, text-highlightings and virtual text\n\nThe locations in the quickfix and/or location list can be highlighted in the\nsign column and in the buffer using text-properties. Optionally, the error\nmessage can be displayed as virtual text next to the line containing the error.\nSigns, text-highlightings and virtual text are all optional and can be\nindividually turned off in [`g:qfdiagnostics`](#configuration).\n\n| Command                 | Description                                                                            |\n| ----------------------- | -------------------------------------------------------------------------------------- |\n| `:DiagnosticsPlace`     | Highlight the diagnostics from the _current_ quickfix list.                            |\n| `:LDiagnosticsPlace`    | Same as `:DiagnosticsPlace` but use the _current_ location list of the current window. |\n| `:DiagnosticsClear`     | Remove the highlightings placed by `:DiagnosticsPlace`.                                |\n| `:LDiagnosticsClear[!]` | Remove the highlightings placed by `:LDiagnosticsPlace`.                               |\n| `:DiagnosticsToggle`    | Toggle the diagnostics from the _current_ quickfix list.                               |\n| `:LDiagnosticsToggle`   | Toggle the diagnostics from the _current_ location list.                               |\n\n**Notes:**\n* `:DiagnosticsPlace` and `:LDiagnosticsPlace` first remove all highlightings\n  that have previously been placed by the same command.\n* `:LDiagnosticsPlace` can be run in multiple windows to simultaneously\n  highlight diagnostics from several location lists.\n* `:LDiagnosticsClear` must be run in the same window where `:LDiagnosticsPlace`\n  has been executed to remove the previously placed diagnostics.\n* To remove the highlightings of all diagnostics from all location lists at\n  once, run `:LDiagnosticsClear!`.\n\n#### Examples\n\n1. Toggle the diagnostics of the quickfix and location lists with \u003ckbd\u003eF7\u003c/kbd\u003e\n   and \u003ckbd\u003eF8\u003c/kbd\u003e, respectively:\n   ```vim\n   nnoremap \u003cF7\u003e \u003cCmd\u003eDiagnosticsToggle\u003cCr\u003e\n   nnoremap \u003cF8\u003e \u003cCmd\u003eLDiagnosticsToggle\u003cCr\u003e\n   ```\n2. To place diagnostics automatically after running `:make` or `:lmake`, add the\n   following to your `vimrc`:\n   ```vim\n   augroup qf-diagnostics-user\n       autocmd!\n       autocmd QuickfixCmdPost  make  DiagnosticsPlace\n       autocmd QuickfixCmdPost lmake LDiagnosticsPlace\n   augroup END\n   ```\n   **Note:** it is not necessary to run `DiagnosticsClear` first, since\n   `DiagnosticsPlace` automatically clears previously placed highlightings\n   before adding new ones.\n\n### Popup window\n\nUsers who find virtual text too distracting can instead use a popup window for\ndisplaying error messages. The following `\u003cplug\u003e` mappings are provided:\n\n* **`\u003cplug\u003e(qf-diagnostics-popup-quickfix)`** — Display a popup window at the\n  current cursor position with the error message found for the current line in\n  the `quickfix` list. If the line contains several errors, all entries are\n  collected and displayed in the same popup window.\n* **`\u003cplug\u003e(qf-diagnostics-popup-loclist)`** — Same as above but display the\n  error messages from the current `location-list` of the current window.\n\nIf not all errors in the current line fit into the popup window, a scrollbar\nwill appear on the right side. The popup window can then be scrolled with\n\u003ckbd\u003eCTRL-J\u003c/kbd\u003e and \u003ckbd\u003eCTRL-K\u003c/kbd\u003e, or alternatively, using the mouse\nwheel. Pressing \u003ckbd\u003eCTRL-C\u003c/kbd\u003e or moving the cursor in any direction will\nclose the popup window.\n\n#### Examples\n\n```vim\nnmap gh \u003cplug\u003e(qf-diagnostics-popup-quickfix)\nnmap gH \u003cplug\u003e(qf-diagnostics-popup-loclist)\n```\nMnemonic: _go hover_\n\n\n## Configuration\n\nThe appearance of the popup window, signs, text-highlightings and virtual text\ncan be configured through `g:qfdiagnostics`. For all supported entries, see\n`:help g:qfdiagnostics`, as well as `:help qf-diagnostics-examples` for a few\nexamples.\n\nAll highlighting groups used in the popup window are described in `:help\nqf-dagnostics-popup-highlight`.\n\n\n## Installation\n\n```bash\n$ cd ~/.vim/pack/git-plugins/start\n$ git clone https://github.com/bfrg/vim-qf-diagnostics\n$ vim -u NONE -c 'helptags vim-qf-diagnostics/doc | quit'\n```\n**Note:** The directory name `git-plugins` is arbitrary, you can pick any other\nname. For more details see `:help packages`. Alternatively, use your favorite\nplugin manager.\n\n\n## License\n\nDistributed under the same terms as Vim itself. See `:help license`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfrg%2Fvim-qf-diagnostics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfrg%2Fvim-qf-diagnostics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfrg%2Fvim-qf-diagnostics/lists"}