The materia vim configuration
If you're using vim, link or copy the init.vim
to ~/.vimrc
, and then, just open your vim/neovim, This will install all plugins (more than 50) into bundles
directory.
After all plugins are installed, You need to restart your vim/nvim.
This configure requires Python3, If :echo has("python3")
returns 1
, then you're done.
Enable Python3 interface with pip:
pip3 install --user pynvim
And the following optional dependencies:
-
Silver searcher (Ag) for text searching: https://github.com/ggreer/the_silver_searcher
-
Ripgrep (Rg), A line-oriented search tool: https://github.com/BurntSushi/ripgrep
-
Bat, supports syntax highlighting for a large number of programming and markup languages: https://github.com/sharkdp/bat
You also need to install a Powerline font
to display Unicode icons, I’m using the SourceCodePro
, You can find other fonts at https://github.com/ryanoasis/nerd-fonts
Need to install clangd language server.
to get C/C++/Objective-C surport. Please read the Quick Start section and the clangd document about Project setup.
Note that SIP Issue for MacOS
users.
This object requires more than 50 plugins, and many configuration options, You have two ways to change, add or disable them:
Theconfig.default.json
is used to generate the default options, and you can create a file called config.json
to replicate it. For example:
{
"environment": {
"http_proxy": "'http://localhost:1087'",
"https_proxy": "'http://localhost:1087'"
},
"parts": {
"vim_virtualenv": {
"directory": "/Users/alex/envs/vim-materia"
}
}
}
Materia
will merge the config.json
with config.default.json
(merge objects and replace others).
If you want to add plugins or make more complex custom settings, You can add your own vimscript in the custom/main.vim
to add or override the default options and settings.
Materia manages plugins in a unified way, ensure that you will not add the same plugin repeatedly:
" custom/main.vim
let nord_vim = {'id': 'nord_vim', 'directory': 'nord-vim'}
if materia#config#get('options.colorscheme') == 'nord'
function! nord_vim.config()
let g:nord_cursor_line_number_background = 1
let g:nord_uniform_status_lines = 1
let g:nord_bold = materia#config#get('parts.nord_vim.bold')
let g:nord_italic = materia#config#get('parts.nord_vim.italic')
endfunction
function! nord_vim.listener()
colorscheme nord
call airline#switch_theme('nord')
endfunction
endif
function! nord_vim.install(install)
call a:install('arcticicestudio/nord-vim')
endfunction
call materia#part#add(nord_vim)
In config.json you should:
{
"options": {
"colorscheme": "nord"
},
"parts": {
"nord_vim": {
"bold": 0,
"italic": 1
}
}
}
You can change the json field parts.nord_vim.disable
to enable/disable this theme.
Some records are used to simplify your setup.
- node/npm/yarn
npm config set proxy http://username:password@host:port
npm config set https-proxy http://username:password@host:port
yarn config set proxy http://username:password@host:port
yarn config set https-proxy http://username:password@host:port
remove proxy
npm config rm proxy
npm config rm https-proxy
npm config delete proxy
npm config delete https-proxy
- git
git config --global http.proxy http://username:password@host:port
remove proxy
git config --global --unset http.proxy