Skip to content

Commit

Permalink
fix: account for gradle.kts
Browse files Browse the repository at this point in the history
I realized that we only detected build.gradle in the past and not
actually build.gradle.kts as a root pattern. This could cause
nvim-metals not to correctly determine the root for gradle projects.

Closes #665
  • Loading branch information
ckipp01 committed Apr 23, 2024
1 parent 4f9bf0c commit f912a2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/metals/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ local function validate_config(config, bufnr)
-- custom patters to be passed in without doing the entire root_dir logic
-- yourself.
config.root_patterns = config.root_patterns
or { "build.sbt", "build.sc", "build.gradle", "pom.xml", ".scala-build", "bleep.yaml", ".git" }
or { "build.sbt", "build.sc", "build.gradle", "build.gradle.kts", "pom.xml", ".scala-build", "bleep.yaml", ".git" }

local bufname = api.nvim_buf_get_name(bufnr)

Expand Down

0 comments on commit f912a2b

Please sign in to comment.