aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/jdtls.lua
Commit message (Collapse)AuthorAgeFilesLines
* fix(jdtls): swap settings.gradle, build.gradle in root markers #4142Tomas Slusny2025-10-221-6/+6
| | | | | | | | settings.gradle is marker for multi-module Gradle projects. See: https://docs.gradle.org/current/userguide/multi_project_builds.html Closes: #4137 Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
* chore(jdtls): use config.root_dir instead of config.root_markers #4107Tomas Slusny2025-09-301-6/+3
| | | | | | | | The root dir is already pre-resolved when the config is being passed (when changing the code originally i looked and used wrong config type so i missed this). So use the pre-resolved value instead of resolving it again. Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
* fix(jdtls): use project-local workspace dir, remove unused options #4105Tomas Slusny2025-09-291-29/+30
| | | | | | | | | | | | | | - https://github.com/eclipse-jdtls/eclipse.jdt.ls?tab=readme-ov-file#running-from-the-command-line: `-data` dir needs to be project-local and not shared. override cmd with function. also use stdpath.cache like other lsp servers already do - https://github.com/eclipse-jdtls/eclipse.jdt.ls/wiki/Running-the-JAVA-LS-server-from-the-command-line#initialize-request `jvm_args`, `workspace`, `os_config` are not part of jdtls init_options - https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/dbe1db974e9b4b472b8b1063fe7e5e7fc2a1fb7f/org.eclipse.jdt.ls.product/scripts/jdtls.py#L102 jdtls already sets correct shared configuration path, `-configuration` is not needed (and it is os-specific value so current config is wrong) Closes #4103 Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
* fix(jdtls): increase priority of ".git", add "mvnw", "gradlew" #4104Tomas Slusny2025-09-291-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Using git directory as last resort before defaulting to pom.xml is important for multi module maven projects. Example of structure: pom.xml submodule-a/pom.xml submodule-b/pom.xml If sumbodule-b depends on submodule-a (common pattern for dto/impl), the parent usually has info about linking the 2 projects (and without that go to definition etc will jump to compiled source that might not be present/up t date). This structure is also fine and do not breaks jdtls: my-project/pom.xml e.g its fine if working directory is git repo root (and this pattern is also much less common than multi module maven projects that without this change break always). Closes #4102 Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
* fix(jdtls): lower priority of ".git" root marker #4090dareni2025-09-221-11/+16
|
* fix(jdtls): remove nonstandard WorkspaceEdit version handlers #4071Robert Muir2025-09-111-45/+0
| | | | | | | | Remove custom handlers and version fix for WorkspaceEdit, as jdtls now conforms to the LSP spec (eclipse-jdtls/eclipse.jdt.ls#1742) See eclipse-jdtls/eclipse.jdt.ls#1695 for more background on why the workaround was introduced. The original problem was fixed in the upstream LSP server four years ago: remove the workaround.
* fix(jdtls): remove nonstandard progress handler #4068Robert Muir2025-09-101-9/+0
| | | | | | | | | | Problem: The nonstandard progress handler was added in #2153 but it can cause some undesirable side-effects out of box ("press enter"). The original bug (mfussenegger/nvim-jdtls#327) was fixed upstream in the language server three years ago (eclipse-jdtls/eclipse.jdt.ls#2258). Solution: Remove the workaround. Standard progress works.
* chore: add type annotation for configsIgor2025-08-181-0/+1
|
* docs: cleanupJustin M. Keyes2025-04-181-33/+34
| | | | | - brief should live at the top of each file - fix indentation for some docs
* fix(docs): docgen.lua reads from `lua/*.lua` #3708Justin M. Keyes2025-04-121-1/+1
| | | | | | | | Problem: Since configs now live in `lsp/`, the docgen needs to be updated. Solution: Read the configs from `lsp/`. Parse the `@brief` docstring to get the docs.
* feat: migrate to vim.lsp.config #3659Lorenzo Bellina2025-04-121-0/+145
Problem: Nvim 0.11 has vim.lsp.config, which mostly replaces the legacy nvim-lspconfig "framework". Solution: Migrate all configs to `lsp/*` variants. The old configs in `lua/lspconfig/` are "frozen". The new configs include these changes: - `commands` field became raw calls to `vim.api.nvim_buf_create_user_command` inside `on_attach`. - `root_dir` became: - `root_markers` whenever the file list was simple didn't need to mach `*` - if the logic was complicated, or needed to match something like '\*.c', it was defined as a vim.lsp.Config `root_dir` callback. - `on_config_change` became `before_init`. I don't actually know if this is the correct approach, but looking around the documentation of `nvim-lspconfig` a saw that it was defined as the function that gets called as soon as the config have `root_dir`, and so I thought `before_init` might be the closest alternative. - `docs.description` became a luadoc `@brief` docstring. - `single_file_support = false`? Co-authored-by: Aliou Diallo <aliou@users.noreply.github.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>