remove unused
This commit is contained in:
parent
7c52c6e67f
commit
fbc08b15bd
@ -67,10 +67,7 @@ end
|
|||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
--[[ vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') ]]
|
--[[ vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') ]]
|
||||||
lsp_keymaps(bufnr)
|
lsp_keymaps(bufnr)
|
||||||
if client.name == 'jdtls' then
|
if client.name == 'jdtls' or client.name == 'jdt.ls' then
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
end
|
|
||||||
if client.name == 'jdt.ls' then
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
vim.lsp.codelens.refresh()
|
vim.lsp.codelens.refresh()
|
||||||
if JAVA_DAP_ACTIVE then
|
if JAVA_DAP_ACTIVE then
|
||||||
@ -251,46 +248,3 @@ keymap('n', '<leader>ju', '<Cmd>JdtUpdateConfig<CR>', opts)
|
|||||||
keymap('v', '<leader>jv', "<Esc><Cmd>lua require('jdtls').extract_variable(true)<CR>", opts)
|
keymap('v', '<leader>jv', "<Esc><Cmd>lua require('jdtls').extract_variable(true)<CR>", opts)
|
||||||
keymap('v', '<leader>jc', "<Esc><Cmd>lua require('jdtls').extract_constant(true)<CR>", opts)
|
keymap('v', '<leader>jc', "<Esc><Cmd>lua require('jdtls').extract_constant(true)<CR>", opts)
|
||||||
keymap('v', '<leader>jm', "<Esc><Cmd>lua require('jdtls').extract_method(true)<CR>", opts)
|
keymap('v', '<leader>jm', "<Esc><Cmd>lua require('jdtls').extract_method(true)<CR>", opts)
|
||||||
|
|
||||||
local wk = require 'which-key'
|
|
||||||
local optsj = {
|
|
||||||
mode = 'n', -- NORMAL mode
|
|
||||||
prefix = '<leader>',
|
|
||||||
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
|
|
||||||
silent = true, -- use `silent` when creating keymaps
|
|
||||||
noremap = true, -- use `noremap` when creating keymaps
|
|
||||||
nowait = true, -- use `nowait` when creating keymaps
|
|
||||||
}
|
|
||||||
|
|
||||||
local vopts = {
|
|
||||||
mode = 'v', -- VISUAL mode
|
|
||||||
prefix = '<leader>',
|
|
||||||
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
|
|
||||||
silent = true, -- use `silent` when creating keymaps
|
|
||||||
noremap = true, -- use `noremap` when creating keymaps
|
|
||||||
nowait = true, -- use `nowait` when creating keymaps
|
|
||||||
}
|
|
||||||
|
|
||||||
local mappingsj = {
|
|
||||||
L = {
|
|
||||||
name = 'Java',
|
|
||||||
o = { "<Cmd>lua require'jdtls'.organize_imports()<CR>", 'Organize Imports' },
|
|
||||||
v = { "<Cmd>lua require('jdtls').extract_variable()<CR>", 'Extract Variable' },
|
|
||||||
c = { "<Cmd>lua require('jdtls').extract_constant()<CR>", 'Extract Constant' },
|
|
||||||
t = { "<Cmd>lua require'jdtls'.test_nearest_method()<CR>", 'Test Method' },
|
|
||||||
T = { "<Cmd>lua require'jdtls'.test_class()<CR>", 'Test Class' },
|
|
||||||
u = { '<Cmd>JdtUpdateConfig<CR>', 'Update Config' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local vmappings = {
|
|
||||||
L = {
|
|
||||||
name = 'Java',
|
|
||||||
v = { "<Esc><Cmd>lua require('jdtls').extract_variable(true)<CR>", 'Extract Variable' },
|
|
||||||
c = { "<Esc><Cmd>lua require('jdtls').extract_constant(true)<CR>", 'Extract Constant' },
|
|
||||||
m = { "<Esc><Cmd>lua require('jdtls').extract_method(true)<CR>", 'Extract Method' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
wk.register(mappingsj, optsj)
|
|
||||||
wk.register(vmappings, vopts)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user