Skip to content

Commit

Permalink
Search for tsconfig-base.json to find TypeScript project root
Browse files Browse the repository at this point in the history
  • Loading branch information
dietrichm committed Sep 24, 2024
1 parent df1f0bf commit fbf2352
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nvim/.config/nvim/lua/dietrichm/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ lspconfig.intelephense.setup {

lspconfig.ts_ls.setup {
capabilities = capabilities,
root_dir = require('lspconfig.util').root_pattern(
'tsconfig-base.json',
'tsconfig.json',
'jsconfig.json',
'package.json',
'.git'
),
}

lspconfig.lua_ls.setup {
Expand Down

0 comments on commit fbf2352

Please sign in to comment.