From 2a6517453feb6f00e3d64bcb4fde61934897f4bd Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 4 May 2025 14:11:18 -0700 Subject: fix(configs): eliminate some usages of root_pattern #3820 Problem: `root_pattern` is not necessary for non-glob patterns. Solution: Replace non-glob cases with `vim.fs.root()`.. --- lsp/kotlin_language_server.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lsp/kotlin_language_server.lua') diff --git a/lsp/kotlin_language_server.lua b/lsp/kotlin_language_server.lua index 661822e5..d70afa78 100644 --- a/lsp/kotlin_language_server.lua +++ b/lsp/kotlin_language_server.lua @@ -16,10 +16,6 @@ --- For faster startup, you can setup caching by specifying a storagePath --- in the init_options. The default is your home directory. -local util = require 'lspconfig.util' - -local bin_name = 'kotlin-language-server' - --- The presence of one of these files indicates a project root directory -- -- These are configuration files for the various build systems supported by @@ -37,9 +33,9 @@ local root_files = { return { filetypes = { 'kotlin' }, root_markers = root_files, - cmd = { bin_name }, -- kotlin-language-server + cmd = { 'kotlin-language-server' }, init_options = { -- Enables caching and use project root to store cache data. - storagePath = util.root_pattern(unpack(root_files))(vim.fn.expand '%:p:h'), + storagePath = vim.fs.root(vim.fn.expand '%:p:h', root_files), }, } -- cgit v1.2.3-70-g09d2