{"id":13896067,"url":"https://github.com/tjdevries/vimterface.nvim","last_synced_at":"2025-07-19T07:10:46.806Z","repository":{"id":96940202,"uuid":"372914320","full_name":"tjdevries/vimterface.nvim","owner":"tjdevries","description":"An interface for plugins. Vaporware","archived":false,"fork":false,"pushed_at":"2021-10-25T20:49:04.000Z","size":10,"stargazers_count":24,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-02-01T23:51:07.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/tjdevries.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}},"created_at":"2021-06-01T17:40:04.000Z","updated_at":"2025-01-19T14:15:37.000Z","dependencies_parsed_at":"2023-03-13T16:21:13.859Z","dependency_job_id":null,"html_url":"https://github.com/tjdevries/vimterface.nvim","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/tjdevries%2Fvimterface.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjdevries%2Fvimterface.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjdevries%2Fvimterface.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjdevries%2Fvimterface.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tjdevries","download_url":"https://codeload.github.com/tjdevries/vimterface.nvim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238795367,"owners_count":19531726,"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-08-06T18:02:38.471Z","updated_at":"2025-02-14T06:31:28.650Z","avatar_url":"https://github.com/tjdevries.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# vimterface.nvim\n\nSome ideas about making plugins in neovim.\n\nCloser to \"declarative\" style but without introducing another language (`.json`, `.toml`, etc.)\nand allows for things like passing Lua functions, upvalues, required values, etc.\n\nGoals:\n- Easy to copy \u0026 paste in config to get defaults to configure\n- Declars settings, mappings, etc. from plugin and user.\n  - could be used to make GUI, validator, completion engine, etc.\n\n## Thoughts\n\n### Thoughts: Users\n\n`config/*.lua` gets sourced at startup, after loading.\n\nFor example, if you have a file: `config/plugin_one.lua`, this will configure a plugin\nregistered with the name `plugin_one` (plugin registration is talked about later, but end users\ndo not have to worry much about it).\n\n```lua\n-- file: `config/plugin_one.lua`\nreturn {\n  enabled = true,\n\n  -- Change settings of the plugin\n  settings = {\n    debug  = true,\n  },\n\n  -- Set the mappings\n  -- Other possible values could be: maps = { default = true }, or similar (not yet decided)\n  -- so that you just grab the default values for a plugin.\n  --\n  -- Invalid mapping names will error (or something like that)\n  maps = {\n    n = {\n      [\"\u003cspace\u003ekj\"] = \"TestPlugMappingOne\",\n    },\n  },\n}\n```\n\nOne special file in `config/*.lua`: `init.lua`.\n\nIf you have a `config/init.lua` then this file expects a slightly differen structure.\n\n```lua\nreturn {\n  plugin_one = {\n  },\n\n  plugin_two = {\n  },\n\n  ...\n}\n```\n\n### Thoughts: Plugin\n\n```lua\n-- Plugins could do something like this:\n\nlocal plugin = vim.plugin.register {\n  name = \"test_plug\",\n\n  -- Just some random values from nvim-compe\n  settings = {\n    debug = {\n      type = \"boolean\",\n      desc = \"Debug mode.\",\n      default = false,\n    },\n\n    source = {\n      type = \"table\",\n      desc = \"Sources configuration.\",\n      default = {\n        path = true,\n        buffer = true,\n      },\n      validator = function(t)\n        error \"validating\"\n      end,\n    },\n  },\n}\n\nlocal count = 0\n\nplugin:map {\n  name = \"TestPlugMappingOne\",\n  fn = function()\n    count = count + 1\n    print(\"Yoo, dawg, we did it: \" .. count)\n  end,\n  -- condition = ...\n  -- default = ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjdevries%2Fvimterface.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftjdevries%2Fvimterface.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjdevries%2Fvimterface.nvim/lists"}