├── .github └── workflows │ └── update_readme.yml ├── .gitignore ├── README.md ├── data └── conf_repo_info.yaml ├── requirements.txt └── update_readme.py /.github/workflows/update_readme.yml: -------------------------------------------------------------------------------- 1 | name: Update README 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | schedule: 7 | - cron: '0 6 * * *' 8 | workflow_dispatch: 9 | 10 | jobs: 11 | update-readme: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v3 15 | - name: Set up Python 16 | uses: actions/setup-python@v4 17 | with: 18 | python-version: '3.10' 19 | - name: Install dependencies 20 | run: | 21 | python -m pip install --upgrade pip 22 | pip install -r requirements.txt 23 | - name: Run update script 24 | run: python update_readme.py 25 | - name: Commit changes 26 | run: | 27 | git config --local user.email "action@github.com" 28 | git config --local user.name "GitHub Action" 29 | git add README.md 30 | git commit -m "Update README" -a || echo "No changes to commit" 31 | git push 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .venv/ 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # awesome-nvim-conf 2 | 3 | A collection of awesome Neovim configuration from Chinese nvim users. 4 | 5 | 6 | | author | repo | description | tags |stars| 7 | |--------------|---------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|-----| 8 | | ofseed | https://github.com/ofseed/nvim | Over 150+ featured plugins | nvim-lsp, C/C++, Rust, GO, JavaScript, TypeScript, Java | 153 | 9 | | jdhao | https://github.com/jdhao/nvim-config | A modern Neovim configuration with full battery for Python, Lua, C++, Markdown, LaTeX, and more... | nvim-lsp, Python, LaTeX | 3915| 10 | | Zwlin98 | https://github.com/Zwlin98/nvim | A simple and clean neovim configuration, optimized for HHKB layout | nvim-lsp, Lua, HHKB, Nord, Lua | 47 | 11 | | nanozuki | https://github.com/nanozuki/crows/tree/master/configs/nvim | None | None | 14 | 12 | | aidancz |https://github.com/aidancz/arch_config/tree/master/.config/nvim| simple single-file neovim config, with sensible options, mappings, autocmds... | lua, single-file | 0 | 13 | | twistoy | https://github.com/TwIStOy/dotvim | Simple Neovim configuration, both nix and non-nix environment. | nvim-lsp, C++, Rust, Treesitter | 12 | 14 | | leoatchina | https://github.com/leoatchina/leovim |A Vim configuration compatible with Vim 7.4 to the latest Neovim, using vim-plug as the plugin manager, primarily in Vimscript with Lua config, rich in features and clear in structure.|vim-plug, mulitple-files, vimscript, lua, vim, neovim, repl, lsp, dap, treesitter, coc.nvim, cmp| 3 | 15 | |donglitiaobnan| https://github.com/donglitiaoban/dotfiles/tree/main/nvim | Pure-lua neovim configuration tested on windows | lua, lazy, lsp-zero, telescope | 0 | 16 | | someoneinjd | https://github.com/someoneinjd/dotfiles/tree/main/config/nvim | None | nvim-lsp, lazy.nvim, blink.cmp, treesitter, telescope | 51 | 17 | 18 | 19 | # How to contribute? 20 | 21 | **Do not edit this file directly if you want to add your repo!** 22 | Edit the yaml data under [`./data/conf_repo_info.yaml`](./data/conf_repo_info.yaml) and add your Neovim config repo there. 23 | 24 | # Contact 25 | 26 | Telegram Group: 27 | -------------------------------------------------------------------------------- /data/conf_repo_info.yaml: -------------------------------------------------------------------------------- 1 | - author: ofseed 2 | repo: https://github.com/ofseed/nvim 3 | description: Over 150+ featured plugins 4 | tags: nvim-lsp, C/C++, Rust, GO, JavaScript, TypeScript, Java 5 | - author: jdhao 6 | repo: https://github.com/jdhao/nvim-config 7 | description: A modern Neovim configuration with full battery for Python, Lua, C++, Markdown, LaTeX, and more... 8 | tags: nvim-lsp, Python, LaTeX 9 | - author: Zwlin98 10 | repo: https://github.com/Zwlin98/nvim 11 | description: A simple and clean neovim configuration, optimized for HHKB layout 12 | tags: nvim-lsp, Lua, HHKB, Nord, Lua 13 | - author: nanozuki 14 | repo: https://github.com/nanozuki/crows/tree/master/configs/nvim 15 | description: 16 | tags: 17 | - author: aidancz 18 | repo: https://github.com/aidancz/arch_config/tree/master/.config/nvim 19 | description: simple single-file neovim config, with sensible options, mappings, autocmds... 20 | tags: lua, single-file 21 | - author: twistoy 22 | repo: https://github.com/TwIStOy/dotvim 23 | description: Simple Neovim configuration, both nix and non-nix environment. 24 | tags: nvim-lsp, C++, Rust, Treesitter 25 | - author: leoatchina 26 | repo: https://github.com/leoatchina/leovim 27 | description: A Vim configuration compatible with Vim 7.4 to the latest Neovim, using vim-plug as the plugin manager, primarily in Vimscript with Lua config, rich in features and clear in structure. 28 | tags: vim-plug, mulitple-files, vimscript, lua, vim, neovim, repl, lsp, dap, treesitter, coc.nvim, cmp 29 | - author: donglitiaobnan 30 | repo: https://github.com/donglitiaoban/dotfiles/tree/main/nvim 31 | description: Pure-lua neovim configuration tested on windows 32 | tags: lua, lazy, lsp-zero, telescope 33 | - author: someoneinjd 34 | repo: https://github.com/someoneinjd/dotfiles/tree/main/config/nvim 35 | description: 36 | tags: nvim-lsp, lazy.nvim, blink.cmp, treesitter, telescope 37 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PyYAML==6.0 2 | py-markdown-table==1.1.0 3 | requests==2.32.3 4 | -------------------------------------------------------------------------------- /update_readme.py: -------------------------------------------------------------------------------- 1 | from py_markdown_table.markdown_table import markdown_table 2 | import requests 3 | from urllib.parse import urlparse 4 | import yaml 5 | 6 | 7 | def get_github_stars(owner, repo): 8 | url = f"https://api.github.com/repos/{owner}/{repo}" 9 | try: 10 | response = requests.get(url, timeout=5) 11 | except Exception: 12 | print("unable to get the repo status") 13 | return None 14 | 15 | # print(response.json()) 16 | 17 | if response.status_code == 200: 18 | data = response.json() 19 | return data["stargazers_count"] 20 | else: 21 | return None 22 | 23 | 24 | def get_github_owner_repo(url): 25 | parsed_url = urlparse(url) 26 | 27 | # Check if it's a valid GitHub URL 28 | if parsed_url.netloc != "github.com": 29 | raise ValueError("Not a valid GitHub URL") 30 | 31 | # Split the path and remove empty strings 32 | path_parts = list(filter(None, parsed_url.path.split("/"))) 33 | 34 | # Check if we have at least owner and repo 35 | if len(path_parts) < 2: 36 | raise ValueError("URL does not contain both owner and repository") 37 | 38 | owner = path_parts[0] 39 | repo = path_parts[1] 40 | 41 | return owner, repo 42 | 43 | 44 | def get_repo_info(): 45 | with open("./data/conf_repo_info.yaml") as f: 46 | repo_info = yaml.load(f, Loader=yaml.SafeLoader) 47 | 48 | # add additional info to the repo 49 | 50 | for info in repo_info: 51 | repo_link = info["repo"] 52 | 53 | try: 54 | owner, repo = get_github_owner_repo(repo_link) 55 | except ValueError: 56 | print("Abnormal repo link") 57 | info["stars"] = "Not available" 58 | continue 59 | 60 | stars = get_github_stars(owner, repo) 61 | if stars is not None: 62 | info["stars"] = stars 63 | else: 64 | info["stars"] = "Not available" 65 | 66 | return repo_info 67 | 68 | 69 | def overwrite_readme(new_content): 70 | with open("README.md", "r") as file: 71 | content = file.read() 72 | 73 | # Define the start and end markers for the section to replace 74 | start_marker = "" 75 | end_marker = "" 76 | 77 | # Find the section to replace 78 | start = content.index(start_marker) 79 | end = content.index(end_marker) + len(end_marker) 80 | 81 | # Replace the section 82 | updated_content = ( 83 | content[:start] 84 | + start_marker 85 | + "\n" 86 | + new_content 87 | + "\n" 88 | + end_marker 89 | + content[end:] 90 | ) 91 | 92 | # Write the updated content back to README.md 93 | with open("README.md", "w") as file: 94 | file.write(updated_content) 95 | 96 | 97 | def update_readme(): 98 | repo_info = get_repo_info() 99 | table_str = ( 100 | markdown_table(repo_info) 101 | .set_params(row_sep="markdown", quote=False) 102 | .get_markdown() 103 | ) 104 | overwrite_readme(table_str) 105 | # print(table_str) 106 | 107 | 108 | if __name__ == "__main__": 109 | update_readme() 110 | --------------------------------------------------------------------------------