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

Add <plug> mappings #210

Merged
merged 2 commits into from
Dec 14, 2018
Merged

Add <plug> mappings #210

merged 2 commits into from
Dec 14, 2018

Conversation

mattn
Copy link
Collaborator

@mattn mattn commented Dec 13, 2018

No description provided.

nnoremap <expr> <plug>(lsp-rename) [lsp#ui#vim#rename(),''][1]
nnoremap <expr> <plug>(lsp-workspace-symbol) [lsp#ui#vim#workspace_symbol(),''][1]
nnoremap <expr> <plug>(lsp-document-format) [lsp#ui#vim#document_format(),''][1]
vnoremap <expr> <plug>(lsp-document-format) [lsp#ui#vim#document_range_format(),''][1]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you prefer this is <plug>(lsp-document-range-format) ?

Copy link
Owner

Choose a reason for hiding this comment

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

I'm either way. We can add lsp-document-range-format if we get feedback.

Copy link
Owner

@prabirshrestha prabirshrestha left a comment

Choose a reason for hiding this comment

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

Can you also document this new feature.

@mattn
Copy link
Collaborator Author

mattn commented Dec 14, 2018

Okay, will do

@prabirshrestha prabirshrestha merged commit 018ea32 into prabirshrestha:master Dec 14, 2018
@prabirshrestha
Copy link
Owner

Merged. Thanks!

@mattn mattn deleted the plug-map branch December 14, 2018 17:33
@prabirshrestha
Copy link
Owner

@mattn Seems like for me I need to add <cr> else it won't go to def until I type extra key.

autocmd FileType python,go nmap gd <plug>(lsp-definition)<cr>

Would it be possible to make it so the user can define autocmd without adding <cr>?

@mattn
Copy link
Collaborator Author

mattn commented Dec 18, 2018

No need to add <cr>. <cr> is required for command-mode ex :. If the mapping goes to command-mode with :, it require <cr>.

ddcien pushed a commit to ddcien/vim-lsp that referenced this pull request Dec 18, 2018
* Add <plug> mappings
* Update doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants