diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2025-04-26 15:59:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-26 15:59:54 -0700 |
| commit | 3dde1b87963ed93bf1c7e63392fbc5e60520f2ad (patch) | |
| tree | 2e987572b9a055d6718f2eda6d16e82b72bfc9a5 /lsp/volar.lua | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-3dde1b87963ed93bf1c7e63392fbc5e60520f2ad.tar nvim-lspconfig-3dde1b87963ed93bf1c7e63392fbc5e60520f2ad.tar.gz nvim-lspconfig-3dde1b87963ed93bf1c7e63392fbc5e60520f2ad.tar.bz2 nvim-lspconfig-3dde1b87963ed93bf1c7e63392fbc5e60520f2ad.tar.lz nvim-lspconfig-3dde1b87963ed93bf1c7e63392fbc5e60520f2ad.tar.xz nvim-lspconfig-3dde1b87963ed93bf1c7e63392fbc5e60520f2ad.tar.zst nvim-lspconfig-3dde1b87963ed93bf1c7e63392fbc5e60520f2ad.zip | |
docs: cleanup #3791
Diffstat (limited to 'lsp/volar.lua')
| -rw-r--r-- | lsp/volar.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lsp/volar.lua b/lsp/volar.lua index 99682977..80c08e12 100644 --- a/lsp/volar.lua +++ b/lsp/volar.lua @@ -24,7 +24,7 @@ --- ```lua --- local lspconfig = require('lspconfig') --- ---- lspconfig.volar.setup { +--- vim.lsp.config('volar', { --- -- add filetypes for typescript, javascript and vue --- filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' }, --- init_options = { @@ -33,9 +33,9 @@ --- hybridMode = false, --- }, --- }, ---- } ---- -- you must remove ts_ls setup ---- -- lspconfig.ts_ls.setup {} +--- }) +--- -- you must remove "ts_ls" config +--- -- vim.lsp.config['ts_ls'] = {} --- ``` --- --- **Overriding the default TypeScript Server used by Volar** @@ -45,19 +45,19 @@ --- --- - use a global TypeScript Server installation --- ```lua ---- require'lspconfig'.volar.setup { +--- vim.lsp.config('volar', { --- init_options = { --- typescript = { --- -- replace with your global TypeScript library path --- tsdk = '/path/to/node_modules/typescript/lib' --- } --- } ---- } +--- }) --- ``` --- --- - use a local server and fall back to a global TypeScript Server installation --- ```lua ---- require'lspconfig'.volar.setup { +--- vim.lsp.config('volar', { --- init_options = { --- typescript = { --- -- replace with your global TypeScript library path @@ -70,7 +70,7 @@ --- new_config.init_options.typescript.tsdk = lib_path --- end --- end ---- } +--- }) --- ``` local function get_typescript_server_path(root_dir) |
