I just started using and configuring SpaceVim on Neovim for my purposes and I'm loving it so far. In the latest versions that use init.toml for configuration, how does one tweak some plugins outside of the g:spacevim* variables? In my particular case, I'd like to set tweak neoformat as follows, which would I would have normally done in a init.vim file.
let g:neoformat_c_clangformat = {
\ 'exe': 'clang-format',
\ 'args': ['--style=google'], # <-- neoformat doesn't have this out-of-the-box
\ 'stdin': 1,
\ }
@intuxicate - check out my comment in the other issue and let me know if it works for you.
Also, note that @wsdjeg said he would update the FAQ with this question. So, not sure if the recommendation will be the same or not.
Maybe we can implement bootstrap hooks for SpaceVim. After this implementation, we can use:
[[options]]
bootstrap_after = "function-name"
bootstrap_before = "function-name"
This implementation seems still ugly.
Can we implement something like:
[neoformat_c_clangformat]
exe = 'clang-format'
args = ['--style=google']
stdin = 1
no, there are too many plugins, we can not do this for all plugins.
I have no ideas on how this could be done. In the meantime, @petermbenjamin's init.vim suggestion works me.
@petermbenjamin we have add bootstrap fucntion in #1721, so you can edit your config file like this:
[options]
bootstrap_before = "myspacevim#before"
and create a file, ~/.SpaceVim.d/autoload/myspacevim.vim
in this file, just add:
function! myspacevim#before() abort
let g:neoformat_c_clangformat = {
\ 'exe': 'clang-format',
\ 'args': ['--style=google'], # <-- neoformat doesn't have this out-of-the-box
\ 'stdin': 1,
\ }
endfunction
@wsdjeg It's not working for me. I'm trying to map map <F10> :echo 'Hello'<CR> and it's not echoing
try with bootstrap_after
@wsdjeg thanks
Most helpful comment
try with bootstrap_after