Spacevim: all set declaration are beeing ignored from .SpaceVim.d/init.vim

Created on 17 Apr 2018  ·  20Comments  ·  Source: SpaceVim/SpaceVim

Expected behavior, english is required

set declaration should work when defined in .SpaceVim.d/init.vim.
It worked for me before I updated.

For example:
set foldmethod=indent
set nornu

The reproduce ways from Vim starting (Required!)

my .SpaceVim.d/init.vim

let mapleader = ','
nnoremap :bp
nnoremap :bn
nnoremap :buffers:buffer
nnoremap m m

set foldmethod=indent
set nowrap
let g:indentLine_enabled = 0

let g:spacevim_filemanager = 'nerdtree'
let g:NERDTreeWinPos = "left"
let NERDTreeQuitOnOpen=1
nnoremap e :NERDTreeToggle %

let g:neomake_python_enabled_makers = ['pylama', 'flake8', 'pep8']
let g:neomake_python_flake8_maker = { 'args': ['--ignore=E501'], }
let g:neomake_python_pep8_maker = { 'args': ['--max-line-length=110'], }
let g:neomake_python_pylama_maker = { 'args': ['--ignore=E501'], }

let g:bookmark_no_default_key_mappings = 1
let g:spacevim_unite_leader = 'ss'
let g:spacevim_denite_leader = 'ss'

nmap (easymotion-overwin-w)
set nornu

Debug info

Expected behavior, english is recommend

Environment Information

  • OS: Linux
  • vim version: 8.0.1666
  • neovim version: -
  • SpaceVim version: 0.8.0-dev
  • SpaceVim status:
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working tree clean

The reproduce ways from Vim starting (Required!)

Output of the :SPDebugInfo!

SpaceVim Options :

g:spacevim_altmoveignoreft = ['Tagbar', 'vimfiler']
g:spacevim_auto_disable_touchpad = 1
g:spacevim_autocomplete_method = 'neocomplete'
g:spacevim_buffer_index_type = 0
g:spacevim_checkinstall = 1
g:spacevim_colorscheme = 'gruvbox'
g:spacevim_colorscheme_bg = 'dark'
g:spacevim_colorscheme_default = 'desert'
g:spacevim_custom_color_palette = []
g:spacevim_custom_plugins = []
g:spacevim_debug_level = 1
g:spacevim_default_indent = 2
g:spacevim_dein_installed = 1
g:spacevim_denite_leader = 'ss'
g:spacevim_disabled_plugins = []
g:spacevim_enable_ale = 0
g:spacevim_enable_cursorcolumn = 0
g:spacevim_enable_cursorline = 1
g:spacevim_enable_debug = 0
g:spacevim_enable_googlesuggest = 0
g:spacevim_enable_guicolors = 1
g:spacevim_enable_insert_leader = 1
g:spacevim_enable_javacomplete2_py = 0
g:spacevim_enable_key_frequency = 0
g:spacevim_enable_language_specific_leader = 1
g:spacevim_enable_neocomplcache = 0
g:spacevim_enable_neomake = 1
g:spacevim_enable_os_fileformat_icon = 0
g:spacevim_enable_powerline_fonts = 1
g:spacevim_enable_statusline_display_mode = 0
g:spacevim_enable_tabline_filetype_icon = 0
g:spacevim_enable_vimfiler_filetypeicon = 0
g:spacevim_enable_vimfiler_gitstatus = 0
g:spacevim_enable_vimfiler_welcome = 1
g:spacevim_enable_ycm = 0
g:spacevim_error_symbol = '✖'
g:spacevim_expand_tab = 1
g:spacevim_filemanager = 'nerdtree'
g:spacevim_filetype_icons = {}
g:spacevim_force_global_config = 0
g:spacevim_gitcommit_issue_icon = ''
g:spacevim_gitcommit_pr_icon = ''
g:spacevim_github_username = ''
g:spacevim_guifont = ''
g:spacevim_hiddenfileinfo = 1
g:spacevim_hosts_url = 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts'
g:spacevim_info_symbol = 'ⓘ'
g:spacevim_keep_server_alive = 1
g:spacevim_language = ''
g:spacevim_leader_guide_default_group_name = ''
g:spacevim_leader_guide_flatten = 1
g:spacevim_leader_guide_hspace = 5
g:spacevim_leader_guide_max_size = 0
g:spacevim_leader_guide_position = 'botright'
g:spacevim_leader_guide_run_map_on_popup = 1
g:spacevim_leader_guide_sort_horizontal = 0
g:spacevim_leader_guide_submode_mappings = {'<C-C>': 'win_close'}
g:spacevim_leader_guide_vertical = 0
g:spacevim_lint_on_save = 1
g:spacevim_lint_on_the_fly = 0
g:spacevim_max_column = 120
g:spacevim_neobundle_installed = 0
g:spacevim_plugin_bundle_dir = '/home/slune/.cache/vimfiles/'
g:spacevim_plugin_manager = 'dein'
g:spacevim_plugin_manager_max_processes = 16
g:spacevim_plugin_name = 'vim-projectionist'
g:spacevim_project_rooter_automatically = 1
g:spacevim_project_rooter_patterns = ['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/']
g:spacevim_realtime_leader_guide = 1
g:spacevim_relativenumber = 1
g:spacevim_search_tools = ['rg', 'ag', 'pt', 'ack', 'grep']
g:spacevim_sidebar_width = 30
g:spacevim_simple_mode = 0
g:spacevim_smartcloseignoreft = ['tagbar', 'vimfiler', 'SpaceVimRunner', 'SpaceVimREPL', 'SpaceVimQuickFix', 'HelpDescribe', 'VebuggerShell', 'VebuggerTerminal']
g:spacevim_smartcloseignorewin = ['__Tagbar__', 'vimfiler:default']
g:spacevim_snippet_engine = 'neosnippet'
g:spacevim_src_root = 'E:\sources\'
g:spacevim_statusline_inactive_separator = 'arrow'
g:spacevim_statusline_left_sections = ['winnr', 'filename', 'major mode', 'syntax checking', 'minor mode lighters']
g:spacevim_statusline_right_sections = ['fileformat', 'cursorpos', 'percentage']
g:spacevim_statusline_separator = 'arrow'
g:spacevim_statusline_unicode_symbols = 1
g:spacevim_terminal_cursor_shape = 2
g:spacevim_unite_leader = 'ss'
g:spacevim_version = '0.8.0-dev'
g:spacevim_vim_help_language = 'en'
g:spacevim_vim_plug_installed = 0
g:spacevim_vimcompatible = 0
g:spacevim_warning_symbol = '⚠'
g:spacevim_wildignore = '*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,*.ttf,*.TTF,*.png,*/target/*,.git,.svn,.hg,.DS_Store,*.svg'
g:spacevim_windows_index_type = 0
g:spacevim_windows_leader = 's'
g:spacevim_windows_smartclose = 'q'

SpaceVim Health checking :

SpaceVim clipboard support check report:
Checking +clipboard:
SUCCEED!
SpaceVim environment check report:
Current progpath: gvim(/usr/bin/gvim)
version: 800
OS: Linux
SpaceVim lua support check report:
Checking +lua:
SUCCEED!
SpaceVim python support check report:
Checking +python3:
SUCCEED!
Checking +python:
Failed : to support +python, Please install vim-gik, or build from sources.

SpaceVim runtime log :

[ SpaceVim ] : logger file  does not exists, only log for current process will be shown!
[ SpaceVim ] [14:40:59] [ Info ] Skip glob configuration of SpaceVim
[ SpaceVim ] [14:40:59] [ Info ] SpaceVim server startup at:/tmp/spacevim_vim_server

Screenshots

If you have any screenshots for this issue please upload here. BTW you can use https://asciinema.org/ for recording video in terminal.

doc usage

Most helpful comment

OK,I will update the document.

All 20 comments

Please read :h SpaceVim, not all option are allowed in spacevim configuration file, and the latest version use toml file as default configuration file.

@wsdjeg Are there any plans to update :h SpaceVim with the init.toml configuration options? Currently it references the old init.vim configuration file.

It looks like most (global?) options moved from:

init.vim:

g:spacevim_configuration_option = value

to:

init.toml:

[options]
    configuration_option = value

The default configuration file (init.toml) does a good job of documenting itself, but I can understand where some of the confusion stems from if people are referencing :h SpaceVim's documentation.

I cannot find init.toml anywhere in the help - using latest master. Is there a way how know what settings
are available thought it.

OK,I will update the document.

With the latest version, how does one disable relative numbering?
I keep using init.vim because I am too lazy to change to init.toml

But my line in the init.vim:

set nornu

seems to be ignored. and it is not clear how to accomplish that in init.toml unless I am missing something?

I "hacked" it by adding source ~/.SpaceVim.d/init.vim at the end of ~/.SpaceVim/config/main.vim.

@slune that seems to be an effective workaround thank you

changing content in ~/. SpaceVim is not a good idea.

I agree. But right now it's much easier to find solution for regular vim syntax than init.toml.
I found your init file https://github.com/wsdjeg/DotFiles/blob/master/SpaceVim.d/init.toml which helped a lot, but it broke other things.

Wang how does one properly "set nonu" using the new "toml" config format?
I have no issue switching to toml but I couldnt figure out from the
examples in the spacevim documentation how to do that.
I'll make a deal with you: if you teach me how to do that I'll make a PR to
update the toml docs with more examples.

On 12 May 2018 at 00:26, slune notifications@github.com wrote:

I agree. But right now it's much easier to find solution for regular vim
syntax than init.toml.
I found your init file https://github.com/wsdjeg/
DotFiles/blob/master/SpaceVim.d/init.toml which helped a lot, but it
broke other things.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/SpaceVim/SpaceVim/issues/1629#issuecomment-388529008,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACUWyLzUnvM8gflw4ojZMRXkI-Uc7vZmks5txmSOgaJpZM4TXVKs
.

--
Peter Weissbrod
http://RealLifeData.com | O: 207.439.3489 | M: 406.531.1263

@PeteW I will update documentation about how to use toml to config SpaceVim, but I can not include vim script into toml file, as what I said in https://github.com/SpaceVim/SpaceVim/issues/1705#issuecomment-388113091

Vim has too many options, there is no need to config all of them in toml file, same as #1704, I recommand you to use bootstrap functions.

Wang
Thanks. In vim-world, users like me who employ extensive customization are
the "normal" type of user, not the edge case.
Your link directly answers my question.

I want to ask, what is the benefit of toml config files? I have never used
toml before. I've used vimscript in .vimrc/init.vim for years. Currently my
impression of toml is that it adds an unfamiliar extra layer of separation
between me and vim. To get the desired effect of "set nonu" I must edit the
toml file and author a new separate vimscript file outside of my user
directory just to preserve what used to be a single direct file. Until I
understand the benefit the toml format brings I'm going to prefer to
continue using init.vim as it seems to bring less complications for me.

On 13 May 2018 at 00:59, Wang Shidong notifications@github.com wrote:

Closed #1629 https://github.com/SpaceVim/SpaceVim/issues/1629 via #1721
https://github.com/SpaceVim/SpaceVim/pull/1721.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SpaceVim/SpaceVim/issues/1629#event-1623423904, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACUWyHsHGCIEMAZOf-pgWbtehsmqn-LTks5tx73FgaJpZM4TXVKs
.

--
Peter Weissbrod
http://RealLifeData.com | O: 207.439.3489 | M: 406.531.1263

Hi Pete:

I know most vim users are family with vim script, But I create SpaceVim not only for vim users, but also include atom, vscode and other normal editor users.( I hope in the feature, a normal editor user can switch to spacevim easily.)

why use toml file as default configuration file?

just like atom, vscode etc. use marked languge as configurate file is strong and healthy, when use vim script as default config, user can write anything in the configuration file, and sometimes it brings some errors or even dangerous.
use toml as config alse avoid confusion, like this question " why set nu does not work, and it should work well"

Before we choose the configuratione file, we have make some dicussion:

  1. why do not use json?

json is easy to be understood by PC, but hard to write and read, also do not support comments.

In the feature, when SpaceVim release 1.0, or even 2.0. A new SpaceVim/Vim user who want to use SpaceVim as his IDE, he only need to read the usage in the document, and only need to know how to load the languge layer.

@slune If you encounter any issue, please let me know, I hope to improve the experience of SpaceVim.

@wsdjeg I've spent a significant amount of time trying to adapt my init.vim to this new version. Still unsuccessful. The log mentions that the custom#before and custom#after bootstrap functions fail to call but after lengthy trial and error I'm unable to figure out why.

I appreciate you've set the goal to be markup-language config and this brings some benefits for compatibility with other IDEs. But for end-users like myself who learned versions 0.7 and below it breaks vimscript based configurations. We need documentation on how to upgrade from 0.7, and, we need to know how to configure variables outside the scope of spacevim.

I've read issue #1629 but there is still some sort of issue where it is not working. Can you add example to the wiki? where the name and location of our vimscript should be with respect to the toml file. What exactly should be inside it. Even better would be if spacevim auto created this alongside init.toml.

Even better would be if spacevim auto created this alongside init.toml.

_Ideally_ an option should exist to use one or the other (init.toml or init.vim).

Another option would be to have SpaceVim parse the init.toml file first, then additional options (or overrides) could be specified in init.vim?

@devopsdeluxe As I understand it init.toml contains references to two vimscript functions, one for before loading plugins and one for after. See #1704 for example:

[options]
      bootstrap_before = "myspacevim#before"

@PeteW I just want to improve the doc of SpaceVim in #1758, and in this PR, I will update the faq page, any question you want me to answer?

the doc about bootstrap function has been added to the doc.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wsdjeg picture wsdjeg  ·  3Comments

eperfect picture eperfect  ·  4Comments

teemola picture teemola  ·  5Comments

shabegom picture shabegom  ·  3Comments

wsdjeg picture wsdjeg  ·  4Comments