{"id":13413037,"url":"https://github.com/esensar/nvim-dev-container","last_synced_at":"2025-05-15T14:06:58.423Z","repository":{"id":37862265,"uuid":"489638108","full_name":"esensar/nvim-dev-container","owner":"esensar","description":"Neovim dev container support - Mirror of https://codeberg.org/esensar/nvim-dev-container","archived":false,"fork":false,"pushed_at":"2025-04-29T07:10:42.000Z","size":268,"stargazers_count":626,"open_issues_count":10,"forks_count":17,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-15T14:06:47.489Z","etag":null,"topics":["containers","devcontainer","docker","lua","neovim"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":false,"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/esensar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"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,"zenodo":null},"funding":{"liberapay":"esensar"}},"created_at":"2022-05-07T10:09:17.000Z","updated_at":"2025-05-13T12:36:06.000Z","dependencies_parsed_at":"2022-07-20T13:48:12.073Z","dependency_job_id":"e72c085d-ad03-4553-b03c-e245aac469ac","html_url":"https://github.com/esensar/nvim-dev-container","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esensar%2Fnvim-dev-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esensar%2Fnvim-dev-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esensar%2Fnvim-dev-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esensar%2Fnvim-dev-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esensar","download_url":"https://codeload.github.com/esensar/nvim-dev-container/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355335,"owners_count":22057354,"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":["containers","devcontainer","docker","lua","neovim"],"created_at":"2024-07-30T20:01:32.642Z","updated_at":"2025-05-15T14:06:53.388Z","avatar_url":"https://github.com/esensar.png","language":"Lua","readme":"# devcontainer\n\n[![Dotfyle](https://dotfyle.com/plugins/esensar/nvim-dev-container/shield)](https://dotfyle.com/plugins/esensar/nvim-dev-container)\n[![License](https://img.shields.io/badge/license-MIT-brightgreen)](/LICENSE)\n[![status-badge](https://ci.codeberg.org/api/badges/8585/status.svg)](https://ci.codeberg.org/repos/8585)\n\nGoal of this plugin is to provide functionality similar to VSCode's [remote container development](https://code.visualstudio.com/docs/remote/containers) plugin and other functionality that enables development in docker container. This plugin is inspired by [jamestthompson3/nvim-remote-containers](https://github.com/jamestthompson3/nvim-remote-containers), but aims to enable having neovim embedded in docker container.\n\n**NOTE:** If you do not have an account registered and do not want to register one, you can use mailing lists to report bugs, discuss the project and send patches:\n - [discussions mailing list](https://lists.sr.ht/~esensar/nvim-dev-container-discuss)\n - [development mailing list](https://lists.sr.ht/~esensar/nvim-dev-container-devel)\n\n**WORK IN PROGRESS**\n\n[![asciicast](https://asciinema.org/a/JFwfoaBQwYoR7f5w0GuFPZDj8.svg)](https://asciinema.org/a/JFwfoaBQwYoR7f5w0GuFPZDj8)\n\n## Requirements\n\n- [NeoVim](https://neovim.io) version 0.9.0+ (previous versions may be supported, but are not tested - commands and autocommands will definitely fail)\n- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) with included `jsonc` parser (or manually installed jsonc parser)\n\n## Installation\n\nInstall using favourite plugin manager.\n\ne.g. Using [lazy.nvim](https://github.com/folke/lazy.nvim)\n\n```lua\n{\n  'https://codeberg.org/esensar/nvim-dev-container',\n  dependencies = 'nvim-treesitter/nvim-treesitter'\n}\n```\n\nor assuming `nvim-treesitter` is already available:\n\n```lua\n{ 'https://codeberg.org/esensar/nvim-dev-container' }\n```\n\n## Usage\n\nTo use the plugin with defaults just call the `setup` function:\n\n```lua\nrequire(\"devcontainer\").setup{}\n```\n\nIt is possible to override some of the functionality of the plugin with options passed into `setup`. Everything passed to `setup` is optional. Following block represents default values:\n\n```lua\nrequire(\"devcontainer\").setup {\n  config_search_start = function()\n    -- By default this function uses vim.loop.cwd()\n    -- This is used to find a starting point for .devcontainer.json file search\n    -- Since by default, it is searched for recursively\n    -- That behavior can also be disabled\n  end,\n  workspace_folder_provider = function()\n    -- By default this function uses first workspace folder for integrated lsp if available and vim.loop.cwd() as a fallback\n    -- This is used to replace `${localWorkspaceFolder}` in devcontainer.json\n    -- Also used for creating default .devcontainer.json file\n  end,\n  terminal_handler = function(command)\n    -- By default this function creates a terminal in a new tab using :terminal command\n    -- It also removes statusline when that tab is active, to prevent double statusline\n    -- It can be overridden to provide custom terminal handling\n  end,\n  nvim_installation_commands_provider = function(path_binaries, version_string)\n    -- Returns table - list of commands to run when adding neovim to container\n    -- Each command can either be a string or a table (list of command parts)\n    -- Takes binaries available in path on current container and version_string passed to the command or current version of neovim\n  end,\n  devcontainer_json_template = function()\n    -- Returns table - list of lines to set when creating new devcontainer.json files\n    -- As a template\n    -- Used only when using functions from commands module or created commands\n  end,\n  -- Can be set to false to prevent generating default commands\n  -- Default commands are listed below\n  generate_commands = true,\n  -- By default no autocommands are generated\n  -- This option can be used to configure automatic starting and cleaning of containers\n  autocommands = {\n    -- can be set to true to automatically start containers when devcontainer.json is available\n    init = false,\n    -- can be set to true to automatically remove any started containers and any built images when exiting vim\n    clean = false,\n    -- can be set to true to automatically restart containers when devcontainer.json file is updated\n    update = false,\n  },\n  -- can be changed to increase or decrease logging from library\n  log_level = \"info\",\n  -- can be set to true to disable recursive search\n  -- in that case only .devcontainer.json and .devcontainer/devcontainer.json files will be checked relative\n  -- to the directory provided by config_search_start\n  disable_recursive_config_search = false,\n  -- can be set to false to disable image caching when adding neovim\n  -- by default it is set to true to make attaching to containers faster after first time\n  cache_images = true,\n  -- By default all mounts are added (config, data and state)\n  -- This can be changed to disable mounts or change their options\n  -- This can be useful to mount local configuration\n  -- And any other mounts when attaching to containers with this plugin\n  attach_mounts = {\n    neovim_config = {\n      -- enables mounting local config to /root/.config/nvim in container\n      enabled = false,\n      -- makes mount readonly in container\n      options = { \"readonly\" }\n    },\n    neovim_data = {\n      -- enables mounting local data to /root/.local/share/nvim in container\n      enabled = false,\n      -- no options by default\n      options = {}\n    },\n    -- Only useful if using neovim 0.8.0+\n    neovim_state = {\n      -- enables mounting local state to /root/.local/state/nvim in container\n      enabled = false,\n      -- no options by default\n      options = {}\n    },\n  },\n  -- This takes a list of mounts (strings) that should always be added to every run container\n  -- This is passed directly as --mount option to docker command\n  -- Or multiple --mount options if there are multiple values\n  always_mount = {},\n  -- This takes a string (usually either \"podman\" or \"docker\") representing container runtime - \"devcontainer-cli\" is also partially supported\n  -- That is the command that will be invoked for container operations\n  -- If it is nil, plugin will use whatever is available (trying \"podman\" first)\n  container_runtime = nil,\n  -- Similar to container runtime, but will be used if main runtime does not support an action - useful for \"devcontainer-cli\"\n  backup_runtime = nil,\n  -- This takes a string (usually either \"podman-compose\" or \"docker-compose\") representing compose command - \"devcontainer-cli\" is also partially supported\n  -- That is the command that will be invoked for compose operations\n  -- If it is nil, plugin will use whatever is available (trying \"podman-compose\" first)\n  compose_command = nil,\n  -- Similar to compose command, but will be used if main command does not support an action - useful for \"devcontainer-cli\"\n  backup_compose_command = nil,\n}\n```\n\nCheck out [wiki](https://codeberg.org/esensar/nvim-dev-container/wiki) for more information.\n\n### Commands\n\nIf not disabled by using `generate_commands = false` in setup, this plugin provides the following commands:\n\n- `DevcontainerStart` - start whatever is defined in devcontainer.json\n- `DevcontainerAttach` - attach to whatever is defined in devcontainer.json\n- `DevcontainerExec` - execute a single command on container defined in devcontainer.json\n- `DevcontainerStop` - stop whatever was started based on devcontainer.json\n- `DevcontainerStopAll` - stop everything started with this plugin (in current session)\n- `DevcontainerRemoveAll` - remove everything started with this plugin (in current session)\n- `DevcontainerLogs` - open plugin log file\n- `DevcontainerEditNearestConfig` - opens nearest devcontainer.json file if it exists, or creates a new one if it does not\n\n### Functions\n\nCheck out [:h devcontainer](doc/devcontainer.txt) for full list of functions.\n\n## Contributing\n\nCheck out [contributing guidelines](CONTRIBUTING.md).\n\n## License\n\n[MIT](LICENSE)\n","funding_links":["https://liberapay.com/esensar"],"categories":["Remote Development","Lua"],"sub_categories":["Indent"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesensar%2Fnvim-dev-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesensar%2Fnvim-dev-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesensar%2Fnvim-dev-container/lists"}