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

Fixed: ChineseLinter.vim should not be loaded for all file types. #2534

Merged
merged 1 commit into from
Apr 18, 2019
Merged

Fixed: ChineseLinter.vim should not be loaded for all file types. #2534

merged 1 commit into from
Apr 18, 2019

Conversation

NamelessUzer
Copy link
Contributor

@NamelessUzer NamelessUzer commented Jan 31, 2019

PR Prelude

Thank you for working on SpaceVim! :)

Please complete these steps and check these boxes before filing your PR:

  • I have read and understood SpaceVim's CONTRIBUTING document.
  • I have read and understood SpaceVim's CODE_OF_CONDUCT document.
  • I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.

Why this change is necessary and useful?

ChineseLinter.vim should only be load for a limit number of filetypes, such as markdown, text."

@@ -10,8 +10,8 @@
function! SpaceVim#layers#chinese#plugins() abort
let plugins = [
\ ['yianwillis/vimcdoc' , {'merged' : 0}],
\ ['ianva/vim-youdao-translater' , {'on_cmd' : ['Ydv' , 'Ydc', 'Yde']}],
\ ['wsdjeg/ChineseLinter.vim' , {'merged' : 0, 'on_cmd' : ['CheckChinese']}],
\ ['ianva/vim-youdao-translater' , {'merged' : 0, 'on_cmd' : ['Ydv' , 'Ydc', 'Yde']}],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lazy loaded plugin is unmerged by default, that means, if you use on_cmd, no need to add merged key.

\ ['ianva/vim-youdao-translater' , {'on_cmd' : ['Ydv' , 'Ydc', 'Yde']}],
\ ['wsdjeg/ChineseLinter.vim' , {'merged' : 0, 'on_cmd' : ['CheckChinese']}],
\ ['ianva/vim-youdao-translater' , {'merged' : 0, 'on_cmd' : ['Ydv' , 'Ydc', 'Yde']}],
\ ['wsdjeg/ChineseLinter.vim' , {'merged' : 0, 'on_cmd' : 'CheckChinese', 'on_ft' : ['markdown', 'text']}],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This plugin is not runtime plugin, It is a command plugin, so no need to use on_ft feature, just use on_cmd is ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it OK that Checkchinese command key binding appears in all file type?

@wsdjeg wsdjeg merged commit 456ad32 into SpaceVim:master Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants