summaryrefslogtreecommitdiff
path: root/plug-config/lsp-config.vim
diff options
context:
space:
mode:
authorChris <[email protected]>2021-03-13 00:39:49 -0500
committerChris <[email protected]>2021-03-13 00:39:49 -0500
commitd16093b4225477ef5d043b2722aa59318193efbf (patch)
tree894a4c53ec954d9abd31fad3ba44edbf230078e3 /plug-config/lsp-config.vim
parentb68ac7c7b12559533801a4c4634d223eb3ece489 (diff)
beiginning java support
Diffstat (limited to 'plug-config/lsp-config.vim')
-rw-r--r--plug-config/lsp-config.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/plug-config/lsp-config.vim b/plug-config/lsp-config.vim
index 82916f79..6c6d7cf3 100644
--- a/plug-config/lsp-config.vim
+++ b/plug-config/lsp-config.vim
@@ -17,3 +17,20 @@ autocmd BufWritePre *.jsx lua vim.lsp.buf.formatting_sync(nil, 100)
autocmd BufWritePre *.lua lua vim.lsp.buf.formatting_sync(nil, 100)
" autocmd BufWritePre *.py lua vim.lsp.buf.formatting_sync(nil, 100)
+" -- `code_action` is a superset of vim.lsp.buf.code_action and you'll be able to
+" -- use this mapping also with other language servers
+
+autocmd FileType java nnoremap ca <Cmd>lua require('jdtls').code_action()<CR>
+
+
+
+" -- If using nvim-dap
+" -- This requires java-debug and vscode-java-test bundles, see install steps in this README further below.
+" nnoremap <leader>df <Cmd>lua require'jdtls'.test_class()<CR>
+" nnoremap <leader>dn <Cmd>lua require'jdtls'.test_nearest_method()<CR>
+
+command! -buffer JdtCompile lua require('jdtls').compile()
+command! -buffer JdtUpdateConfig lua require('jdtls').update_project_config()
+command! -buffer JdtJol lua require('jdtls').jol()
+command! -buffer JdtBytecode lua require('jdtls').javap()
+command! -buffer JdtJshell lua require('jdtls').jshell()