aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/kotlin_language_server.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-05-04 14:11:18 -0700
committerGitHub <noreply@github.com>2025-05-04 14:11:18 -0700
commit2a6517453feb6f00e3d64bcb4fde61934897f4bd (patch)
treedc681744b655f6eb40478ef6d7ae5495686f2b71 /lsp/kotlin_language_server.lua
parentfeat: support :LspStart/LspRestart in Nvim 0.11.2+ #3734 (diff)
downloadnvim-lspconfig-2a6517453feb6f00e3d64bcb4fde61934897f4bd.tar
nvim-lspconfig-2a6517453feb6f00e3d64bcb4fde61934897f4bd.tar.gz
nvim-lspconfig-2a6517453feb6f00e3d64bcb4fde61934897f4bd.tar.bz2
nvim-lspconfig-2a6517453feb6f00e3d64bcb4fde61934897f4bd.tar.lz
nvim-lspconfig-2a6517453feb6f00e3d64bcb4fde61934897f4bd.tar.xz
nvim-lspconfig-2a6517453feb6f00e3d64bcb4fde61934897f4bd.tar.zst
nvim-lspconfig-2a6517453feb6f00e3d64bcb4fde61934897f4bd.zip
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()`..
Diffstat (limited to 'lsp/kotlin_language_server.lua')
-rw-r--r--lsp/kotlin_language_server.lua8
1 files changed, 2 insertions, 6 deletions
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),
},
}