Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter remark failed to run (SPC b f) in reformating markdown document #1277

Closed
kamyuentse opened this issue Jan 15, 2018 · 11 comments

Comments

@kamyuentse
Copy link

commented Jan 15, 2018

Expected behavior, english is recommend

Environment Information

  • OS:OSX
  • vim version:8.0.1400
  • neovim version:

The reproduce ways from Vim starting (Required!)

Output of the :SPDebugInfo!

SpaceVim Options :

g:spacevim_statusline_left_sections = ['winnr', 'filename', 'major mode', 'syntax checking', 'minor mode lighters', 'version control info', 'hunks']
g:spacevim_enable_statusline_display_mode = 0
g:spacevim_enable_os_fileformat_icon = 1
g:spacevim_leader_guide_position = 'botright'
g:spacevim_version = '0.7.0-dev'
g:spacevim_force_global_config = 0
g:spacevim_smartcloseignoreft = ['help', 'tagbar', 'vimfiler', 'SpaceVimRunner', 'SpaceVimREPL', 'SpaceVimQuickFix', 'HelpDescribe', 'VebuggerShell', 'VebuggerTerminal']
g:spacevim_default_indent = 2
g:spacevim_enable_javacomplete2_py = 0
g:spacevim_enable_powerline_fonts = 1
g:spacevim_statusline_separator = 'arrow'
g:spacevim_enable_language_specific_leader = 1
g:spacevim_warning_symbol = ''
g:spacevim_simple_mode = 0
g:spacevim_colorscheme = 'gruvbox'
g:spacevim_enable_guicolors = 1
g:spacevim_custom_plugins = []
g:spacevim_leader_guide_submode_mappings = {'<C-C>': 'win_close'}
g:spacevim_buffer_index_type = 1
g:spacevim_hiddenfileinfo = 1
g:spacevim_statusline_inactive_separator = 'arrow'
g:spacevim_gitcommit_pr_icon = ''
g:spacevim_plugin_manager = 'dein'
g:spacevim_error_symbol = ''
g:spacevim_vim_plug_installed = 0
g:spacevim_windows_smartclose = 'q'
g:spacevim_windows_leader = 's'
g:spacevim_wildignore = '*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,*.ttf,*.TTF,*.png,*/target/*,.git,.svn,.hg,.DS_Store,*.svg'
g:spacevim_use_colorscheme = 1
g:spacevim_enable_ale = 0
g:spacevim_enable_insert_leader = 1
g:spacevim_enable_cursorcolumn = 0
g:spacevim_colorscheme_bg = 'dark'
g:spacevim_enable_neocomplcache = 0
g:spacevim_leader_guide_sort_horizontal = 0
g:spacevim_enable_vimfiler_welcome = 1
g:spacevim_max_column = 120
g:spacevim_enable_debug = 1
g:spacevim_enable_key_frequency = 0
g:spacevim_auto_disable_touchpad = 1
g:spacevim_vim_help_language = 'en'
g:spacevim_gitcommit_issue_icon = ''
g:spacevim_lint_on_save = 1
g:spacevim_dein_installed = 1
g:spacevim_autocomplete_method = 'neocomplete'
g:spacevim_enable_vimfiler_filetypeicon = 0
g:spacevim_plugin_manager_max_processes = 8
g:spacevim_statusline_unicode_symbols = 1
g:spacevim_statusline_right_sections = ['fileformat', 'cursorpos', 'percentage']
g:spacevim_unite_leader = 'f'
g:spacevim_enable_ycm = 0
g:spacevim_enable_tabline_filetype_icon = 1
g:spacevim_colorscheme_default = 'desert'
g:spacevim_plugin_groups_exclude = []
g:spacevim_project_rooter_automatically = 1
g:spacevim_neobundle_installed = 0
g:spacevim_disabled_plugins = []
g:spacevim_leader_guide_max_size = 0
g:spacevim_guifont = ''
g:spacevim_info_symbol = ''
g:spacevim_plugin_groups = ['web', 'lang', 'edit', 'ui', 'tools', 'checkers', 'format', 'chat', 'git', 'VersionControl', 'javascript', 'ruby', 'python', 'scala', 'lang#go', 'lang#markdown', 'scm', 'editing', 'indents', 'navigation', 'misc', 'core', 'core#banner', 'core#statusline', 'core#tabline', 'default', 'unite', 'github', 'denite', 'ctrlp', 'autocomplete', 'vim', 'osx', 'debug', 'incsearch', 'lang#c', 'lang#java', 'lang#javascript', 'lang#lua', 'lang#python', 'lang#rust', 'lang#tmux', 'lang#vim', 'lang#xml', 'shell', 'tools#screensaver', 'colorscheme']
g:spacevim_leader_guide_flatten = 1
g:spacevim_sidebar_width = 30
g:spacevim_enable_googlesuggest = 0
g:spacevim_enable_neomake = 1
g:spacevim_plugin_bundle_dir = '/Users/kam/.cache/vimfiles/'
g:spacevim_leader_guide_run_map_on_popup = 1
g:spacevim_hosts_url = 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts'
g:spacevim_relativenumber = 1
g:spacevim_leader_guide_default_group_name = ''
g:spacevim_smartcloseignorewin = ['__Tagbar__', 'vimfiler:default']
g:spacevim_realtime_leader_guide = 1
g:spacevim_terminal_cursor_shape = 2
g:spacevim_altmoveignoreft = ['Tagbar', 'vimfiler']
g:spacevim_keep_server_alive = 1
g:spacevim_snippet_engine = 'neosnippet'
g:spacevim_project_rooter_patterns = ['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/', '.clang']
g:spacevim_search_tools = ['rg', 'ag', 'pt', 'ack', 'grep']
g:spacevim_github_username = ''
g:spacevim_leader_guide_hspace = 5
g:spacevim_denite_leader = 'F'
g:spacevim_leader_guide_vertical = 0
g:spacevim_checkinstall = 1
g:spacevim_windows_index_type = 0
g:spacevim_plugin_name = 'gruvbox'
g:spacevim_enable_cursorline = 1
g:spacevim_custom_color_palette = []
g:spacevim_lint_on_the_fly = 0
g:spacevim_debug_level = 1
g:spacevim_filemanager = 'vimfiler'
g:spacevim_src_root = 'E:\sources\'
g:spacevim_language = ''
g:spacevim_enable_vimfiler_gitstatus = 0

SpaceVim Health checking :

SpaceVim clipboard support check report:
Checking +clipboard:
SUCCEED!
SpaceVim environment check report:
Current progpath: vim(vim)
version: 800
OS: OSX
[shell, shellcmdflag, shellslash]: ['/bin/zsh', '-c', 0]
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 ] [13:21:57] [ Info ] Find project root('.git/','/Users/kam/ownCloud/Upwork/CSwitch/design/database.mdown'):/Users/kam/ownCloud/Upwork/CSwitch/.git/
[ SpaceVim ] [13:21:57] [ Info ] change to root:/Users/kam/ownCloud/Upwork/CSwitch
[ SpaceVim ] [13:21:57] [ Info ] change to root:/Users/kam/ownCloud/Upwork/CSwitch
[ SpaceVim ] [13:22:59] [ Info ] change to root:/Users/kam/ownCloud/Upwork/CSwitch

Screenshots

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

@wsdjeg

This comment has been minimized.

Copy link
Member

commented Jan 15, 2018

do you install remark?

@kamyuentse

This comment has been minimized.

Copy link
Author

commented Jan 15, 2018

@wsdjeg Yes, I got remark installed on my system. And the remark in.md -o out.md work under the terminal.

@wsdjeg

This comment has been minimized.

Copy link
Member

commented Jan 15, 2018

what is your custom config, and what is the markdown file?

@kamyuentse

This comment has been minimized.

Copy link
Author

commented Jan 15, 2018

The config:

" Dark powered mode of SpaceVim, generated by SpaceVim automatically.
let g:spacevim_enable_debug = 1
let g:spacevim_realtime_leader_guide = 1

call SpaceVim#layers#load('debug')

call SpaceVim#layers#load('incsearch')
call SpaceVim#layers#load('lang#c')
call SpaceVim#layers#load('lang#go')
call SpaceVim#layers#load('lang#java')
call SpaceVim#layers#load('lang#javascript')
call SpaceVim#layers#load('lang#lua')
call SpaceVim#layers#load('lang#markdown')
call SpaceVim#layers#load('lang#python')
call SpaceVim#layers#load('lang#rust')
call SpaceVim#layers#load('lang#tmux')
call SpaceVim#layers#load('lang#vim')
call SpaceVim#layers#load('lang#xml')
call SpaceVim#layers#load('shell')   
call SpaceVim#layers#load('tools#screensaver')
let g:spacevim_enable_vimfiler_welcome = 1
let g:deoplete#auto_complete_delay = 150
let g:spacevim_enable_tabline_filetype_icon = 1
let g:spacevim_enable_statusline_display_mode = 0
let g:spacevim_enable_os_fileformat_icon = 1
let g:spacevim_buffer_index_type = 1
let g:neomake_vim_enabled_makers = []
if executable('vimlint')
    call add(g:neomake_vim_enabled_makers, 'vimlint') 
endif
if executable('vint')
    call add(g:neomake_vim_enabled_makers, 'vint') 
endif
if has('python3')
    let g:ctrlp_map = ''
    nnoremap <silent> <C-p> :Denite file_rec<CR>
endif
let g:clang2_placeholder_next = ''
let g:clang2_placeholder_prev = ''

I can't post the markdown file here, but I tested in a empty file test.md, I can't see any options when typing SPC l.

@wsdjeg

This comment has been minimized.

Copy link
Member

commented Jan 15, 2018

format key binding is SPC b f, and what is the output of echo g:neoformat_markdown_remark?

@kamyuentse

This comment has been minimized.

Copy link
Author

commented Jan 15, 2018

I know that the format ket binding is SPC b f, but I checked the source of the layer, the SPC l ft should be format table, so, I think that when I type SPC l, there will some options on the menu.

The output of echo g:neoformat_markdown_remark:
{'args': ['--no-color', '--silent', '-r', '/var/folders/3r/g1kgg8kd0njd2dwntp1f9wb00000gn/T/vRh26Ot/0.js'], 'stdin': 1 , 'exe': 'remark'}

@wsdjeg

This comment has been minimized.

Copy link
Member

commented Jan 15, 2018

you can try with the command locally.

remark --no-color --silent -r /var/folders/3r/g1kgg8kd0njd2dwntp1f9wb00000gn/T/vRh26Ot/0.js Test.md

@ghost ghost assigned wsdjeg Jan 15, 2018

@ghost ghost added the WIP label Jan 15, 2018

@kamyuentse

This comment has been minimized.

Copy link
Author

commented Jan 15, 2018

@wsdjeg Thanks for your help, seems this issue related to the node modules, it throws an error: Error: Cannot find module 'remark-frontmatter', but I confirm that this package has installed.

I am looking the solution for this.

@kamyuentse

This comment has been minimized.

Copy link
Author

commented Jan 15, 2018

@wsdjeg I commented out the plugins entry, seems that the formatter work well.

$ cat /var/folders/3r/g1kgg8kd0njd2dwntp1f9wb00000gn/T/vWWgKhm/0.js
module.exports = {
  settings: {
    listItemIndent: '1',
  },
  // plugins: [
  //  require('remark-frontmatter'),
  // ]
};

I used the TAB as the item list's ident, and it can be reformated to 1 space.

So, I think this issue related to the global dependencies path.

@wsdjeg

This comment has been minimized.

Copy link
Member

commented Jan 15, 2018

This is not issue with SpaceVim now, I think you need to edit your npmrc.

@wsdjeg wsdjeg closed this in 008bbcc Jan 15, 2018

wsdjeg added a commit that referenced this issue Jan 15, 2018

@ghost ghost added Fixed and removed WIP labels Jan 15, 2018

@kamyuentse

This comment has been minimized.

Copy link
Author

commented Jan 15, 2018

emm... another problem

SPC l ft result in Tabularize: Unrecognized command '/'

@wsdjeg wsdjeg added this to the v0.7.0 milestone Jan 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.