diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-01-02 11:37:20 +0100 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-01-02 11:38:02 +0100 |
| commit | e107ac067ebd4aedebd8ec9cde5ece7a38acad02 (patch) | |
| tree | 9e7a56aadfc80e895931dd6b13a016fc149aa9e0 /fnl/conf/lsp.fnl | |
| parent | 042072d6b96d6072d260d1b61cf9e770f1c2890e (diff) | |
added trim whitespace autocommand
Diffstat (limited to 'fnl/conf/lsp.fnl')
| -rw-r--r-- | fnl/conf/lsp.fnl | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/fnl/conf/lsp.fnl b/fnl/conf/lsp.fnl index 596d731..6d81d7a 100644 --- a/fnl/conf/lsp.fnl +++ b/fnl/conf/lsp.fnl @@ -21,17 +21,15 @@ :codeActionProvider (bm :n :<leader>ga (lspdo :code_action)) :hoverProvider (bo :keywordprg ":LspHover") :documentRangeFormattingProvider - (if format (bm :v :<leader>gq (lspdo :range_formatting))) - :documentFormattingProvider (if format - ((fn [] - (bo :formatexpr - "v:lua.vim.lsp.format()") - (bm :n :<leader>gq - #(vim.lsp.buf.format {:async true}))))))) - - (each [cpb enabled? (pairs client.server_capabilities)] - (if enabled? - (use cpb)))) + (if format (bm :v :<leader>gq (lspdo :range_formatting)) + :documentFormattingProvider + (if format + ((fn [] + (bo :formatexpr "v:lua.vim.lsp.format()" + (bm :n :<leader>gq #(vim.lsp.buf.format {:async true})))))) + (each [cpb enabled? (pairs client.server_capabilities)] + (if enabled? + (use cpb))))))) (fn attach [client buf format] (fn P [p] |
