diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/gradle_ls.lua | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lua/lspconfig/server_configurations/gradle_ls.lua b/lua/lspconfig/server_configurations/gradle_ls.lua index 47091b2d..6af1ee66 100644 --- a/lua/lspconfig/server_configurations/gradle_ls.lua +++ b/lua/lspconfig/server_configurations/gradle_ls.lua @@ -7,18 +7,13 @@ end local root_files = { 'settings.gradle', -- Gradle (multi-project) -} - -local fallback_root_files = { 'build.gradle', -- Gradle } return { default_config = { filetypes = { 'groovy' }, - root_dir = function(fname) - return util.root_pattern(unpack(root_files))(fname) or util.root_pattern(unpack(fallback_root_files))(fname) - end, + root_dir = util.root_pattern(unpack(root_files)), cmd = { bin_name }, -- gradle-language-server expects init_options.settings to be defined init_options = { @@ -36,7 +31,7 @@ Microsoft's lsp server for gradle files If you're setting this up manually, build vscode-gradle using `./gradlew installDist` and point `cmd` to the `gradle-language-server` generated in the build directory ]], default_config = { - root_dir = [[root_pattern("settings.gradle")]], + root_dir = [[root_pattern("settings.gradle", "build.gradle")]], cmd = { 'gradle-language-server' }, init_options = { settings = { |
