{"id":41672019,"url":"https://github.com/gin-18/nvim","last_synced_at":"2026-02-03T11:05:00.738Z","repository":{"id":41478784,"uuid":"355095295","full_name":"gin-18/nvim","owner":"gin-18","description":"my neovim config for web development.","archived":false,"fork":false,"pushed_at":"2025-12-12T08:48:19.000Z","size":188,"stargazers_count":42,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-13T19:19:53.739Z","etag":null,"topics":["docer-compose","dockerfile","javascript","markdown","typescript","vue3"],"latest_commit_sha":null,"homepage":"","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/gin-18.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-04-06T07:19:38.000Z","updated_at":"2025-12-12T08:44:21.000Z","dependencies_parsed_at":"2024-05-06T10:51:23.173Z","dependency_job_id":"df0d203d-1462-47e9-8123-85e352db9e93","html_url":"https://github.com/gin-18/nvim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gin-18/nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-18%2Fnvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-18%2Fnvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-18%2Fnvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-18%2Fnvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gin-18","download_url":"https://codeload.github.com/gin-18/nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-18%2Fnvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29043776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docer-compose","dockerfile","javascript","markdown","typescript","vue3"],"created_at":"2026-01-24T18:00:33.439Z","updated_at":"2026-02-03T11:05:00.695Z","avatar_url":"https://github.com/gin-18.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"\u003e :warning: Note: 配置已修改，但是 README 未更新。\r\n\r\n# Neovim 配置\r\n\r\n\u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/nvim.png?raw=true\" alt=\"nvim\" /\u003e\r\n\r\n## 1. 依赖\r\n\r\n使用配置之前确保安装了以下软件包。\r\n\r\n```\r\n6. nerd-fonts\r\n7. fzf\r\n8. xclip\r\n9. ripgrep\r\n10. wget\r\n11. unzip\r\n```\r\n### Arch Linux 使用 pacman 和 yay 安装依赖\r\n\r\n```sh\r\nsudo pacman -S fzf ripgrep xclip\r\n\r\nyay -S nerd-fonts-fira-code\r\n```\r\n\r\n## 2. 使用本配置\r\n\r\n```sh\r\ngit clone https://github.com/GIN-18/nvim.git ~/.config/nvim\r\n```\r\n\r\n## 3. 快捷键\r\n\r\n| 快捷键            | 描述                           |\r\n|-------------------|--------------------------------|\r\n| `s`               | 保存                           |\r\n| `shift` `s`       | 保存退出                       |\r\n| `shift` `h`       | 光标移动到行首                 |\r\n| `shift` `l`       | 光标移动到行尾                 |\r\n| `shift` `j`       | 光标向下移动5行                |\r\n| `shift` `k`       | 光标向上移动5行                |\r\n| `space` `s` `l`   | 左右分屏，光标在左分屏         |\r\n| `space` `s` `j`   | 上下分屏，光标在下分屏         |\r\n| `shift` `alt` `h` | 光标移动到左分屏               |\r\n| `shift` `alt` `j` | 光标移动到下分屏               |\r\n| `shift` `alt` `k` | 光标移动到上分屏               |\r\n| `shift` `alt` `l` | 光标移动到右分屏               |\r\n| `shift` `up`      | 上下分屏时，增加分屏高度       |\r\n| `shift` `down`    | 上下分屏时，减少分屏高度       |\r\n| `shift` `left`    | 左右分屏时，增加分屏宽度       |\r\n| `shift` `right`   | 左右分屏时，减少分屏宽度       |\r\n| `space` `y` `c`   | 在可视模式下，复制到系统剪贴板 |\r\n| `space` `n` `h`   | 取消搜索结果的高亮             |\r\n| `space` `e` `v`   | 打开 `$MYVIMRC`                |\r\n\r\n在 `lua/core/keymaps.lua` 文件中可以修改快捷键的配置。\r\n\r\n## 4. 基本功能\r\n\r\n### :necktie: 插件管理器 - lazy.nvim\r\n\r\n**插件管理器地址**：[folke/lazy.nvim](https://github.com/folke/lazy.nvim)\r\n\r\n### :wrench: lsp 支持 - nvim-lspconfig\r\n\r\n**插件地址**：[neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)\r\n\r\n| 快捷键          | 描述                     |\r\n|-----------------|--------------------------|\r\n| `space` `g` `d` | 跳转到变量或者函数定义处 |\r\n| `space` `g` `r` | 跳转到变量或者函数引用处 |\r\n| `space` `r` `n` | 变量或者函数重命名       |\r\n| `space` `c` `f` | 代码格式化               |\r\n| `space` `c` `a` | 列出 `code action`       |\r\n| `space` `d` `t` | 预览 `diagnostic`        |\r\n| `space` `d` `n` | 下一处 `diagnostic`      |\r\n| `space` `d` `p` | 上一处 `diagnostic`      |\r\n\r\n在 `lua/plugins/nvim-lspconfig.lua` 文件中可以修改配置。\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\u003cstrong\u003eDemo (click to expand)\u003c/strong\u003e\u003c/summary\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/nvim-lspconfig-diagnostic.png?raw=true\" alt=\"nvim-lspconfig-diagnostic\" /\u003e\r\n\u003c/details\u003e\r\n\r\n### :computer: 自动补全 - nvim-cmp\r\n\r\n**插件地址**：[hrsh7th/nvim-cmp](https://github.com/hrsh7th/nvim-cmp)\r\n\r\n| 快捷键             | 描述                         |\r\n| ------------------ | ---------------------------- |\r\n| `ctrl` `n`         | 向下高亮补全项               |\r\n| `ctrl` `p`         | 向上高亮补全项               |\r\n| `ctrl` `j`         | 代码片段跳到下一个标记处     |\r\n| `ctrl` `k`         | 代码片段跳到上一个标记处     |\r\n| `enter`            | 选择高亮的补全项             |\r\n\r\n在 `lua/plugins/nvim-cmp.lua` 文件中可以修改配置。\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\u003cstrong\u003eDemo (click to expand)\u003c/strong\u003e\u003c/summary\u003e\r\n  \u003cspan\u003e内容补全\u003c/span\u003e\r\n  \u003cbr /\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/nvim-cmp.png?raw=true\" alt=\"nvim-cmp\" /\u003e\r\n  \u003cbr /\u003e\r\n  \u003cspan\u003e命令行补全\u003c/span\u003e\r\n  \u003cbr /\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/nvim-cmdline.png?raw=true\" alt=\"nvim-cmdline\" /\u003e\r\n  \u003cbr /\u003e\r\n  \u003cspan\u003e[ \"/\", \"?\" ] 查找补全\u003c/span\u003e\r\n  \u003cbr /\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/nvim-search.png?raw=true\" alt=\"nvim-search\" /\u003e\r\n\u003c/details\u003e\r\n\r\n### :books: 代码片段 - luasnip\r\n\r\n**插件地址**：[L3MON4D3/LuaSnip](https://github.com/L3MON4D3/LuaSnip)\r\n\r\n在 `my-snippets/snippets` 目录下可以添加自定义的代码片段。\r\n\r\n添加完成需要在 `my-snippets/package.json` 文件中引入自定义的代码片段。\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\u003cstrong\u003eDemo (click to expand)\u003c/strong\u003e\u003c/summary\u003e\r\n  \u003cspan\u003e代码片段的写法和 \u003ccode\u003evscode\u003c/code\u003e 的代码片段的写法一样。\u003c/span\u003e\r\n  \u003cbr /\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/luasnip.png?raw=true\" alt=\"luasnip\" /\u003e\r\n\u003c/details\u003e\r\n\r\n### :telescope: 模糊搜索 - telescope\r\n\r\n**插件地址**：[nvim-telescope/telescope.vim](https://github.com/nvim-telescope/telescope.nvim)\r\n\r\n| 快捷键          | 描述                                    |\r\n|-----------------|-----------------------------------------|\r\n| `space` `f` `f` | 查找当前目录下的文件                    |\r\n| `space` `f` `h` | 查找家目录下的文件                      |\r\n| `space` `f` `g` | 查找 `git` 管理的文件                   |\r\n| `space` `f` `o` | 查找最近打开过的文件                    |\r\n| `space` `f` `b` | 查找 `Buffers`                          |\r\n| `space` `f` `l` | 查找行                                  |\r\n| `space` `f` `p` | 查找项目                                |\r\n| `space` `f` `t` | 查找 `todo comments`                    |\r\n| `ctrl` `n`      | 打开 `telescope` 后，向下移动一格       |\r\n| `ctrl` `p`      | 打开 `telescope` 后，向上移动一格       |\r\n| `ctrl` `j`      | 打开 `telescope` 后，下一条搜索过的内容 |\r\n| `ctrl` `k`      | 打开 `telescope` 后，上一条搜索过的内容 |\r\n| `enter`         | 打开 `telescope` 后，选择高亮的选项     |\r\n| `esc`           | 退出 `telescope`                        |\r\n\r\n在 `lua/plugins/telescope.lua` 文件中可以修改配置。\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\u003cstrong\u003eDemo (click to expand)\u003c/strong\u003e\u003c/summary\u003e\r\n  \u003cspan\u003e查找项目，需要 \u003ca href=\"https://github.com/ahmedkhalf/project.nvim\"\u003eahmedkhalf/project.nvim\u003c/a\u003e 插件的支持。\u003c/span\u003e\r\n  \u003cbr /\u003e\r\n  \u003cspan\u003e在 \u003ccode\u003elua/plugins/project.lua\u003c/code\u003e 文件中可以修改此插件的配置。\u003c/sapn\u003e\r\n  \u003cbr /\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/telescope-project.png?raw=true\" alt=\"telescope-project\" /\u003e\r\n\u003c/details\u003e\r\n\r\n### :file_folder: 文件管理器 - nvim-tree\r\n\r\n**插件地址**：[nvim-tree/nvim-tree.lua](https://github.com/nvim-tree/nvim-tree.lua)\r\n\r\n| 快捷键          | 描述             |\r\n|-----------------|------------------|\r\n| `space` `e` `e` | 打开 `nvim-tree` |\r\n| `q`             | 退出 `nvim-tree` |\r\n\r\n在 `lua/plugins/nvim-tree.lua` 文件中可以修改配置。\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\u003cstrong\u003eDemo (click to expand)\u003c/strong\u003e\u003c/summary\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/nvim-tree.png?raw=true\" alt=\"nvim-tree\" /\u003e\r\n\u003c/details\u003e\r\n\r\n## 5. git 支持\r\n\r\n### :pushpin: 显示 git 标记 - gitsigns\r\n\r\n**插件地址**：[lewis6991/gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)\r\n\r\n| 快捷键          | 描述              |\r\n|-----------------|-------------------|\r\n| `space` `h` `r` | 重置 `hunk`       |\r\n| `space` `h` `n` | 下一处 `hunk`     |\r\n| `space` `h` `p` | 上一处 `hunk`     |\r\n| `space` `h` `l` | 预览 `hunk`       |\r\n\r\n在 `lua/plugins/gitsigns.lua` 文件中可以修改配置。\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\u003cstrong\u003eDemo (click to expand)\u003c/strong\u003e\u003c/summary\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/gitsigns.png?raw=true\" alt=\"gitsigns\" /\u003e\r\n\u003c/details\u003e\r\n\r\n### :koala: git 操作 - lazygit\r\n\r\n**插件地址**：[kdheepak/lazygit.nvim](https://github.com/kdheepak/lazygit.nvim)\r\n\r\n| 快捷键          | 描述           |\r\n|-----------------|----------------|\r\n| `space` `g` `g` | 打开 `lazygit` |\r\n| `q`             | 退出 `lazygit` |\r\n\r\n在 `lua/plugins/lazygit.lua` 文件中可以修改配置。\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\u003cstrong\u003eDemo (click to expand)\u003c/strong\u003e\u003c/summary\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/lazygit.png?raw=true\" alt=\"lazygit\" /\u003e\r\n\u003c/details\u003e\r\n\r\n## 6. Markdown 支持\r\n\r\n### :pencil: 快速输入\r\n\r\n在 `插入模式(insert-mode)` 下，`markdown` 文件中输入：\r\n\r\n| 快捷键            | 描述           |\r\n|-------------------|----------------|\r\n| `h1`              | 输入一级标题   |\r\n| `h2`              | 输入二级标题   |\r\n| `h3`              | 输入三级标题   |\r\n| `h4`              | 输入四级标题   |\r\n| `h5`              | 输入五级标题   |\r\n| `h6`              | 输入六级标题   |\r\n| `img`             | 插入图片       |\r\n| `codeblock`       | 插入代码块     |\r\n| `code`            | 使用反引号包裹 |\r\n| `table`           | 插入表格       |\r\n| `link`            | 插入链接       |\r\n| `horizontal rule` | 插入分隔线     |\r\n| `bold`            | 输入粗体文本   |\r\n| `italic`          | 输入斜体文本   |\r\n| `bold and italic` | 输入粗斜体文本 |\r\n| `strikethrough`   | 输入删除线     |\r\n\r\n在 `my-snippets/snippets/markdown.json` 文件中可以修改配置。\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\u003cstrong\u003eDemo (click to expand)\u003c/strong\u003e\u003c/summary\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/md-quick-input.gif?raw=true\" alt=\"md-quick-input\" /\u003e\r\n\u003c/details\u003e\r\n\r\n### :eyes: Markdown 预览 - markdown-preview\r\n\r\n**插件地址**：[iamcco/markdown-preview.nvim](https://github.com/iamcco/markdown-preview.nvim)\r\n\r\n| 快捷键      | 描述       |\r\n| ----------- | ---------- |\r\n| `shift` `r` | 打开预览   |\r\n\r\n配置中使用 `microsoft-edge-beta` 浏览器作为预览工具。\r\n\r\n在 `init.vim` 文件中可以找到关于 `markdown-preview` 的配置并修改。\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\u003cstrong\u003eDemo (click to expand)\u003c/strong\u003e\u003c/summary\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/markdown-preview.gif?raw=true\" alt=\"markdown-preview\" /\u003e\r\n\u003c/details\u003e\r\n\r\n### :straight_ruler: 表格模板 - vim-table-mode\r\n\r\n**插件地址**：[dhruvasagar/vim-table-mode](https://github.com/dhruvasagar/vim-table-mode)\r\n\r\n| 快捷键            | 描述             |\r\n|-------------------|------------------|\r\n| `alt` `shift` `t` | 启动表格模板     |\r\n| `alt` `shift` `r` | 表格模板重新对齐 |\r\n\r\n在 `init.vim` 文件中可以找到关于 `table-mode` 的配置并修改。\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\u003cstrong\u003eDemo (click to expand)\u003c/strong\u003e\u003c/summary\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/table-mode.gif?raw=true\" alt=\"table-mode\" /\u003e\r\n\u003c/details\u003e\r\n\r\n### :clipboard: 从剪贴板插入图片 - md-img-paste\r\n\r\n**插件地址**：[ferrine/md-img-paste.vim](https://github.com/ferrine/md-img-paste.vim)\r\n\r\n| 快捷键          | 描述           |\r\n|-----------------|----------------|\r\n| `space` `p` `i` | 输入图片的名称 |\r\n\r\n在 `init.vim` 文件中可以找到关于 `md-img-paste` 的配置并修改。\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003e\u003cstrong\u003eDemo (click to expand)\u003c/strong\u003e\u003c/summary\u003e\r\n  \u003cimg src=\"https://github.com/gin-18/pictures/blob/master/readme/nvim/md-img-paste.gif?raw=true\" alt=\"md-img-paste\" /\u003e\r\n\u003c/details\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgin-18%2Fnvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgin-18%2Fnvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgin-18%2Fnvim/lists"}