summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2025-04-11 23:54:40 -0600
committerJosh Rahm <joshuarahm@gmail.com>2025-04-11 23:54:40 -0600
commit8fce7d2fd0ac56c87cabf049e0c4f32191ade0ec (patch)
treedf1eaab478348c1a92771071766435b56e0fc56b
parentf031167d775e2729fc76830004043efef1318ed5 (diff)
downloadconfig.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.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.vim b/init.vim
index 3b4c141..bca3c9d 100644
--- a/init.vim
+++ b/init.vim
@@ -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")