diff --git a/modules/vim/module.py b/modules/vim/module.py index 89bc603..c7df5c4 100644 --- a/modules/vim/module.py +++ b/modules/vim/module.py @@ -9,19 +9,12 @@ import json class VimModule(AbstractModule): def __init__(self): super().__init__() - self.plugins = {} - with open("modules/vim/vim_plugins.json") as plugins: - self.plugins = json.load(plugins)['plugins'] + self.json_config = {} + with open("modules/vim/vimrc_conf.json") as plugins: + self.json_config = json.load(plugins) - self.settings = {} - with open("modules/vim/vim_settings.json") as settings: - self.settings = json.load(settings)['settings'] - - def add_settings(self): - list_settings = [] - for setting in self.settings.values(): - list_settings.append(setting) - return list_settings + self.plugins = self.json_config['plugins'] + self.settings = self.json_config['settings'] def do_plugin_selection(self): mapped_list = [] @@ -44,7 +37,7 @@ class VimModule(AbstractModule): def run(self): selected_plugins = self.do_plugin_selection() - default_settings = self.add_settings() + default_settings = list(self.settings.values()) # print out selected plugins print("\033[4mYour selection:\033[0m") [print(x) for x in selected_plugins] diff --git a/modules/vim/vim_settings.json b/modules/vim/vim_settings.json deleted file mode 100644 index a28d132..0000000 --- a/modules/vim/vim_settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "settings": { - "tabstop": "set tabstop=2", - "shiftwidth": "set shiftwidth=2", - "expand": "set noexpandtab", - "highlighting": "syntax on", - "linenumbers": "set number", - "status": "set laststatus=2", - "noshowmode": "set noshowmode" - } -} \ No newline at end of file diff --git a/modules/vim/vim_plugins.json b/modules/vim/vimrc_conf.json similarity index 63% rename from modules/vim/vim_plugins.json rename to modules/vim/vimrc_conf.json index ae2c3b2..ab3e3c2 100644 --- a/modules/vim/vim_plugins.json +++ b/modules/vim/vimrc_conf.json @@ -6,5 +6,14 @@ "Meta5 Theme": "Plug 'https://github.com/christophermca/meta5.git'", "Nerdtree": "Plug 'https://github.com/scrooloose/nerdtree'", "Lightline": "Plug 'https://github.com/itchyny/lightline.vim'" + }, + "settings": { + "tabstop": "set tabstop=2", + "shiftwidth": "set shiftwidth=2", + "expand": "set noexpandtab", + "highlighting": "syntax on", + "linenumbers": "set number", + "status": "set laststatus=2", + "noshowmode": "set noshowmode" } } \ No newline at end of file