diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2025-04-11 23:54:40 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2025-04-11 23:54:40 -0600 |
commit | 8fce7d2fd0ac56c87cabf049e0c4f32191ade0ec (patch) | |
tree | df1eaab478348c1a92771071766435b56e0fc56b | |
parent | f031167d775e2729fc76830004043efef1318ed5 (diff) | |
download | config.vim-8fce7d2fd0ac56c87cabf049e0c4f32191ade0ec.tar.gz config.vim-8fce7d2fd0ac56c87cabf049e0c4f32191ade0ec.tar.bz2 config.vim-8fce7d2fd0ac56c87cabf049e0c4f32191ade0ec.zip |
Fix the problem with LSP and code formatting.
Sometimes the LSP list wouldn't appear as a list and so it would default
to the external-program formatter instead of the lsp formatter.
-rw-r--r-- | init.vim | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -329,6 +329,8 @@ noremap <3-X1Mouse> <C-O> noremap <M-S-ScrollWheelRight> <C-LeftMouse> +noremap <M-]> <cmd>Telescope tags<cr> + menu 0.400 PopUp.Find\ References <Cmd>norm g[r<CR> menu 0.400 PopUp.Find\ Implementers <Cmd>norm g[i<CR> menu PopUp.Split :split<cr> @@ -490,7 +492,7 @@ lua << EOF function run_format_code() local lsps = vim.lsp.buf_get_clients() - if lsps and #lsps > 0 then + if lsps then vim.lsp.buf.format() else vim.cmd("FormatCode") |