commit ef416e0f24d496febc3ec06d5521de53d1cf21a0
parent 6df103e08e4ae5c36ed61b0590180acd6acab59a
Author: Tomas Nemec <owl@gtms.dev>
Date: Wed, 18 Sep 2024 06:09:29 +0200
update
Diffstat:
5 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/after/plugin/dap.lua b/after/plugin/dap.lua
@@ -38,7 +38,6 @@ end, { silent = true, desc = 'DAP Set Log Point' })
local has_dapui, dapui = pcall(require, 'dapui')
if has_dapui then
dapui.setup({
-
layouts = {
{
elements = {
@@ -55,8 +54,8 @@ if has_dapui then
elements = { 'repl' },
size = 0.25, -- 25% of total lines
position = 'bottom',
- },
- },
+ }
+ }
})
dap.listeners.after.event_initialized['dapui_config'] = function()
diff --git a/ftplugin/dart.lua b/ftplugin/dart.lua
@@ -9,6 +9,8 @@ vim.opt_local.shiftwidth = 2
vim.opt_local.formatoptions:remove('t')
vim.opt_local.makeprg = [[dart %]]
vim.opt_local.efm = [[%f:%l:%c: %m]]
+vim.opt_local.foldmethod = 'expr'
+vim.opt_local.foldlevel = 99
vim.b.undo_ftplugin = 'setl com< cms< inex< isf<'
vim.cmd.iabbrev('STring', 'String')
diff --git a/ftplugin/java.lua b/ftplugin/java.lua
@@ -4,6 +4,13 @@ vim.o.shiftwidth = 4
local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ':p:h:t')
local root_dir = vim.fs.root(0, { ".git", "pom.xml", "mvnw", "gradlew" })
+local bundles = {
+ vim.fn.glob(vim.env.MASON .. "/packages/java-debug-adapter/extension/server/com.microsoft.java.debug.plugin-*.jar",
+ true)
+}
+vim.list_extend(bundles,
+ vim.split(vim.fn.glob(vim.env.MASON .. "/packages/java-test/extension/server/*.jar", true), "\n"))
+
-- See `:help vim.lsp.start_client` for an overview of the supported `config` options.
local config = {
-- The command that starts the language server
@@ -25,7 +32,9 @@ local config = {
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
-- repository/org/projectlombok/lombok/1.18.30/lombok-1.18.30.jar
- "-javaagent:" .. vim.env.XDG_DATA_HOME .. "/maven/repository/org/projectlombok/lombok/1.18.30/lombok-1.18.30.jar",
+ "-javaagent:" ..
+ vim.env.XDG_DATA_HOME ..
+ "/containers/storage/volumes/maven/_data/repository/org/projectlombok/lombok/1.18.34/lombok-1.18.34.jar",
-- 💀
'-jar', vim.env.MASON .. '/packages/jdtls/plugins/org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar',
@@ -67,7 +76,7 @@ local config = {
}
},
maven = {
- userSettings = root_dir .. '/maven-settings.xml'
+ userSettings = root_dir .. '/maven-settings-local.xml'
}
}
}
@@ -81,11 +90,13 @@ local config = {
--
-- If you don't plan on using the debugger or other eclipse.jdt.ls plugins you can remove this
init_options = {
- bundles = {},
+ bundles = bundles,
},
}
-
-- This starts a new client & server,
-- or attaches to an existing client & server depending on the `root_dir`.
require('jdtls').start_or_attach(config)
--- require('jdtls').setup_dap()
+
+vim.api.nvim_create_user_command('JdtTestClass', require 'jdtls'.test_class, {desc='Test Class'})
+vim.api.nvim_create_user_command('JdtTestMethod', require 'jdtls'.test_nearest_method, {desc='Test Nearest Method'})
+vim.api.nvim_create_user_command('JdtTestPick', require 'jdtls'.pick_test, {desc = 'Pick Test'})
diff --git a/lua/plugins.lua b/lua/plugins.lua
@@ -71,6 +71,7 @@ return require('paq') {
'Exafunction/codeium.vim',
'mfussenegger/nvim-dap',
'leoluz/nvim-dap-go',
+ 'nvim-neotest/nvim-nio',
'rcarriga/nvim-dap-ui',
'theHamsta/nvim-dap-virtual-text',
'mxsdev/nvim-dap-vscode-js',
diff --git a/plugin/options.lua b/plugin/options.lua
@@ -33,8 +33,9 @@ vim.opt.statusline = ' '
vim.opt.winbar = '%=%m %f'
vim.opt.ruler = false
vim.opt.listchars = { space = '·', tab = '» ', extends = '›', precedes = '‹', nbsp = '_', trail = '_', eol = '$' }
-vim.opt.fillchars = { eob = '•', diff = '╱' }
+vim.opt.fillchars = { eob = '•', diff = '╱', fold = '•' }
vim.opt.scrolloff = 5
vim.opt.sidescrolloff = 5
vim.opt.signcolumn = 'yes:1'
vim.opt.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
+vim.opt.foldtext = ''