vim-lsp icon indicating copy to clipboard operation
vim-lsp copied to clipboard

Auto DocumentFormatRange -> passing custom range

Open VannTen opened this issue 2 years ago • 2 comments

Hi,

Is there a supported way to pass a specific range when formatting ('[ -> '] for using with InsertLeave / TestYankPost for example ?)

Reading https://github.com/prabirshrestha/vim-lsp/blob/master/plugin/lsp.vim#L134-L135 and https://github.com/prabirshrestha/vim-lsp/blob/master/autoload/lsp/internal/document_range_formatting.vim#L105-L111 makes me thinks that it's possible, but I'm not really sure how/ what args I should pass to :LspDocumentFormatRangeSync

I want to do this to format my buffer incrementally when modifying code. (If this is stupid for any reason, please tell me^)

VannTen avatar Jul 20 '22 16:07 VannTen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 21 '22 00:09 stale[bot]

If anyone has hints on this, I'm still trying to accomplish that :)

VannTen avatar Sep 21 '22 07:09 VannTen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 07 '23 18:01 stale[bot]