From 89a102c880194096772b1446d6e143b589640c0a Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Sat, 28 Aug 2021 10:46:14 -0400 Subject: feat(htmlls): improve root detection (#1200) --- lua/lspconfig/html.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lua/lspconfig/html.lua') diff --git a/lua/lspconfig/html.lua b/lua/lspconfig/html.lua index 9ebd4bd8..01a7dcc0 100644 --- a/lua/lspconfig/html.lua +++ b/lua/lspconfig/html.lua @@ -4,14 +4,12 @@ local util = require 'lspconfig/util' local server_name = 'html' local bin_name = 'vscode-html-language-server' -local root_pattern = util.root_pattern 'package.json' - configs[server_name] = { default_config = { cmd = { bin_name, '--stdio' }, filetypes = { 'html' }, root_dir = function(fname) - return root_pattern(fname) or vim.loop.os_homedir() + return util.root_pattern('package.json', '.git')(fname) or util.path.dirname(fname) end, settings = {}, init_options = { -- cgit v1.2.3-70-g09d2