updated formatter and java home for config config

pull/1708/head
Oluwatobi 11 months ago
parent b0b09a068c
commit a717a047cb

@ -15,7 +15,7 @@ require('conform').setup {
format_on_save = { format_on_save = {
-- I recommend these options. See :help conform.format for details. -- I recommend these options. See :help conform.format for details.
lsp_fallback = true, lsp_fallback = true,
timeout_ms = 500, timeout_ms = 600,
}, },
-- If this is set, Conform will run the formatter asynchronously after save. -- If this is set, Conform will run the formatter asynchronously after save.
-- It will pass the table to conform.format(). -- It will pass the table to conform.format().
@ -25,9 +25,9 @@ require('conform').setup {
}, },
} }
vim.api.nvim_create_autocmd('BufWritePre', { -- vim.api.nvim_create_autocmd('BufWritePre', {
pattern = '*', -- pattern = '*',
callback = function(args) -- callback = function(args)
require('conform').format { bufnr = args.buf } -- require('conform').format { bufnr = args.buf }
end, -- end,
}) -- })

@ -1,2 +1,18 @@
local java_21_home_dir = '/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/bin/java'
require('java').setup() require('java').setup()
require('lspconfig').jdtls.setup {} require('lspconfig').jdtls.setup {
settings = {
java = {
configuration = {
runtimes = {
{
name = 'JavaSE-21',
path = java_21_home_dir .. '/bin/java',
default = true,
},
},
},
},
},
}

Loading…
Cancel
Save