diff options
author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-11-02 17:02:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 17:02:04 -0700 |
commit | 7899c4099b38f2198c86b08138f813c530fdc20f (patch) | |
tree | 7b9481d506c888db42eda45cbc125c45026d168d /runtime/lua/vim/lsp.lua | |
parent | 487286b6218ecf4bcf48d0a0089fbc78e2bc5a37 (diff) | |
download | rneovim-7899c4099b38f2198c86b08138f813c530fdc20f.tar.gz rneovim-7899c4099b38f2198c86b08138f813c530fdc20f.tar.bz2 rneovim-7899c4099b38f2198c86b08138f813c530fdc20f.zip |
docs(lsp): correct usage examples of formatexpr (#16216)
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r-- | runtime/lua/vim/lsp.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 01e801415a..fb4718c1bb 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -1543,12 +1543,10 @@ end --- --- Currently only supports a single client. This can be set via --- `setlocal formatexpr=v:lua.vim.lsp.formatexpr()` but will typically or in `on_attach` ---- via `vim.api.nvim_buf_set_option(bufnr, 'formatexpr', 'v:lua.vim.lsp.formatexpr()')`. ---- ---- Can additionally be wrapped with a function that passes an optional table for customization. +--- via `vim.api.nvim_buf_set_option(bufnr, 'formatexpr', 'v:lua.vim.lsp.formatexpr(#{timeout_ms:250})')`. --- ---@param opts table options for customizing the formatting expression which takes the ---- following keys: +--- following optional keys: --- * timeout_ms (default 500ms). The timeout period for the formatting request. function lsp.formatexpr(opts) opts = opts or {} |