From 4530bdfb56502496433c3a2f3bb9ea862118aa96 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Tue, 17 Dec 2024 11:12:03 +0000 Subject: [PATCH] fix(vim): start ts_lsp in monorepo When you are in a monorepo you don't always have a tsconfig in the root. You do however have a yarn.lock. This will now start ts_ls when it finds a yarn.lock in the root of the repo. --- site-modules/core/files/vim/plugin/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-modules/core/files/vim/plugin/lsp.lua b/site-modules/core/files/vim/plugin/lsp.lua index 1186e3f..f6dce44 100644 --- a/site-modules/core/files/vim/plugin/lsp.lua +++ b/site-modules/core/files/vim/plugin/lsp.lua @@ -11,7 +11,7 @@ local servers = { -- Language servers for the day to day web development, could probably think -- about loosing the html and css one and living with typescript, rescript -- and emmet - ts_ls = { enabled = has_file "tsconfig.json" }, + ts_ls = { enabled = has_file "tsconfig.json" or has_file "yarn.lock" }, denols = { enabled = has_file "deno.json" or has_file "deno.jsonc" }, html = {}, cssls = {},