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

Markdown linting, mostly alex, problems #1633

Closed
celestefox opened this issue Jun 6, 2018 · 2 comments
Closed

Markdown linting, mostly alex, problems #1633

celestefox opened this issue Jun 6, 2018 · 2 comments

Comments

@celestefox
Copy link

celestefox commented Jun 6, 2018

Information

VIM version

VIM - Vi IMproved 8.1 (2018 May 17, compiled May 25 2018 00:50:25)
Included patches: 1-22

and

NVIM v0.3.0-1209-gebb1acb3c                                                                                                                                                                                      
Build type: RelWithDebInfo

Operating System: WHAT OS WERE YOU USING?

Arch Linux, vim from extra/gvim and nvim from aur/neovim-git

:ALEInfo

 Current Filetype: markdown
Available Linters: ['alex', 'markdownlint', 'mdl', 'proselint', 'redpen', 'remark-lint', 'textlint', 'vale', 'write-good']
  Enabled Linters: ['alex', 'markdownlint', 'mdl', 'proselint', 'redpen', 'remark-lint', 'textlint', 'vale', 'write-good']
 Linter Variables:

let g:ale_markdown_mdl_executable = 'mdl'
let g:ale_markdown_mdl_options = ''
 Global Variables:

let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = v:null
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = v:null
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {'json': ['jq'], 'rust': ['rustfmt'], 'javascript': ['prettier'], 'css': ['prettier'], 'python': ['yapf', 'isort', 'remove_trailing_lines', 'trim_whitespace']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_lint_on_insert_leave = 0
let g:ale_linter_aliases = {}
let g:ale_linters = {'rust': ['cargo', 'rls'], 'javascript': ['eslint', 'flow'], 'python': ['flake8', 'mypy']}
let g:ale_linters_explicit = 0
let g:ale_list_window_size = 10
let g:ale_list_vertical = 0
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 0
let g:ale_pattern_options = {}
let g:ale_pattern_options_enabled = 0
let g:ale_set_balloons = 1
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '💥'
let g:ale_sign_info = '🚩'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '🚨'
let g:ale_sign_style_warning = '💈'
let g:ale_sign_warning = '🚨'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
  Command History:

(started) ['/bin/zsh', '-c', 'alex ''/home/flaeme/clutter/school/1-2_audience_analysis.md'' -t']
(executable check - failure) markdownlint
(executable check - failure) mdl
(executable check - success) proselint
(started) ['/bin/zsh', '-c', 'proselint ''/tmp/v3kKiG9/23/1-2_audience_analysis.md''']
(executable check - failure) redpen
(executable check - failure) remark
(executable check - failure) textlint
(executable check - failure) vale
(executable check - success) write-good
(started) ['/bin/zsh', '-c', '''write-good'' ''/tmp/v3kKiG9/25/1-2_audience_analysis.md''']
(finished - exit code 1) ['/bin/zsh', '-c', 'alex ''/home/flaeme/clutter/school/1-2_audience_analysis.md'' -t']

<<<OUTPUT STARTS>>>
1-2_audience_analysis.md
  2:107-2:110  warning  `his` may be insensitive, use `their`, `theirs`, `them` instead  her-him  retext-equality
  2:134-2:136  warning  `he` may be insensitive, use `they`, `it` instead                he-she   retext-equality
  2:145-2:148  warning  `his` may be insensitive, use `their`, `theirs`, `them` instead  her-him  retext-equality

⚠ 3 warnings
<<<OUTPUT ENDS>>>

(executable check - failure) markdownlint
(executable check - failure) mdl
(finished - exit code 0) ['/bin/zsh', '-c', 'proselint ''/tmp/v3kKiG9/26/1-2_audience_analysis.md''']

<<<NO OUTPUT RETURNED>>>

(executable check - failure) redpen
(executable check - failure) remark
(executable check - failure) textlint
(executable check - failure) vale
(finished - exit code 0) ['/bin/zsh', '-c', '''write-good'' ''/tmp/v3kKiG9/27/1-2_audience_analysis.md''']

<<<NO OUTPUT RETURNED>>>

What went wrong

Very long pause on startup when opening markdown files, alex linter for markdown both doesn't let you specify an executable, which is a problem because there's a name collision with a Haskell tool, and the markdown version passes -t which is supposed to say that the file shouldn't be treated as markdown - but this is a markdown lint.

Reproducing the bug

Steps for repeating the bug:

  1. Install https://www.haskell.org/alex/ and https://github.com/wooorm/alex in such a way that the haskell tool always is earlier in the path - now, the alex lint straight up doesn't work, I had to move the executable because with how you launch executables, even overriding the path I launched Vim with didn't help.
  2. With the alex markdown linter working, write something it doesn't like. Then, try to wrap it in and . That should stop it from showing the error, but it doesn't, because alex is being told the file is plain text.
  3. I'm not sure what causes the large pause, unfortunately. It does seem to be related to opening markdown, specifically, but after that I'm lost.
@w0rp
Copy link
Member

w0rp commented Jun 6, 2018

https://stackoverflow.com/a/12216578/1836507 Could you follow the steps here and share the profile log when this happens? Often the slow thing is something completely different from what you think it is.

@w0rp w0rp added the triage label Jun 6, 2018
@celestefox
Copy link
Author

Thanks to that, figured out the slow loading was apparently vim-sleuth, sorry. Other issues with the alex linter still stand, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants