--TODO figure out why this don't work vim.fn.sign_define("LspDiagnosticsSignError", {texthl = "LspDiagnosticsSignError", text = "", numhl = "LspDiagnosticsSignError"}) vim.fn.sign_define("LspDiagnosticsSignWarning", {texthl = "LspDiagnosticsSignWarning", text = "", numhl = "LspDiagnosticsSignWarning"}) vim.fn.sign_define("LspDiagnosticsSignInformation", {texthl = "LspDiagnosticsSignInformation", text = "", numhl = "LspDiagnosticsSignInformation"}) vim.fn.sign_define("LspDiagnosticsSignHint", {texthl = "LspDiagnosticsSignHint", text = "", numhl = "LspDiagnosticsSignHint"}) --[[ vim.fn.sign_define("LspDiagnosticsVirtualTextError", {texthl = "LspDiagnosticsVirtualTextError", text = "", numhl = "LspDiagnosticsVirtualTextError"}) vim.fn.sign_define("LspDiagnosticsVirtualTextWarning", {texthl = "LspDiagnosticsSignWarning", text = "", numhl = "LspDiagnosticsSignWarning"}) vim.fn.sign_define("LspDiagnosticsVirtualTextInformation", {texthl = "LspDiagnosticsSignInformation", text = "", numhl = "LspDiagnosticsSignInformation"}) vim.fn.sign_define("LspDiagnosticsVirtualTextHint", {texthl = "LspDiagnosticsSignHint", text = "", numhl = "LspDiagnosticsSignHint"}) ]] --[[ vim.fn.sign_define("LspDiagnosticsSignError", {text = ""}) vim.fn.sign_define("LspDiagnosticsSignWarning", {text = ""}) vim.fn.sign_define("LspDiagnosticsSignInformation", {text = ""}) vim.fn.sign_define("LspDiagnosticsSignHint", {text = ""}) ]] --[[ vim.fn.sign_define("LspDiagnosticsSignError", { text = " 🞮", numhl = "LspDiagnosticsDefaultError" }) vim.fn.sign_define("LspDiagnosticsSignWarning", { text = " ▲", numhl = "LspDiagnosticsDefaultWarning" }) vim.fn.sign_define("LspDiagnosticsSignInformation", { text = " ⁈", numhl = "LspDiagnosticsDefaultInformation" }) vim.fn.sign_define("LspDiagnosticsSignHint", { text = " ⯁", numhl = "LspDiagnosticsDefaultHint" }) ]] vim.cmd('nnoremap gd lua vim.lsp.buf.definition()') vim.cmd('nnoremap gD lua vim.lsp.buf.declaration()') vim.cmd('nnoremap gr lua vim.lsp.buf.references()') vim.cmd('nnoremap gi lua vim.lsp.buf.implementation()') vim.cmd('nnoremap ca :Lspsaga code_action') vim.cmd('nnoremap K :Lspsaga hover_doc') vim.cmd('nnoremap lua vim.lsp.buf.signature_help()') vim.cmd('nnoremap :Lspsaga diagnostic_jump_prev') vim.cmd('nnoremap :Lspsaga diagnostic_jump_next') --[[ " autoformat autocmd BufWritePre *.js lua vim.lsp.buf.formatting_sync(nil, 100) autocmd BufWritePre *.jsx lua vim.lsp.buf.formatting_sync(nil, 100) autocmd BufWritePre *.lua lua vim.lsp.buf.formatting_sync(nil, 100) ]] -- Java -- autocmd FileType java nnoremap ca lua require('jdtls').code_action()