blob: 7c7cf1394d984431907861d360c732fb32d1e2fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import vim
import os
import configparser
roles_config_path = os.path.expanduser(vim.eval("g:vim_ai_roles_config_file"))
roles = configparser.ConfigParser()
roles.read(roles_config_path)
role_names = [name for name in roles.sections() if not '.' in name]
role_list = [f'"{name}"' for name in role_names]
role_list = ", ".join(role_list)
role_list = f"[{role_list}]"
vim.command(f'let l:role_list = {role_list}')
|