diff options
| author | Ariel <dalessandro.ariel@gmail.com> | 2022-10-09 09:56:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-09 15:56:33 +0800 |
| commit | 87c8c7ba29e8e07ef7e7d551d4e7a58345c50b9f (patch) | |
| tree | 73d80a2c5d3ad8feedcfd5b60bb4538089f59c9a /lua | |
| parent | fix: lspconfig help command typo (#2178) (diff) | |
| download | nvim-lspconfig-87c8c7ba29e8e07ef7e7d551d4e7a58345c50b9f.tar nvim-lspconfig-87c8c7ba29e8e07ef7e7d551d4e7a58345c50b9f.tar.gz nvim-lspconfig-87c8c7ba29e8e07ef7e7d551d4e7a58345c50b9f.tar.bz2 nvim-lspconfig-87c8c7ba29e8e07ef7e7d551d4e7a58345c50b9f.tar.lz nvim-lspconfig-87c8c7ba29e8e07ef7e7d551d4e7a58345c50b9f.tar.xz nvim-lspconfig-87c8c7ba29e8e07ef7e7d551d4e7a58345c50b9f.tar.zst nvim-lspconfig-87c8c7ba29e8e07ef7e7d551d4e7a58345c50b9f.zip | |
feat: support volar 1.0 (#2181)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/volar.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lua/lspconfig/server_configurations/volar.lua b/lua/lspconfig/server_configurations/volar.lua index 92f41332..0b536c96 100644 --- a/lua/lspconfig/server_configurations/volar.lua +++ b/lua/lspconfig/server_configurations/volar.lua @@ -2,14 +2,13 @@ local util = require 'lspconfig.util' local function get_typescript_server_path(root_dir) local project_root = util.find_node_modules_ancestor(root_dir) - return project_root and (util.path.join(project_root, 'node_modules', 'typescript', 'lib', 'tsserverlibrary.js')) - or '' + return project_root and (util.path.join(project_root, 'node_modules', 'typescript', 'lib')) or '' end -- https://github.com/johnsoncodehk/volar/blob/master/packages/shared/src/types.ts local volar_init_options = { typescript = { - serverPath = '', + tsdk = '', }, languageFeatures = { implementation = true, @@ -63,9 +62,9 @@ return { if new_config.init_options and new_config.init_options.typescript - and new_config.init_options.typescript.serverPath == '' + and new_config.init_options.typescript.tsdk == '' then - new_config.init_options.typescript.serverPath = get_typescript_server_path(new_root_dir) + new_config.init_options.typescript.tsdk = get_typescript_server_path(new_root_dir) end end, }, |
