diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2025-05-04 14:11:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-04 14:11:18 -0700 |
| commit | 2a6517453feb6f00e3d64bcb4fde61934897f4bd (patch) | |
| tree | dc681744b655f6eb40478ef6d7ae5495686f2b71 /lsp/kotlin_language_server.lua | |
| parent | feat: support :LspStart/LspRestart in Nvim 0.11.2+ #3734 (diff) | |
| download | nvim-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.lua | 8 |
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), }, } |
