From 7053d399fba0d022f83b91c380d54c566ac5834b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gergely=20Pad=C3=A1nyi-Guly=C3=A1s?= Date: Sat, 15 Feb 2025 11:01:08 +0100 Subject: [PATCH] fix: make angularls work for nx workspaces as well --- lua/lazyvim/plugins/extras/lang/angular.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/angular.lua b/lua/lazyvim/plugins/extras/lang/angular.lua index d2f7fdee..05b3cc66 100644 --- a/lua/lazyvim/plugins/extras/lang/angular.lua +++ b/lua/lazyvim/plugins/extras/lang/angular.lua @@ -31,7 +31,13 @@ return { "neovim/nvim-lspconfig", opts = { servers = { - angularls = {}, + angularls = { + -- Make sure it works for Nx workspaces as well + root_dir = function(fname) + return require("lspconfig.util").root_pattern("nx.json", "angular.json")(fname) + or vim.loop.cwd() + end, + }, }, setup = { angularls = function()