aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-04-20 12:02:43 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-04-20 12:02:43 +0100
commitdbc8ca87edb1c92b6c4422c206db4415cfa1e1d2 (patch)
treec2059b73a5e943b8d0e81060621aa6b618ec15f6
parentd14d5e4dc1f352ace6e1a665558fb1bfc4d677de (diff)
downloaddotnvim-dbc8ca87edb1c92b6c4422c206db4415cfa1e1d2.tar.gz
dotnvim-dbc8ca87edb1c92b6c4422c206db4415cfa1e1d2.zip
Use format
-rw-r--r--haskell.vim2
-rw-r--r--lsp.lua2
-rw-r--r--metals.vim4
3 files changed, 4 insertions, 4 deletions
diff --git a/haskell.vim b/haskell.vim
index b61a36e..ea9ca26 100644
--- a/haskell.vim
+++ b/haskell.vim
@@ -1,5 +1,5 @@
" haskell LSP settings
"
autocmd FileType haskell setlocal omnifunc=v:lua.vim.lsp.omnifunc
-autocmd BufWritePre *.hs :lua vim.lsp.buf.formatting_seq_sync()
+autocmd BufWritePre *.hs :lua vim.lsp.buf.format()
diff --git a/lsp.lua b/lsp.lua
index 295fcb3..16a25b8 100644
--- a/lsp.lua
+++ b/lsp.lua
@@ -93,7 +93,7 @@ vim.diagnostic.config({ virtual_text = false, signs = true })
-- for go
-- install gopls with: go install golang.org/x/tools/gopls@latest
-vim.cmd([[autocmd BufWritePre *.go :lua vim.lsp.buf.formatting_seq_sync()]])
+vim.cmd([[autocmd BufWritePre *.go :lua vim.lsp.buf.format()]])
-- for trouble
require("trouble").setup()
diff --git a/metals.vim b/metals.vim
index 5203ee2..c9dfae9 100644
--- a/metals.vim
+++ b/metals.vim
@@ -24,7 +24,7 @@ function! MetalsMapKeys() abort
nnoremap <buffer> gsh <cmd>lua vim.lsp.buf.signature_help()<CR>
nnoremap <buffer> <leader>rn <cmd>lua vim.lsp.buf.rename()<CR>
nnoremap <buffer> <leader>oi <cmd>lua require('metals').organize_imports()<CR>
- nnoremap <buffer> <leader>F <cmd>lua vim.lsp.buf.formatting()<CR>
+ nnoremap <buffer> <leader>F <cmd>lua vim.lsp.buf.format()<CR>
nnoremap <buffer> <leader>ca <cmd>lua vim.lsp.buf.code_action()<CR>
nnoremap <buffer> <leader>aw <cmd>lua vim.diagnostic.setqflist({severity = "W"})<CR>
nnoremap <buffer> <leader>a <cmd>lua vim.diagnostic.setqflist()<CR>
@@ -45,6 +45,6 @@ augroup end
"
autocmd FileType scala setlocal omnifunc=v:lua.vim.lsp.omnifunc
autocmd FileType scala call MetalsMapKeys()
-autocmd BufWritePre *.scala,*.sc,*.sbt :lua vim.lsp.buf.formatting_seq_sync()
+autocmd BufWritePre *.scala,*.sc,*.sbt :lua vim.lsp.buf.format()
autocmd BufNewFile,BufRead *.sc set filetype=scala