From 97f0ace7dedb0f7e0a9c411b28cf86eccf2bdd3c Mon Sep 17 00:00:00 2001 From: Landon Schropp Date: Thu, 14 Oct 2021 20:53:14 -0500 Subject: docs(tsserver): document tsconfig.json and jsconfig.json (#1304) --- lua/lspconfig/tsserver.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lua') diff --git a/lua/lspconfig/tsserver.lua b/lua/lspconfig/tsserver.lua index 36429b1f..6a23ae05 100644 --- a/lua/lspconfig/tsserver.lua +++ b/lua/lspconfig/tsserver.lua @@ -32,6 +32,26 @@ https://github.com/theia-ide/typescript-language-server ```sh npm install -g typescript typescript-language-server ``` + +To configure type language server, add a +[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) or +[`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to the root of your +project. + +Here's an example that disables type checking in JavaScript files. + +```json +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "checkJs": false + }, + "exclude": [ + "node_modules" + ] +} +``` ]], default_config = { root_dir = [[root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git")]], -- cgit v1.2.3-70-g09d2