{"id":13575847,"url":"https://github.com/LiadOz/nvim-dap-repl-highlights","last_synced_at":"2025-04-04T23:30:49.534Z","repository":{"id":161148715,"uuid":"630820433","full_name":"LiadOz/nvim-dap-repl-highlights","owner":"LiadOz","description":"Add syntax highlighting to the nvim-dap REPL","archived":false,"fork":false,"pushed_at":"2024-05-19T07:57:43.000Z","size":302,"stargazers_count":121,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-05T11:44:16.891Z","etag":null,"topics":["debug-adapter-protocol","neovim","neovim-plugin"],"latest_commit_sha":null,"homepage":"","language":"C","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/LiadOz.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":"2023-04-21T08:19:34.000Z","updated_at":"2024-11-04T13:13:42.000Z","dependencies_parsed_at":"2024-05-19T08:38:47.893Z","dependency_job_id":"775e7fec-e282-48f1-8b59-02f405503cad","html_url":"https://github.com/LiadOz/nvim-dap-repl-highlights","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/LiadOz%2Fnvim-dap-repl-highlights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiadOz%2Fnvim-dap-repl-highlights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiadOz%2Fnvim-dap-repl-highlights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiadOz%2Fnvim-dap-repl-highlights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LiadOz","download_url":"https://codeload.github.com/LiadOz/nvim-dap-repl-highlights/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266474,"owners_count":20910831,"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":["debug-adapter-protocol","neovim","neovim-plugin"],"created_at":"2024-08-01T15:01:04.749Z","updated_at":"2025-04-04T23:30:45.293Z","avatar_url":"https://github.com/LiadOz.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# nvim-dap-repl-highlights\nAdd syntax highlighting to the [nvim-dap](https://github.com/mfussenegger/nvim-dap) REPL buffer using treesitter.\n| Before                                                                                                          | After                                                                                                          |\n| --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| ![before](https://user-images.githubusercontent.com/20954878/235993939-a3ad95eb-9dfa-41a4-b70e-3a4e890e2adf.png) | ![image](https://user-images.githubusercontent.com/20954878/235993604-642fe658-6cc9-40e0-846c-00df11d963e1.png)|\n\n## Requirements\n* Neovim 0.9 or later\n* [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)\n\n## Setup\nInstall the plugin and the requirements using your favourite method. Once installed, make sure you configured treesitter [highlighting](https://github.com/nvim-treesitter/nvim-treesitter#modules) then add the following to your lua config\n```lua\nrequire('nvim-dap-repl-highlights').setup()\n```\nAfter initially setting up the plugin the dap_repl parser needs to be installed, this can be done manually by running `:TSInstall dap_repl` or by using the `ensure_installed` option of nvim-treesitter.\n**NOTE:** If you use the `ensure_installed` option you must first setup `nvim-dap-repl-highlights` or else the `dap_repl` parser won't be found, for example\n```lua\nrequire('nvim-dap-repl-highlights').setup()\nrequire('nvim-treesitter.configs').setup {\n  highlight = {\n    enable = true,\n  },\n  ensure_installed = { 'dap_repl', ... },\n  ...\n}\n```\n\n## Usage\nBy default, the plugin detects the language to use in the REPL by looking at the **filetype** used to to launch dap. Obviously in order to have syntax highlighting for certain language you will need to have a treesitter parser for that language, alongside the `dap_repl` parser.\nThis may not fit all use cases.\n\nYou could instead use the command `:lua require('nvim-dap-repl-highlights').setup_highlights('python')` which will set python highlights in the current repl buffer. \nAlternatively the function can be called without specifiying the language, this will prompt the user for a language.\n\nAdditionally you could specify in the **dap** configuration the repl language to use, for example if you want your python repl to have javascript highlighting:\n```lua\nlocal dap = require('dap')\ndap.configurations.python = {\n  {\n    name = \"Python with javascript repl because I like to watch the world burn 🔥🔥🔥\",\n    type = \"python\",\n    request = \"launch\",\n    program = \"${file}\",\n    repl_lang = \"javascript\"\n  },\n}\n```\nThe repl_lang option takes precedence over the filetype.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLiadOz%2Fnvim-dap-repl-highlights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLiadOz%2Fnvim-dap-repl-highlights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLiadOz%2Fnvim-dap-repl-highlights/lists"}