From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 05:08:22 2023 Received: (at submit) by debbugs.gnu.org; 7 Dec 2023 10:08:22 +0000 Received: from localhost ([127.0.0.1]:41095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBBIr-00057U-EY for submit@debbugs.gnu.org; Thu, 07 Dec 2023 05:08:22 -0500 Received: from lists.gnu.org ([2001:470:142::17]:35622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBBIn-00057G-I2 for submit@debbugs.gnu.org; Thu, 07 Dec 2023 05:08:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBBIV-0008Ni-V5 for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 05:07:59 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBBIT-0003Nj-Mw for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 05:07:59 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3332ad5b3e3so716217f8f.2 for ; Thu, 07 Dec 2023 02:07:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701943675; x=1702548475; darn=gnu.org; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=RhZUjd3PYKc472sB991TTWTCUGXFHRRFrAd9hO8LBoE=; b=SVIrbwmLt+jFJD6mX47bv8fm/Qi1luBgLP7XE15MQ7Egfkdp4xIoeszTxhKOXI0aNl Apq+Fpg4dBcPD7b+J9I9KmYeloTIiZOrG5ggl+Q43Sk0tVpOMh1GxNAFYmByq2vSAliH 9iJCoi9bTIn6ovmwgU0OnHxPFQ7QWExH89MuGWPRFFM3K9saBKovdX2aYRHDx9LZGtVa 0lUnRNKRiD1+SxPTNgRcuEiP9XiBX/Fqq6ind0hRKOGPEnvd0GwleoInF64gyDOQ+hhb DlWeJ4q/OJ2twu4IqL9UrftGoO2hWr4q1LwAfgZcGZSB+jdnHUqwvgBGhkLsUoVMoJ9H IAuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701943675; x=1702548475; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=RhZUjd3PYKc472sB991TTWTCUGXFHRRFrAd9hO8LBoE=; b=oFSTSiF05OhtnRjCRpZl7YStYrkYt97z2h5MxgMcaSMZBA2wUkRLCIuLmsl7xQuMtR wjQds3U7UpZMU3aPVZtNGlIwBftftkIsa+uxN/nlXXBNBv4hKaKRvOBd9P3FnOA9t6EN CFgzKY+W1q6cZHwfvk9Bd8+Sv8WY0aPPy2xUNoTBuOF8QmaBWSELRYlmCdlMGMJe576K l3xb+zBhB1s0JzHV+vWtfQwGrZgBK2I/GLaey9tPKdqM8ze1ojrWJWoi2VcFsGWQ7iEl vFckTiDdzwrYpEMe7Cm54RwOFCZJXckIGJajg+gI2h1jLsu1sZ2SpL+2tBHTGS/MRlHm GBAQ== X-Gm-Message-State: AOJu0YzZBetKQp0eBnBV5a4ZiW2timIo0qIOhJixW2C3TTNQP28ZRVir 0oVmJz8QbSviVBaSqRhrXyXZfxeEv+s= X-Google-Smtp-Source: AGHT+IF95iAqwawyUs294Hdl0Eu5drwNUprQnTFU+kaCVgJXePeSkb+BK8/iBDmPPs2R9o5cGTEB7Q== X-Received: by 2002:a05:600c:1f0f:b0:40c:2501:6076 with SMTP id bd15-20020a05600c1f0f00b0040c25016076mr817010wmb.58.1701943674453; Thu, 07 Dec 2023 02:07:54 -0800 (PST) Received: from ?IPV6:2a02:8428:2fa4:4b01:105e:9f99:9d23:fdff? ([2a02:8428:2fa4:4b01:105e:9f99:9d23:fdff]) by smtp.gmail.com with ESMTPSA id w8-20020a5d6808000000b003333b0d603bsm1014151wru.42.2023.12.07.02.07.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Dec 2023 02:07:53 -0800 (PST) Message-ID: Date: Thu, 7 Dec 2023 11:07:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: fr To: bug-gnu-emacs@gnu.org From: =?UTF-8?B?TG/Dr2MgTGVtYcOudHJl?= Subject: 30.0.50; Font lock rule conflict in js-ts-mode at level 4 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=loic.lemaitre@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi ! Hi ! I have noticed a font coloration issue in js-ts-mode when setting the treesit font lock level to 4: JSX attributes color is not the same than at level 3. There should have a conflict between rules for "property_identifier" treesit type. The feature that triggers the conflict is "property" (of the level 4). You can reproduce the issue by following these steps: - M-: (setq treesit-font-lock-level 4) - M-x js-ts-mode on a JSX buffer Note that the bug already exists in Emacs 29.1. Thanks ! Loïc In GNU Emacs 30.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version  3.24.33, cairo version 1.16.0) of 2023-12-07 built on  loic-Latitude-E5470 Repository revision: e4e1e268c8e9f7de6fe5d4b05beb595a1781c02c Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12201001 System Description: Ubuntu 22.04.3 LTS Configured using:  'configure --with-native-compilation=aot --with-tree-sitter --with-json  CC=gcc-12' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings:   value of $LANG: fr_FR.UTF-8   value of $XMODIFIERS: @im=ibus   locale-coding-system: utf-8-unix Major mode: JavaScript Minor modes in effect:   eglot-inlay-hints-mode: t   eglot--managed-mode: t   whitespace-mode: t   electric-pair-mode: t   global-so-long-mode: t   telephone-line-mode: t   global-git-commit-mode: t   magit-auto-revert-mode: t   global-auto-revert-mode: t   recentf-mode: t   windmove-mode: t   counsel-projectile-mode: t   ivy-mode: t   delete-selection-mode: t   global-flycheck-mode: t   flycheck-mode: t   projectile-mode: t   yas-global-mode: t   yas-minor-mode: t   global-company-mode: t   company-mode: t   TeX-PDF-mode: t   TeX-source-correlate-mode: t   which-key-mode: t   highlight-indentation-current-column-mode: t   ws-butler-global-mode: t   ws-butler-mode: t   override-global-mode: t   tooltip-mode: t   global-eldoc-mode: t   eldoc-mode: t   show-paren-mode: t   electric-indent-mode: t   mouse-wheel-mode: t   menu-bar-mode: t   file-name-shadow-mode: t   global-font-lock-mode: t   font-lock-mode: t   blink-cursor-mode: t   window-divider-mode: t   minibuffer-regexp-mode: t   line-number-mode: t   transient-mark-mode: t   auto-composition-mode: t   auto-encryption-mode: t   auto-compression-mode: t   hs-minor-mode: t Load-path shadows: /home/loic/.emacs.d/elpa/transient-20230830.1638/transient hides /home/loic/Travail/Temp/emacs/lisp/transient /home/loic/.emacs.d/elpa/bind-key-20230203.2004/bind-key hides /home/loic/Travail/Temp/emacs/lisp/bind-key /home/loic/.emacs.d/elpa/use-package-20230426.2324/use-package-ensure hides /home/loic/Travail/Temp/emacs/lisp/use-package/use-package-ensure /home/loic/.emacs.d/elpa/use-package-20230426.2324/use-package hides /home/loic/Travail/Temp/emacs/lisp/use-package/use-package /home/loic/.emacs.d/elpa/use-package-20230426.2324/use-package-bind-key hides /home/loic/Travail/Temp/emacs/lisp/use-package/use-package-bind-key /home/loic/.emacs.d/elpa/use-package-20230426.2324/use-package-lint hides /home/loic/Travail/Temp/emacs/lisp/use-package/use-package-lint /home/loic/.emacs.d/elpa/use-package-20230426.2324/use-package-diminish hides /home/loic/Travail/Temp/emacs/lisp/use-package/use-package-diminish /home/loic/.emacs.d/elpa/use-package-20230426.2324/use-package-jump hides /home/loic/Travail/Temp/emacs/lisp/use-package/use-package-jump /home/loic/.emacs.d/elpa/use-package-20230426.2324/use-package-core hides /home/loic/Travail/Temp/emacs/lisp/use-package/use-package-core /home/loic/.emacs.d/elpa/use-package-20230426.2324/use-package-delight hides /home/loic/Travail/Temp/emacs/lisp/use-package/use-package-delight /home/loic/.emacs.d/elpa/hierarchy-20190425.842/hierarchy hides /home/loic/Travail/Temp/emacs/lisp/emacs-lisp/hierarchy Features: (shadow sort mail-extr emacsbug mule-util vc-git flycheck-eglot eglot external-completion jsonrpc ert ewoc debug backtrace jtsx typescript-ts-mode whitespace hideshow company-oddmuse company-keywords company-files company-dabbrev-code company-dabbrev company-yasnippet company-capf time elec-pair so-long term disp-table ehelp telephone-line telephone-line-segments telephone-line-separators telephone-line-utils ox-gfm ox-md ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda ox-html table ox-ascii ox-publish ox org-element org-persist org-id org-refile org ob ob-tangle ob-ref ob-lob ob-table org-macro org-src ob-comint org-pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp org-table org-keys org-loaddefs cal-menu calendar cal-loaddefs avl-tree ol oc ob-exp ob-core org-cycle org-fold org-fold-core org-compat ob-eval org-version org-macs magit-submodule magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func magit-diff smerge-mode diff diff-mode git-commit log-edit message sendmail yank-media puny rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor comp comp-cstr shell pcomplete server magit-mode magit-git magit-base magit-section cursor-sensor rg files-x vc vc-dispatcher rg-info-hack rg-menu transient compat rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header cus-edit pp cus-load dashboard dashboard-widgets recentf tree-widget wid-edit ffap windmove framemove counsel-projectile counsel xdg dired dired-loaddefs swiper ivy delsel ivy-faces ivy-overlay colir color dockerfile-mode derived sh-script smie executable flycheck find-func jest jest-traversal ibuffer-projectile projectile lisp-mnt grep ibuf-ext ibuffer ibuffer-loaddefs magit-popup format-spec js2-mode etags fileloop generator xref js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs imenu pdf-loader company-auctex yasnippet-snippets yasnippet company latex latex-flymake flymake project compile text-property-search warnings icons thingatpt tex-ispell tex-style tex dbus comp-run comp-common xml crm texmathp c++-ts-mode c-ts-mode c-ts-common treesit advice virtualenvwrapper gud comint ansi-osc ansi-color ring s dash py-autopep8 which-key highlight-indentation ws-butler edmacro kmacro use-package-bind-key bind-key easy-mmode snazzy-theme base16-theme exec-path-from-shell cl-extra help-mode use-package-ensure use-package-core finder-inf buttercup-autoloads auctex-autoloads tex-site company-web-autoloads dashboard-autoloads dockerfile-mode-autoloads doom-themes-autoloads evil-autoloads exec-path-from-shell-autoloads f-autoloads flycheck-eglot-autoloads flycheck-autoloads goto-chg-autoloads ibuffer-projectile-autoloads company-autoloads js2-mode-autoloads json-mode-autoloads rx magit-autoloads pcase git-commit-autoloads markdown-mode-autoloads mood-line-autoloads multiple-cursors-autoloads nix-mode-autoloads magit-section-autoloads package-lint-autoloads popper-autoloads popup-autoloads rainbow-mode-autoloads realgud-autoloads realgud-recursive-autoloads loc-changes-autoloads load-relative-autoloads rg-autoloads simple-modeline-autoloads base16-theme-autoloads sqlformat-autoloads reformatter-autoloads ivy-autoloads test-simple-autoloads transient-autoloads treemacs-projectile-autoloads treemacs-autoloads posframe-autoloads ht-autoloads projectile-autoloads dash-autoloads web-completion-data-autoloads which-key-autoloads with-editor-autoloads info compat-autoloads yaml-autoloads yaml-mode-autoloads yasnippet-snippets-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 918736 127661) (symbols 48 52905 3) (strings 32 301817 19250) (string-bytes 1 10190663)  (vectors 16 97148) (vector-slots 8 1704214 34772) (floats 8 380 11535) (intervals 56 1687 287)  (buffers 992 17)) From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 20:33:44 2023 Received: (at 67684) by debbugs.gnu.org; 8 Dec 2023 01:33:44 +0000 Received: from localhost ([127.0.0.1]:43417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBPkN-0004PF-I3 for submit@debbugs.gnu.org; Thu, 07 Dec 2023 20:33:44 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:39539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBPkL-0004Ot-8h for 67684@debbugs.gnu.org; Thu, 07 Dec 2023 20:33:42 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1F37D3200B7D; Thu, 7 Dec 2023 20:33:22 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 07 Dec 2023 20:33:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1701999201; x=1702085601; bh=97 oCqrnv98iDGGE6zNTewXMUjHs1hFr36FHk7t4sLbM=; b=CciqCcbI6HHCwwLFPK 8T7ijScODUof+2I68WVm8kCgbHTLP77WsZkirvXCOUZsKJvvjEW3+865efOeszll O85huXK5p9zBoSYpXP8huZXC8qK3M0lhMYKPu3K95VBrXUhX8qZLALIRvg4gNUjB kM1e7qnX/gGjg3MtQ0pOBP92lZsLoKu1KvqVwI4qrrirpswvrtzAUWw4inCIMhvx o2N69Mwe15CUUpZ0HE6dsY7mNwoUrcVnO+EOSxr4kbP2azheElh5FHsPVCh/l3Mr Eg6djRd2BR7NpZCP5tXN2meSQM2MQtotPVZxPHaAOY5anArK4uoLUTV8xojVgk4h ipaQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701999201; x=1702085601; bh=97oCqrnv98iDG GE6zNTewXMUjHs1hFr36FHk7t4sLbM=; b=mb8PG3huOFR2U4FT21PqEqBL3GzVp 9aBjhhuHVveX6v64jgbzyLY1dO7dGhv7EiyAlIjDU7KiD5Ldo7pFRkiGu3/t0IeA bk9PHBmC75HPKQQ7O+G6TjtQ24KJDZFzt16KnwlRwx3zt1RZJnZRgc+W3yBaqHlx 0JxR7G+itRWpJHgS9Tsl9CYre0jgcfeaVTUXbUxRhB3sjdEFxbJZ4dSU78M52unL GW5e8zNdvMEKJFcQE7e8ITHFP7+5cEE+gao/W1juuZxRrkWtoR1hnLDeZD2JIGXn T5FzptBpigtrr4Wz/bklvLCpimS7gAXG81sM0uSuM3LEq5lrYxi9IsUbA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudekgedgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptgfkffggfgfuvfhfhfgjsehmtderredtfeejnecuhfhrohhmpeffmhhithhr hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg hrnheptdejgeetieffhfejfffgffeiieettedvtefgueeuieevjedtgeeuvdehgeefhedv necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih htrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Dec 2023 20:33:20 -0500 (EST) Content-Type: multipart/mixed; boundary="------------780rDRqKj3MOp0LNeqC2YbE4" Message-ID: <13417b56-4849-c7a5-9fd3-f1ff7909e9d4@gutov.dev> Date: Fri, 8 Dec 2023 03:33:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67684: 30.0.50; Font lock rule conflict in js-ts-mode at level 4 Content-Language: en-US To: =?UTF-8?B?TG/Dr2MgTGVtYcOudHJl?= , 67684@debbugs.gnu.org, Yuan Fu References: From: Dmitry Gutov In-Reply-To: X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67684 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) This is a multi-part message in MIME format. --------------780rDRqKj3MOp0LNeqC2YbE4 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi! On 07/12/2023 12:07, Loïc Lemaître wrote: > I have noticed a font coloration issue in js-ts-mode when setting the > treesit font lock level to 4: JSX attributes color is not the same than > at level 3. > There should have a conflict between rules for "property_identifier" > treesit type. The feature that triggers the conflict is "property" (of > the level 4). > > You can reproduce the issue by following these steps: > - M-: (setq treesit-font-lock-level 4) > - M-x js-ts-mode on a JSX buffer > > Note that the bug already exists in Emacs 29.1. The attached patch seems to fix that. But it removes a function added by Yuan in e78e69b33189, while reshuffling the highlights to reorder priorities. Yuan, do you remember why you did it that way back then? Perhaps I'm missing some other conflict. --------------780rDRqKj3MOp0LNeqC2YbE4 Content-Type: text/x-patch; charset=UTF-8; name="js-ts-font-lock-property.diff" Content-Disposition: attachment; filename="js-ts-font-lock-property.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL2pzLmVsIGIvbGlzcC9wcm9nbW9kZXMvanMu ZWwKaW5kZXggNWE2NjlmZGJkNDIuLmUyYjc0OGY2Y2I4IDEwMDY0NAotLS0gYS9saXNwL3By b2dtb2Rlcy9qcy5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy9qcy5lbApAQCAtMzU3MCwxNiAr MzU3MCw2IEBAIGpzLS10cmVlc2l0LWZvbnQtbG9jay1zZXR0aW5ncwogICAgICA7OyBmdWxs IG5hbWVzcGFjZSBpbXBvcnQgKCogYXMgYWxpYXMpCiAgICAgIChpbXBvcnRfY2xhdXNlIChu YW1lc3BhY2VfaW1wb3J0IChpZGVudGlmaWVyKSBAZm9udC1sb2NrLXZhcmlhYmxlLW5hbWUt ZmFjZSkpKQogCi0gICA6bGFuZ3VhZ2UgJ2phdmFzY3JpcHQKLSAgIDpmZWF0dXJlICdwcm9w ZXJ0eQotICAgJygoKHByb3BlcnR5X2lkZW50aWZpZXIpIEBmb250LWxvY2stcHJvcGVydHkt dXNlLWZhY2UKLSAgICAgICg6cHJlZCBqcy0tdHJlZXNpdC1wcm9wZXJ0eS1ub3QtZnVuY3Rp b24tcAotICAgICAgICAgICAgIEBmb250LWxvY2stcHJvcGVydHktdXNlLWZhY2UpKQotCi0g ICAgIChwYWlyIHZhbHVlOiAoaWRlbnRpZmllcikgQGZvbnQtbG9jay12YXJpYWJsZS11c2Ut ZmFjZSkKLQotICAgICAoKHNob3J0aGFuZF9wcm9wZXJ0eV9pZGVudGlmaWVyKSBAZm9udC1s b2NrLXByb3BlcnR5LXVzZS1mYWNlKSkKLQogICAgOmxhbmd1YWdlICdqYXZhc2NyaXB0CiAg ICA6ZmVhdHVyZSAnYXNzaWdubWVudAogICAgJygoYXNzaWdubWVudF9leHByZXNzaW9uCkBA IC0zNjA2LDYgKzM1OTYsMTIgQEAganMtLXRyZWVzaXQtZm9udC1sb2NrLXNldHRpbmdzCiAg ICAgIChqc3hfc2VsZl9jbG9zaW5nX2VsZW1lbnQgbmFtZTogKF8pIEBmb250LWxvY2stZnVu Y3Rpb24tY2FsbC1mYWNlKQogICAgICAoanN4X2F0dHJpYnV0ZSAocHJvcGVydHlfaWRlbnRp ZmllcikgQGZvbnQtbG9jay1jb25zdGFudC1mYWNlKSkKIAorICAgOmxhbmd1YWdlICdqYXZh c2NyaXB0CisgICA6ZmVhdHVyZSAncHJvcGVydHkKKyAgICcoKChwcm9wZXJ0eV9pZGVudGlm aWVyKSBAZm9udC1sb2NrLXByb3BlcnR5LXVzZS1mYWNlKQorICAgICAocGFpciB2YWx1ZTog KGlkZW50aWZpZXIpIEBmb250LWxvY2stdmFyaWFibGUtdXNlLWZhY2UpCisgICAgICgoc2hv cnRoYW5kX3Byb3BlcnR5X2lkZW50aWZpZXIpIEBmb250LWxvY2stcHJvcGVydHktdXNlLWZh Y2UpKQorCiAgICA6bGFuZ3VhZ2UgJ2phdmFzY3JpcHQKICAgIDpmZWF0dXJlICdudW1iZXIK ICAgICcoKG51bWJlcikgQGZvbnQtbG9jay1udW1iZXItZmFjZQpAQCAtMzY1NywxNCArMzY1 Myw2IEBAIGpzLS1mb250aWZ5LXRlbXBsYXRlLXN0cmluZwogICAgICAgKHNldHEgZm9udC1i ZWcgKHRyZWVzaXQtbm9kZS1lbmQgY2hpbGQpCiAgICAgICAgICAgICBjaGlsZCAodHJlZXNp dC1ub2RlLW5leHQtc2libGluZyBjaGlsZCkpKSkpCiAKLShkZWZ1biBqcy0tdHJlZXNpdC1w cm9wZXJ0eS1ub3QtZnVuY3Rpb24tcCAobm9kZSkKLSAgIkNoZWNrIHRoYXQgTk9ERSwgYSBw cm9wZXJ0eV9pZGVudGlmaWVyLCBpcyBub3QgdXNlZCBhcyBhIGZ1bmN0aW9uLiIKLSAgKG5v dCAoZXF1YWwgKHRyZWVzaXQtbm9kZS10eXBlCi0gICAgICAgICAgICAgICAodHJlZXNpdC1u b2RlLXBhcmVudCA7IE1heWJlIGNhbGxfZXhwcmVzc2lvbi4KLSAgICAgICAgICAgICAgICAo dHJlZXNpdC1ub2RlLXBhcmVudCA7IE1heWJlIG1lbWJlcl9leHByZXNzaW9uLgotICAgICAg ICAgICAgICAgICBub2RlKSkpCi0gICAgICAgICAgICAgICJjYWxsX2V4cHJlc3Npb24iKSkp Ci0KIChkZWZ2YXIganMtLXRyZWVzaXQtbGhzLWlkZW50aWZpZXItcXVlcnkKICAgKHdoZW4g KHRyZWVzaXQtYXZhaWxhYmxlLXApCiAgICAgKHRyZWVzaXQtcXVlcnktY29tcGlsZSAnamF2 YXNjcmlwdCAnKChpZGVudGlmaWVyKSBAaWQK --------------780rDRqKj3MOp0LNeqC2YbE4-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 08 06:16:49 2023 Received: (at 67684) by debbugs.gnu.org; 8 Dec 2023 11:16:49 +0000 Received: from localhost ([127.0.0.1]:43937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBYqe-0002Yy-WD for submit@debbugs.gnu.org; Fri, 08 Dec 2023 06:16:49 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:47460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBYqc-0002YW-HC for 67684@debbugs.gnu.org; Fri, 08 Dec 2023 06:16:47 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40c32df9174so6563065e9.3 for <67684@debbugs.gnu.org>; Fri, 08 Dec 2023 03:16:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702034187; x=1702638987; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=YBr6zuEPjfI/R/Aa61q/6MdnJNYpkTPpk8IsBsT+KUg=; b=Dq++a39+qrdE1QcJbaQA26T5oCEYEMXm1W8jYy+ubSsfGt0i1b20Y8lRV84SOdMf5C 369SkZoCuvmeUTyhBIrp1JFniXjU7VvEC84t3bxF39lWW+6YFm1vLIscO+zGjo/dxKAS lZdcSNZA2Obxe/b+GqT10j9yrAgC2tVwrFqR41FLYIuSaechqm+dpMN0HcfVrbnb28Vc IYTVBdwrU8EAn9XwbALa5IIUcnukK9YxtroYGXuSPTXY+r7DSD8fdB9DqX5zuEzo0x4y GLSk1leqAtL2N5pGkuOlrfCRkle4nJ+/uu1v7xMaCd3buYU+msV08LpNx1IepIkAfLqP BwnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702034187; x=1702638987; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YBr6zuEPjfI/R/Aa61q/6MdnJNYpkTPpk8IsBsT+KUg=; b=G+eMRtbOInrYjPd30qp6Xl98qf3K1r3tV5s1e3+fRoCNkayVBpPC+SrLggMSIp2wRF vsiUCQomgsB2b5IaCF50+n4dfpTuGBRGngC0VVoRZuP2AR1/iax90l/sVvTV739gHqpg 0J3X4y1ZAtRl4OpE5Zrwr4Zf1ycleg0PfS/QZvvXONmfGgPez5uNpJzhaUgVcNg5qw7P 8oP1NFWnuKmzzlYF/OJSi7Nt9/B4NhTLRqi0FC1OnFplnYgxrT57+55ry+un5RLiEvIK t+9yfDHXdnFZYudbE8wR+Ap9QsNJzs3qai619YfXoSWEgigD65dnzayXZcb/wC1zgLUI zymA== X-Gm-Message-State: AOJu0YwKcTJJuC9cUyjPBN8HsJKCXQv1milzCVNK/WMQXyRW9k76jzvu 2JqG/4aIIzVzBsolQfisscU= X-Google-Smtp-Source: AGHT+IE7go9Zjts2TrR+/i+ChXMaT98hfc34ydnqvox1NK3snuKi1YYyDNBcWSeyG/3z46G5uacgAw== X-Received: by 2002:a05:600c:43c3:b0:40b:5e59:99a4 with SMTP id f3-20020a05600c43c300b0040b5e5999a4mr1671679wmn.196.1702034186598; Fri, 08 Dec 2023 03:16:26 -0800 (PST) Received: from ?IPV6:2a02:8428:2fa4:4b01:f0c0:2c76:eb3c:7ff0? ([2a02:8428:2fa4:4b01:f0c0:2c76:eb3c:7ff0]) by smtp.gmail.com with ESMTPSA id h11-20020a05600c350b00b0040b4cb14d40sm4793970wmq.19.2023.12.08.03.16.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Dec 2023 03:16:25 -0800 (PST) Message-ID: <3f5a923c-f946-4d66-81c8-632daa21544c@gmail.com> Date: Fri, 8 Dec 2023 12:16:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#67684: 30.0.50; Font lock rule conflict in js-ts-mode at level 4 To: Dmitry Gutov , 67684@debbugs.gnu.org, Yuan Fu References: <13417b56-4849-c7a5-9fd3-f1ff7909e9d4@gutov.dev> Content-Language: fr From: =?UTF-8?B?TG/Dr2MgTGVtYcOudHJl?= In-Reply-To: <13417b56-4849-c7a5-9fd3-f1ff7909e9d4@gutov.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67684 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Le 08/12/2023 à 02:33, Dmitry Gutov a écrit : > Hi! > > On 07/12/2023 12:07, Loïc Lemaître wrote: >> I have noticed a font coloration issue in js-ts-mode when setting the >> treesit font lock level to 4: JSX attributes color is not the same >> than at level 3. >> There should have a conflict between rules for "property_identifier" >> treesit type. The feature that triggers the conflict is "property" >> (of the level 4). >> >> You can reproduce the issue by following these steps: >> - M-: (setq treesit-font-lock-level 4) >> - M-x js-ts-mode on a JSX buffer >> >> Note that the bug already exists in Emacs 29.1. > > The attached patch seems to fix that. Yes I confirm, thanks ! > > But it removes a function added by Yuan in e78e69b33189, while > reshuffling the highlights to reorder priorities. > > Yuan, do you remember why you did it that way back then? Perhaps I'm > missing some other conflict. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 10 20:38:04 2023 Received: (at 67684) by debbugs.gnu.org; 11 Dec 2023 01:38:04 +0000 Received: from localhost ([127.0.0.1]:52162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCVFE-0004kc-0e for submit@debbugs.gnu.org; Sun, 10 Dec 2023 20:38:04 -0500 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]:56351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCVF7-0004k4-Vu for 67684@debbugs.gnu.org; Sun, 10 Dec 2023 20:38:02 -0500 Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3ba04b9b103so699643b6e.0 for <67684@debbugs.gnu.org>; Sun, 10 Dec 2023 17:37:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702258657; x=1702863457; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Aa9g43mJ9tjcj5uacy/58ySH2pmGvRyD5UvLiuYtCn4=; b=iINwbD9r8GGqGKSvvIdUijWW8jZ0yyrvipUsM4SDsRbM2KA3U+4oS3gE+86vqcG9Xg LpXupYFtuohch+lHc5oZo7ISU7jReUBuT4Iak54HgqHbPGMLIQW3QXi4qFGMG6H3rd/g 1Qs8unJ85Jh7UsvF6dFgrsB8azoHhIyrEs68dqkkmrqdhzn4ke8x++lIspfki7pjRek6 6bsCLodgTEXIP4qwgZp/dFyIYxVWWd4pD8eeQo+smtZKuommY2b66hcWlapsuuQNybyq UrsJHLXHBGayQSfAR58CgJZKAbJ/SWpPqCaMBIGWfkSJHZh8nqvVJhYgGNQqq3YtKZbS eaBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702258657; x=1702863457; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Aa9g43mJ9tjcj5uacy/58ySH2pmGvRyD5UvLiuYtCn4=; b=MXXbU4IoT5TtGE8CaWYgYkxb+MpdtKD0WLqAfqivsYsRe7K88hFyieljmQ3JRyIXLs kRyPZgriyTdrv4NdZUKrIu2w9zTAqYU7LYI40a8WMp5kyoopWHhz4Iy+MBkdNy2uQDRV 8gFIWQUmFBpBVJr4IESmhWsC1DIUFtQqVHBICQrzgyzqERVocinQ8sOl1el2fsjawVQp 3TfzYNBugw9CC8OEDMRyJmytclm6XOL7bUR8+gjaBQqFBongL8W8upnTK/0OL0Xav/pT hGXLlklyrAKWmsZHYHSdHddD3lqkhRGDtnhwR6h+/JjhWXriOwzeB3H/AtZk/zKKPqig L1Vg== X-Gm-Message-State: AOJu0Yyc3bFu2jPMIqBcXWXwlfqsgPzlkMSY6jpmAyLDwbhWpcaBkp/c lvFoMo5bWyvitLhRth6KPa4= X-Google-Smtp-Source: AGHT+IFVHl5d5/4Hwszzj5tSLRQneQv7X9f1UTP1AKPPGQ0zpL/rfsk0Rqv9FHnuLu4svQMDoackzQ== X-Received: by 2002:a05:6808:2e95:b0:3ba:587:b349 with SMTP id gt21-20020a0568082e9500b003ba0587b349mr2170529oib.111.1702258657580; Sun, 10 Dec 2023 17:37:37 -0800 (PST) Received: from [192.168.1.7] (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id fm15-20020a056a002f8f00b006ce7ca09d9dsm5157488pfb.153.2023.12.10.17.37.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Dec 2023 17:37:37 -0800 (PST) Message-ID: <69058ffa-b778-4913-9fa8-f6c5c7d525e0@gmail.com> Date: Sun, 10 Dec 2023 17:37:35 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#67684: 30.0.50; Font lock rule conflict in js-ts-mode at level 4 Content-Language: en-US To: Dmitry Gutov , =?UTF-8?B?TG/Dr2MgTGVtYcOudHJl?= , 67684@debbugs.gnu.org References: <13417b56-4849-c7a5-9fd3-f1ff7909e9d4@gutov.dev> From: Yuan Fu In-Reply-To: <13417b56-4849-c7a5-9fd3-f1ff7909e9d4@gutov.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67684 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 12/7/23 5:33 PM, Dmitry Gutov wrote: > Hi! > > On 07/12/2023 12:07, Loïc Lemaître wrote: >> I have noticed a font coloration issue in js-ts-mode when setting the >> treesit font lock level to 4: JSX attributes color is not the same >> than at level 3. >> There should have a conflict between rules for "property_identifier" >> treesit type. The feature that triggers the conflict is "property" >> (of the level 4). >> >> You can reproduce the issue by following these steps: >> - M-: (setq treesit-font-lock-level 4) >> - M-x js-ts-mode on a JSX buffer >> >> Note that the bug already exists in Emacs 29.1. > > The attached patch seems to fix that. > > But it removes a function added by Yuan in e78e69b33189, while > reshuffling the highlights to reorder priorities. > > Yuan, do you remember why you did it that way back then? Perhaps I'm > missing some other conflict. For a method invocation like obj.fn(), the "fn" should be fontified in function-call-face. However, "fn" is a property_identifier in the parse tree, so it would be fontified in property-use-face by the property feature. The predicate in the property feature makes sure we skip properties that are function invocations. And down the line in function feature, you'll see (call_expression       function: [(identifier) @font-lock-function-call-face                  (member_expression                   property:                   (property_identifier) @font-lock-function-call-face)]) Here, the property_identifier is fontified in function-call-face. Yuan From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 11 11:35:35 2023 Received: (at 67684) by debbugs.gnu.org; 11 Dec 2023 16:35:35 +0000 Received: from localhost ([127.0.0.1]:54409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCjFm-0000Q8-Lk for submit@debbugs.gnu.org; Mon, 11 Dec 2023 11:35:35 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52559) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCjFi-0000Pn-H1 for 67684@debbugs.gnu.org; Mon, 11 Dec 2023 11:35:34 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1C3815C045C; Mon, 11 Dec 2023 11:35:10 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 11 Dec 2023 11:35:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1702312510; x=1702398910; bh=SU3ItIiy/GGqMK0HuZIz/B3X+mxE4z2CMBB NFBbNvwA=; b=Ulbfj0XADoxefWgnOUvKyP1uGRAgYByNGdqIi61DYPl/POnMybn tP+9MoatXdxilnL772Gzs975TLIiXA+qXBaDmg9oQfYzb9FbETRA8WW75q83SPe5 ItqpWLzsTAJrTNKa5fdxvEV2ocSAh2AhzfAomk2PrK5SjNv/3/GKbuvWJQMHyoeA 68WjxBUOYRVZbSXnNWsdHMyPnHThU1p0zV7rt61afY+ckfvOvqblYv281KphnuDc A86ziGny+3QZZRI6W5VsQd28MNGAjiE1nKdyqucpw0w5766itMDFBoE+l0FD0Nol 6EenQZfxVr/QNKHN3ujR+ul0jsqCBh6H+Ag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702312510; x= 1702398910; bh=SU3ItIiy/GGqMK0HuZIz/B3X+mxE4z2CMBBNFBbNvwA=; b=T otEGpAIZ0daFtUkTD3LxP4S3FkcnF97JZQ1+3Q3ER8IO5oeylsELDPZSq8FKO1h2 GD9CJ8rztsJzGWF8Zk185NmNafM8DRc92bwEqt9WNKMeWhiYMyQCH9CTdJv6xDrJ DEHNcZYk7yn+fCIqjiocTUdaUrYHlxVqeuvKdhn76j/kUrJzRsiIzZCldgXPP8Dr Gn0XbSiask+TPdmGUQ/cvFV272/AE0PwjK0/lL6QMQf/yXpy3OCzCvHPJRUrGBBd rOBoPW9foE48O7phRGWKYsvqCo6C+sJdMu9t6OmUNV1qlLxO4hkWPzAPADWANYCE wB4hsp4xoZkh2x5qKn3AA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelvddgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeefjeekvedvfeelfedufeevgeetvdevkeelvddtueetteefudefgfduieekffei leenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Dec 2023 11:35:08 -0500 (EST) Message-ID: <9257ecaf-8f4f-20d1-387c-8372c13077dd@gutov.dev> Date: Mon, 11 Dec 2023 18:35:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67684: 30.0.50; Font lock rule conflict in js-ts-mode at level 4 Content-Language: en-US To: Yuan Fu , =?UTF-8?B?TG/Dr2MgTGVtYcOudHJl?= , 67684@debbugs.gnu.org References: <13417b56-4849-c7a5-9fd3-f1ff7909e9d4@gutov.dev> <69058ffa-b778-4913-9fa8-f6c5c7d525e0@gmail.com> From: Dmitry Gutov In-Reply-To: <69058ffa-b778-4913-9fa8-f6c5c7d525e0@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67684 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On 11/12/2023 03:37, Yuan Fu wrote: > > > On 12/7/23 5:33 PM, Dmitry Gutov wrote: >> Hi! >> >> On 07/12/2023 12:07, Loïc Lemaître wrote: >>> I have noticed a font coloration issue in js-ts-mode when setting the >>> treesit font lock level to 4: JSX attributes color is not the same >>> than at level 3. >>> There should have a conflict between rules for "property_identifier" >>> treesit type. The feature that triggers the conflict is "property" >>> (of the level 4). >>> >>> You can reproduce the issue by following these steps: >>> - M-: (setq treesit-font-lock-level 4) >>> - M-x js-ts-mode on a JSX buffer >>> >>> Note that the bug already exists in Emacs 29.1. >> >> The attached patch seems to fix that. >> >> But it removes a function added by Yuan in e78e69b33189, while >> reshuffling the highlights to reorder priorities. >> >> Yuan, do you remember why you did it that way back then? Perhaps I'm >> missing some other conflict. > For a method invocation like obj.fn(), the "fn" should be fontified in > function-call-face. However, "fn" is a property_identifier in the parse > tree, so it would be fontified in property-use-face by the property > feature. The predicate in the property feature makes sure we skip > properties that are function invocations. And down the line in function > feature, you'll see > > (call_expression >       function: [(identifier) @font-lock-function-call-face >                  (member_expression >                   property: >                   (property_identifier) @font-lock-function-call-face)]) > > Here, the property_identifier is fontified in function-call-face. Thanks. So the patch I sent should also cover this, right? It moves the 'property' feature to below 'function'. And below 'jsx', which fixes the problem reported in this bug. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 12 03:34:10 2023 Received: (at 67684) by debbugs.gnu.org; 12 Dec 2023 08:34:10 +0000 Received: from localhost ([127.0.0.1]:55232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCyDR-0007tm-QA for submit@debbugs.gnu.org; Tue, 12 Dec 2023 03:34:10 -0500 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:45267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCyDP-0007tZ-BL for 67684@debbugs.gnu.org; Tue, 12 Dec 2023 03:34:08 -0500 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1d06fffdb65so30993745ad.2 for <67684@debbugs.gnu.org>; Tue, 12 Dec 2023 00:33:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702370026; x=1702974826; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=1CbHckEviS12ZSoLcOs7jKsK+i8yi/NiK1bvat31LpU=; b=A5m6UP+z9IvDkRK0acTV3j14RcHO8ADkUbTxhwWRx9dL8D28ajvC+yrenTPv/MFVNB I0fQIgGyOis3aGqa8gtMSFrbPW8LUMGwQjfOi4pCC1K5GvXo10DGrcFRBT8aJSS3RGSy Ft3ZZFRoxO5i1VcUNlt76nNSdfOXox+vaaZFZVxjfoMY12sfNru1APQ9PuOghDQJj0H7 EMwlqppztOBvXvkITF8km/JBknwnT4xKLeW+lu9FFEwZ9WTQEaGwgPy+N4ThrHgX4s4E qmKDriKdTOeYD8ulmnjmGC6Kq+KvAVLXI2cuSa+q5XeJNWBHXl/ieUbWchAk8vU0DXWQ OaPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702370026; x=1702974826; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1CbHckEviS12ZSoLcOs7jKsK+i8yi/NiK1bvat31LpU=; b=t/NsBlz2+yIdF9fUc8onn3ttP+J3bV5RnTh0w7K9fmIfAHSVxD/Y12Px3V38RQcnmt WwV0IMReBAAkoBbKv6BFzmFS/OXyjJBGcgTwekxpH7CXrJWqtl33h7g/qOF2vmaAqiys nEhs7+5cJQQJPcuBtph/v/14LTxmJdHlvh1GiNJLOlIJeyS/8ziXCaLngN3Kf9JASWex SAV700fT0zky38uuemoUZSToiYk3TpnvHonF+YYgV5kcan4mhcLuxE3uQfg4sQpXngE/ 0Wmqkgxr/P2LYWE2BfxMQcZtxVvys9Ts2qasxXFoC8VfXbTANcoDt36pqeQPQ6Ln7Fwj nDCQ== X-Gm-Message-State: AOJu0Yyv03cJ/L6P7NVlixN14VYb5+E4jNCMsJm3H/yNubbGPE1F5vuH rCB93Z+4G9nz4vrq/PhQZtc9MiYbZJu53A== X-Google-Smtp-Source: AGHT+IF6bXH59COxzl6Ljom0hKetbVD8weNQtdI7dolX+0mmYxsamNfXnnrBUltGbxCtvJ0C4qUE/g== X-Received: by 2002:a17:903:41c4:b0:1d0:b24e:165b with SMTP id u4-20020a17090341c400b001d0b24e165bmr2956249ple.129.1702370025881; Tue, 12 Dec 2023 00:33:45 -0800 (PST) Received: from [192.168.1.7] (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id b1-20020a170902d30100b001cf96a0e4e6sm8013104plc.242.2023.12.12.00.33.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Dec 2023 00:33:45 -0800 (PST) Message-ID: Date: Tue, 12 Dec 2023 00:33:44 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#67684: 30.0.50; Font lock rule conflict in js-ts-mode at level 4 Content-Language: en-US To: Dmitry Gutov , =?UTF-8?B?TG/Dr2MgTGVtYcOudHJl?= , 67684@debbugs.gnu.org References: <13417b56-4849-c7a5-9fd3-f1ff7909e9d4@gutov.dev> <69058ffa-b778-4913-9fa8-f6c5c7d525e0@gmail.com> <9257ecaf-8f4f-20d1-387c-8372c13077dd@gutov.dev> From: Yuan Fu In-Reply-To: <9257ecaf-8f4f-20d1-387c-8372c13077dd@gutov.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67684 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 12/11/23 8:35 AM, Dmitry Gutov wrote: > On 11/12/2023 03:37, Yuan Fu wrote: >> >> >> On 12/7/23 5:33 PM, Dmitry Gutov wrote: >>> Hi! >>> >>> On 07/12/2023 12:07, Loïc Lemaître wrote: >>>> I have noticed a font coloration issue in js-ts-mode when setting >>>> the treesit font lock level to 4: JSX attributes color is not the >>>> same than at level 3. >>>> There should have a conflict between rules for >>>> "property_identifier" treesit type. The feature that triggers the >>>> conflict is "property" (of the level 4). >>>> >>>> You can reproduce the issue by following these steps: >>>> - M-: (setq treesit-font-lock-level 4) >>>> - M-x js-ts-mode on a JSX buffer >>>> >>>> Note that the bug already exists in Emacs 29.1. >>> >>> The attached patch seems to fix that. >>> >>> But it removes a function added by Yuan in e78e69b33189, while >>> reshuffling the highlights to reorder priorities. >>> >>> Yuan, do you remember why you did it that way back then? Perhaps I'm >>> missing some other conflict. >> For a method invocation like obj.fn(), the "fn" should be fontified >> in function-call-face. However, "fn" is a property_identifier in the >> parse tree, so it would be fontified in property-use-face by the >> property feature. The predicate in the property feature makes sure we >> skip properties that are function invocations. And down the line in >> function feature, you'll see >> >> (call_expression >>        function: [(identifier) @font-lock-function-call-face >>                   (member_expression >>                    property: >>                    (property_identifier) >> @font-lock-function-call-face)]) >> >> Here, the property_identifier is fontified in function-call-face. > > Thanks. So the patch I sent should also cover this, right? > > It moves the 'property' feature to below 'function'. And below 'jsx', > which fixes the problem reported in this bug. Ah, right. In that case, I don't have anything else to add. Yuan From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 12 17:03:25 2023 Received: (at 67684-done) by debbugs.gnu.org; 12 Dec 2023 22:03:25 +0000 Received: from localhost ([127.0.0.1]:57852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDAqa-0002Lp-IA for submit@debbugs.gnu.org; Tue, 12 Dec 2023 17:03:24 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:60723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDAqV-0002LV-TU for 67684-done@debbugs.gnu.org; Tue, 12 Dec 2023 17:03:23 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 762A83200B11; Tue, 12 Dec 2023 17:02:58 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 12 Dec 2023 17:02:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1702418577; x=1702504977; bh=IGWK1PV10o0BqJpnIC1ogtLeWXWzl6x2lxti+Ep7ASY=; b= fjOR07s9BtPvvtv2D5MJKAQPHQmjTE5Nc3HBl9xXoKCKrvp/2BrJXLYC0h49OP7/ GhWqqcvtlG54pN0gFxLYnKYnGVv4nTJjmrubaF0rTYn9ZxxCbdA1lxi/pAmRfKon zZLcxt/r0EAIsdMtMwjfXFk55k7nNFSGsR4XqYaIoEMOm2b+5NpwSg4KvXrDUl4x kt7DX/XB7qh7zdAhJmuIClIWfD0nNAGwMAXKx/q3EdVvHMFukkTrwSVnhm4JzXoc EOMbLjA/U/9EaVQaqr/b6QqujsFB5ip90H0ZfMm0yV7XHXy4YHLh459a8MuTCQ8m 2DcG0xZNY2g+Fhl5JfoHnw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702418577; x= 1702504977; bh=IGWK1PV10o0BqJpnIC1ogtLeWXWzl6x2lxti+Ep7ASY=; b=q VdUvaZN5zL4rKlrG0pdjX92I+2UJ9X+guBDh4tYfGCJmOgjY2Pzj6GHtgmQE9I+z PrKB/HPm2JVSh4nn1l6zqYfmu+NwzvXgoKTKLVZo9NVQkfay1pz+E5pqX6dzHoaH UwRhhGYMB70+Y/D7pAe+7VeXpXNQ7872bGV1OumVk0rfXvM+92LmBQ+1o/bRhnZR durRGEURVh0ml1lw+/xd8HBf0Vd9c98aMg2a0n6NynEPeDHofN1m4tXB3TH5TBBH ZyIETi2Eej1GsA1sZ+VKJ6dlrzL+knMIbyvACHC/Fun153qg/slig7NkfYqWbiIt FUeBlAWWqnZNcI0saIcZQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelgedgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepfeejkeevvdefleefudefveegtedvveekledvtdeuteetfedufefgudeikeff ieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Dec 2023 17:02:56 -0500 (EST) Message-ID: <32d1b804-2d94-ee16-93fd-c515c70b9bcd@gutov.dev> Date: Wed, 13 Dec 2023 00:02:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#67684: 30.0.50; Font lock rule conflict in js-ts-mode at level 4 Content-Language: en-US To: Yuan Fu , =?UTF-8?B?TG/Dr2MgTGVtYcOudHJl?= , 67684-done@debbugs.gnu.org References: <13417b56-4849-c7a5-9fd3-f1ff7909e9d4@gutov.dev> <69058ffa-b778-4913-9fa8-f6c5c7d525e0@gmail.com> <9257ecaf-8f4f-20d1-387c-8372c13077dd@gutov.dev> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 67684-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) Version: 29.2 On 12/12/2023 10:33, Yuan Fu wrote: > > > On 12/11/23 8:35 AM, Dmitry Gutov wrote: >> On 11/12/2023 03:37, Yuan Fu wrote: >>> >>> >>> On 12/7/23 5:33 PM, Dmitry Gutov wrote: >>>> Hi! >>>> >>>> On 07/12/2023 12:07, Loïc Lemaître wrote: >>>>> I have noticed a font coloration issue in js-ts-mode when setting >>>>> the treesit font lock level to 4: JSX attributes color is not the >>>>> same than at level 3. >>>>> There should have a conflict between rules for >>>>> "property_identifier" treesit type. The feature that triggers the >>>>> conflict is "property" (of the level 4). >>>>> >>>>> You can reproduce the issue by following these steps: >>>>> - M-: (setq treesit-font-lock-level 4) >>>>> - M-x js-ts-mode on a JSX buffer >>>>> >>>>> Note that the bug already exists in Emacs 29.1. >>>> >>>> The attached patch seems to fix that. >>>> >>>> But it removes a function added by Yuan in e78e69b33189, while >>>> reshuffling the highlights to reorder priorities. >>>> >>>> Yuan, do you remember why you did it that way back then? Perhaps I'm >>>> missing some other conflict. >>> For a method invocation like obj.fn(), the "fn" should be fontified >>> in function-call-face. However, "fn" is a property_identifier in the >>> parse tree, so it would be fontified in property-use-face by the >>> property feature. The predicate in the property feature makes sure we >>> skip properties that are function invocations. And down the line in >>> function feature, you'll see >>> >>> (call_expression >>>        function: [(identifier) @font-lock-function-call-face >>>                   (member_expression >>>                    property: >>>                    (property_identifier) >>> @font-lock-function-call-face)]) >>> >>> Here, the property_identifier is fontified in function-call-face. >> >> Thanks. So the patch I sent should also cover this, right? >> >> It moves the 'property' feature to below 'function'. And below 'jsx', >> which fixes the problem reported in this bug. > > Ah, right. In that case, I don't have anything else to add. Great! I've pushed the patch to emacs-29, and this bug is now closed. From unknown Fri Sep 05 20:55:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 10 Jan 2024 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator