Fix names in code: [code]
- User
Fix names in code:
local function clone_github(repo) local dir = vim.fn.stdpath("data") .. "/site/pack/p/start/" .. repo:match("[^/]*$") if not vim.loop.fs_stat(dir) then vim.notify("Cloning " .. repo, vim.log.levels.INFO) vim.fn.jobstart({ "git", "clone", "--depth=1", "https://github.com/" .. repo, dir }) end end Assistant
To fix the names in the code, you should ensure that the function and variable names are clear and follow a consistent naming convention. Here's a revised version of the code:
local function clone_github_repository(repo_name) local repository_dir = vim.fn.stdpath("data") .. "/site/pack/p/start/" .. repo_name:match("[^/]*$") if not vim.loop.fs_stat(repository_dir) then vim.notify("Cloning " .. repo_name, vim.log.levels.INFO) vim.fn.jobstart({ "git", "clone", "--depth=1", "https://github.com/" .. repo_name, repository_dir }) end end
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.