diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/kotlin_language_server.lua | 29 | ||||
| -rw-r--r-- | lua/lspconfig/server_configurations/psalm.lua | 5 |
2 files changed, 12 insertions, 22 deletions
diff --git a/lua/lspconfig/server_configurations/kotlin_language_server.lua b/lua/lspconfig/server_configurations/kotlin_language_server.lua index 4f79b2a3..a151403a 100644 --- a/lua/lspconfig/server_configurations/kotlin_language_server.lua +++ b/lua/lspconfig/server_configurations/kotlin_language_server.lua @@ -24,6 +24,9 @@ return { filetypes = { 'kotlin' }, root_dir = util.root_pattern(unpack(root_files)), cmd = { bin_name }, + init_options = { + storagePath = util.root_pattern(unpack(root_files))(vim.fn.expand '%:p:h'), + }, }, docs = { description = [[ @@ -39,28 +42,16 @@ return { You could refer for this capability to: https://github.com/udalov/kotlin-vim (recommended) Note that there is no LICENSE specified yet. + + For faster startup, you can setup caching by specifying a storagePath + in the init_options. The default is your home directory. ]], default_config = { - root_dir = [[root_pattern("settings.gradle")]], + root_dir = [[See source]], cmd = { 'kotlin-language-server' }, - capabilities = [[ - smart code completion, - diagnostics, - hover, - document symbols, - definition lookup, - method signature help, - dependency resolution, - additional plugins from: https://github.com/fwcd - - Snipped of License (refer to source for full License): - - The MIT License (MIT) - - Copyright (c) 2016 George Fraser - Copyright (c) 2018 fwcd - - ]], + init_options = { + storagePath = [[Enables caching and use project root to store cache data. See source]], + }, }, }, } diff --git a/lua/lspconfig/server_configurations/psalm.lua b/lua/lspconfig/server_configurations/psalm.lua index 8c61839c..f0f25f2a 100644 --- a/lua/lspconfig/server_configurations/psalm.lua +++ b/lua/lspconfig/server_configurations/psalm.lua @@ -1,9 +1,8 @@ local util = require 'lspconfig.util' - return { default_config = { - cmd = {'psalm', '--language-server'}, + cmd = { 'psalm', '--language-server' }, filetypes = { 'php' }, root_dir = util.root_pattern('psalm.xml', 'psalm.xml.dist'), }, @@ -17,7 +16,7 @@ composer global require vimeo/psalm ``` ]], default_config = { - cmd = {'psalm', '--language-server'}, + cmd = { 'psalm', '--language-server' }, root_dir = [[root_pattern("psalm.xml", "psalm.xml.dist")]], }, }, |
