diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-04-20 12:02:43 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-04-20 12:02:43 +0100 |
commit | dbc8ca87edb1c92b6c4422c206db4415cfa1e1d2 (patch) | |
tree | c2059b73a5e943b8d0e81060621aa6b618ec15f6 | |
parent | d14d5e4dc1f352ace6e1a665558fb1bfc4d677de (diff) | |
download | dotnvim-dbc8ca87edb1c92b6c4422c206db4415cfa1e1d2.tar.gz dotnvim-dbc8ca87edb1c92b6c4422c206db4415cfa1e1d2.zip |
Use format
-rw-r--r-- | haskell.vim | 2 | ||||
-rw-r--r-- | lsp.lua | 2 | ||||
-rw-r--r-- | metals.vim | 4 |
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() @@ -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() @@ -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 |