From 52fa1d26db43664e8aeb856a59a693e9cb6ad44f Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Sun, 31 Oct 2021 05:40:26 -0700 Subject: feat(lsp): add formatexpr (#16186) Co-authored-by: Meck Co-authored-by: TJ DeVries --- runtime/doc/lsp.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 30e8ff658b..c844f8747b 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -61,6 +61,10 @@ Example config (in init.vim): > -- See `:help omnifunc` and `:help ins-completion` for more information. vim.api.nvim_buf_set_option(0, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + -- Use LSP as the handler for formatexpr. + -- See `:help formatexpr` for more information. + vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr') + -- For plugins with an `on_attach` callback, call them here. For example: -- require('completion').on_attach() end -- cgit