From 37f84d8c2a2c5d5d53597ac50aab618ffa2a90ac Mon Sep 17 00:00:00 2001 From: Ray Guo <33137074+RayGuo-ergou@users.noreply.github.com> Date: Thu, 13 Jun 2024 01:38:06 +1000 Subject: [PATCH] docs: update cmp, no need to check recursively --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d9dc02cfd2..ebb327f239 100644 --- a/README.md +++ b/README.md @@ -132,15 +132,12 @@ sources = cmp.config.sources({ -- local ts_utils = require('nvim-treesitter.ts_utils') -- local function is_in_start_tag() -- local node = ts_utils.get_node_at_cursor() - -- while node do - -- if node:type() == 'start_tag' then - -- return true - -- end - -- node = node:parent() + -- if not node then + -- return false -- end - -- return false + -- return node:type() == 'start_tag' -- end - -- + -- -- If not in start tag, return true -- if not is_in_start_tag() then -- return true