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

[draft] Add formatting support

Open ldrumm opened this issue 1 year ago • 1 comments

This is an RFC for potential textDocument/rangeFormatting and textDocument/formatting support (line ranges only in the present implementation).

I'm basing this off the 3.18 spec and have done basic testing with clangd-15 where things seem to be working well.

Since I'm not particularly familiar with the vim-lsc architecture and formatprg etc, I'm open to any ideas on how to hook up these new functions to formatprg (or not as might be the cleaner case) and how to handle the default formatting options (see FIXME comment in format.vim)

ldrumm avatar May 23 '24 15:05 ldrumm

I've been using this patch locally in my day-today (C/C++ with clangd as my LSP) and it seems stable well. Any comments you have on resolving the TODOs here would be appreciated.

Happy to receive comments from other LSP users in particular

ldrumm avatar Jul 26 '24 17:07 ldrumm