diff options
author | Rafael <[email protected]> | 2021-07-04 22:14:01 -0300 |
---|---|---|
committer | Rafael <[email protected]> | 2021-07-04 22:14:01 -0300 |
commit | 9f511bcb594b7e2461c97cb8182603928c773c2f (patch) | |
tree | c08a825ae91201fb0062dbd7a8094357f5c78dc9 /ftplugin/kotlin.lua | |
parent | b461c878e6f70a6795d0e9b438335ccfecbb4bd9 (diff) |
start formatting rules
Diffstat (limited to 'ftplugin/kotlin.lua')
-rw-r--r-- | ftplugin/kotlin.lua | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/ftplugin/kotlin.lua b/ftplugin/kotlin.lua index fcbb736b..dbd800b9 100644 --- a/ftplugin/kotlin.lua +++ b/ftplugin/kotlin.lua @@ -6,31 +6,29 @@ --- https://github.com/udalov/kotlin-vim (recommended) --- Note that there is no LICENSE specified yet. -local util = require 'lspconfig/util' +local util = require "lspconfig/util" local bin_name = DATA_PATH .. "/lspinstall/kotlin/server/bin/kotlin-language-server" -if vim.fn.has('win32') == 1 then - bin_name = bin_name..".bat" +if vim.fn.has "win32" == 1 then + bin_name = bin_name .. ".bat" end local root_files = { - 'settings.gradle', -- Gradle (multi-project) - 'settings.gradle.kts', -- Gradle (multi-project) - 'build.xml', -- Ant - 'pom.xml', -- Maven + "settings.gradle", -- Gradle (multi-project) + "settings.gradle.kts", -- Gradle (multi-project) + "build.xml", -- Ant + "pom.xml", -- Maven } local fallback_root_files = { - 'build.gradle', -- Gradle - 'build.gradle.kts', -- Gradle + "build.gradle", -- Gradle + "build.gradle.kts", -- Gradle } -require'lspconfig'.kotlin_language_server.setup { - cmd = {bin_name}, - on_attach = require'lsp'.common_on_attach, - root_dir = function(fname) - return util.root_pattern(unpack(root_files))(fname) or - util.root_pattern(unpack(fallback_root_files))(fname) - end +require("lspconfig").kotlin_language_server.setup { + cmd = { bin_name }, + on_attach = require("lsp").common_on_attach, + root_dir = function(fname) + return util.root_pattern(unpack(root_files))(fname) or util.root_pattern(unpack(fallback_root_files))(fname) + end, } - |