diff options
| author | HiPhish <hiphish@posteo.de> | 2020-09-30 16:41:28 +0200 |
|---|---|---|
| committer | HiPhish <hiphish@posteo.de> | 2020-11-15 15:51:34 +0100 |
| commit | 80aae45eecc4a056bc85302a1032e219eed7ce00 (patch) | |
| tree | b19af50f69c9d2c8866560f52fa5979185442fd5 /lua/lspconfig/kotlin_language_server.lua | |
| parent | [docgen] Update README.md (diff) | |
| download | nvim-lspconfig-80aae45eecc4a056bc85302a1032e219eed7ce00.tar nvim-lspconfig-80aae45eecc4a056bc85302a1032e219eed7ce00.tar.gz nvim-lspconfig-80aae45eecc4a056bc85302a1032e219eed7ce00.tar.bz2 nvim-lspconfig-80aae45eecc4a056bc85302a1032e219eed7ce00.tar.lz nvim-lspconfig-80aae45eecc4a056bc85302a1032e219eed7ce00.tar.xz nvim-lspconfig-80aae45eecc4a056bc85302a1032e219eed7ce00.tar.zst nvim-lspconfig-80aae45eecc4a056bc85302a1032e219eed7ce00.zip | |
Kotlin LS: Add more root pattern files
Diffstat (limited to 'lua/lspconfig/kotlin_language_server.lua')
| -rw-r--r-- | lua/lspconfig/kotlin_language_server.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lua/lspconfig/kotlin_language_server.lua b/lua/lspconfig/kotlin_language_server.lua index e79a168c..00aa6242 100644 --- a/lua/lspconfig/kotlin_language_server.lua +++ b/lua/lspconfig/kotlin_language_server.lua @@ -14,10 +14,25 @@ if vim.fn.has('win32') == 1 then bin_name = bin_name..".bat" end + +--- The presence of one of these files indicates a project root directory +-- +-- These are configuration files for the various build systems supported by +-- Kotlin. I am not sure whether the language server supports Ant projects, +-- but I'm keeping it here as well since Ant does support Kotlin. +local root_files = { + 'build.xml', -- Ant + 'pom.xml', -- Maven + 'build.gradle', -- Gradle + 'build.gradle.kts', -- Gradle + 'settings.gradle', -- Gradle + 'settings.gradle.kts', -- Gradle +} + configs.kotlin_language_server = { default_config = { filetypes = { "kotlin" }; - root_dir = util.root_pattern("settings.gradle"); + root_dir = util.root_pattern(unpack(root_files)); cmd = { bin_name }; }; docs = { |
