{"id":13412867,"url":"https://github.com/andersevenrud/nvim_context_vt","last_synced_at":"2025-04-05T05:06:19.854Z","repository":{"id":38835108,"uuid":"361270479","full_name":"andersevenrud/nvim_context_vt","owner":"andersevenrud","description":"Virtual text context for neovim treesitter","archived":false,"fork":false,"pushed_at":"2024-07-16T20:06:13.000Z","size":3181,"stargazers_count":376,"open_issues_count":5,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-29T18:07:36.259Z","etag":null,"topics":["context","context-clues","lua","neovim","neovim-plugin","treesitter","virtual-text"],"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/andersevenrud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"andersevenrud","patreon":"andersevenrud","custom":"https://paypal.me/andersevenrud"}},"created_at":"2021-04-24T21:28:49.000Z","updated_at":"2024-10-29T02:40:33.000Z","dependencies_parsed_at":"2024-01-03T03:32:24.699Z","dependency_job_id":"502357d3-eba8-425b-91fd-0b34619869a4","html_url":"https://github.com/andersevenrud/nvim_context_vt","commit_stats":null,"previous_names":["haringsrob/nvim_context_vt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersevenrud%2Fnvim_context_vt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersevenrud%2Fnvim_context_vt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersevenrud%2Fnvim_context_vt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersevenrud%2Fnvim_context_vt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andersevenrud","download_url":"https://codeload.github.com/andersevenrud/nvim_context_vt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289427,"owners_count":20914464,"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":["context","context-clues","lua","neovim","neovim-plugin","treesitter","virtual-text"],"created_at":"2024-07-30T20:01:30.374Z","updated_at":"2025-04-05T05:06:19.837Z","avatar_url":"https://github.com/andersevenrud.png","language":"Lua","funding_links":["https://github.com/sponsors/andersevenrud","https://patreon.com/andersevenrud","https://paypal.me/andersevenrud"],"categories":["Editing Support","Lua"],"sub_categories":["Scrollbar"],"readme":"# nvim_context_vt\n\nShows virtual text of the current context after functions, methods, statements, etc.\n\n![nvim_context_vt](https://user-images.githubusercontent.com/866743/128077347-051430c4-2c89-4161-aa48-5a5793ec8499.gif)\n\n## How to install\n\nUse your favourite package manager and install [treesitter](https://github.com/nvim-treesitter/nvim-treesitter)\nalongside this plugin. No configuration is required out of the box.\n\n## Advanced usage\n\nTo customize the behavior use the setup function:\n\n```lua\nrequire('nvim_context_vt').setup({\n  -- Enable by default. You can disable and use :NvimContextVtToggle to maually enable.\n  -- Default: true\n  enabled = true,\n\n  -- Override default virtual text prefix\n  -- Default: '--\u003e'\n  prefix = '',\n\n  -- Override the internal highlight group name\n  -- Default: 'ContextVt'\n  highlight = 'CustomContextVt',\n\n  -- Disable virtual text for given filetypes\n  -- Default: { 'markdown' }\n  disable_ft = { 'markdown' },\n\n  -- Disable display of virtual text below blocks for indentation based languages like Python\n  -- Default: false\n  disable_virtual_lines = false,\n\n  -- Same as above but only for spesific filetypes\n  -- Default: {}\n  disable_virtual_lines_ft = { 'yaml' },\n\n  -- How many lines required after starting position to show virtual text\n  -- Default: 1 (equals two lines total)\n  min_rows = 1,\n\n  -- Same as above but only for spesific filetypes\n  -- Default: {}\n  min_rows_ft = {},\n\n  -- Custom virtual text node parser callback\n  -- Default: nil\n  custom_parser = function(node, ft, opts)\n    local utils = require('nvim_context_vt.utils')\n\n    -- If you return `nil`, no virtual text will be displayed.\n    if node:type() == 'function' then\n      return nil\n    end\n\n    -- This is the standard text\n    return opts.prefix .. ' ' .. utils.get_node_text(node)[1]\n  end,\n\n  -- Custom node validator callback\n  -- Default: nil\n  custom_validator = function(node, ft, opts)\n    -- Internally a node is matched against min_rows and configured targets\n    local default_validator = require('nvim_context_vt.utils').default_validator\n    if default_validator(node, ft) then\n      -- Custom behaviour after using the internal validator\n      if node:type() == 'function' then\n        return false\n      end\n    end\n\n    return true\n  end,\n\n  -- Custom node virtual text resolver callback\n  -- Default: nil\n  custom_resolver = function(nodes, ft, opts)\n    -- By default the last node is used\n    return nodes[#nodes]\n  end,\n})\n```\n\n## Commands\n\n* `:NvimContextVtToggle` - Enable/disable context virtual text\n\n## Debug\n\nIf you don't see the expected context vitual text, run `:NvimContextVtDebug` to print out the\ncontext tree. Use this information to open a pull-request or an issue to add support.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersevenrud%2Fnvim_context_vt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandersevenrud%2Fnvim_context_vt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersevenrud%2Fnvim_context_vt/lists"}