From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 04:41:37 2023 Received: (at submit) by debbugs.gnu.org; 25 Jan 2023 09:41:37 +0000 Received: from localhost ([127.0.0.1]:58308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKcHg-0002Vg-Ei for submit@debbugs.gnu.org; Wed, 25 Jan 2023 04:41:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:52310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKcHe-0002VY-7l for submit@debbugs.gnu.org; Wed, 25 Jan 2023 04:41:35 -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 1pKcHd-0004l9-Tj for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 04:41:34 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKcHa-000867-I4 for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 04:41:33 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 20AD25C00FB; Wed, 25 Jan 2023 04:41:27 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 25 Jan 2023 04:41:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:reply-to:sender :subject:subject:to:to; s=fm2; t=1674639687; x=1674726087; bh=h5 FgnRRT9M+BwbMOcWoriuCDt1/d1s0YOFPstplY1XM=; b=JRPc6F0YEzyZoDq8/v 8HkTkd4iCgAsSqEipdoZ9/vShxmiarQBd5EEpt7kQK+6FUf1s3rO5XGCA3mkOglD MIDRHnGPdjJKTM59c+axgvADXYH4B+2QQlRJZWj4ReV2SRDq/q0uknQXIRYf9c1g 7Ys3UneA3GLJcfBQhl6zchoBRcZeU02p7PaxD2HGbl59LTVofIIPbMcm8ufVNNiH Zp3JJJ6ClZC4CmFaXMxqndd/MY3pD61F8/JMMywYwLWHgcB+sevcsU55q8paJPYE NEtqvF6ILUxoF9nfu7GHXKzzMWDChnED3KvlZSZDKnSXSrWPS6HLF/kesKhYrIV2 RuLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1674639687; x=1674726087; bh=h5FgnRRT9M+BwbMOcWoriuCDt1/d1s0YOFP stplY1XM=; b=e1ulRwAFYb0rM8VOSYH1l/A1SaE2rWfmYsAq5fZQ+xha4B4SaHN aXp9XedeBsqMWo4wTo5ggvunN+sCLu5undLLnac+YeItlBtwFDa2RkQgK+QiOeY2 EGUfJfvv8wSLjm1WJ/hpJXaYK9iS1dcTDOYL9VUhjkjm+NFr/GbsxwYU20MPhvXP gT7cOJbrLtKdJ08VatKZ5r1viKlo4bybJcJnYrS+M6ERB1UxCPTpVuKgcPIM3FSl SQqBxCMzQWfgT6baJ2FCJxSIPBQ8enR78BUB/BFaKcmKkoOaRKHQ194Auq1rRHe3 6hiXSAjUc+IU3bqF0RZx5gKNQmURiiFe9Lg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvvddgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptgfkffggfghrvfevhffusehmtderredtfeejnecuhfhrohhmpeflohhsthgv ihhnucfmjhppnhhighhsvghnuceojhhoshhtvghinhesshgvtghurhgvrdhkjhhonhhigh hsvghnrdhnvghtqeenucggtffrrghtthgvrhhnpedufffggfffgfevtdehvefhffevleeg jeeggeevieekkeekudfgtefgteffteehfeenucffohhmrghinhepkhhjnhhighhsvghnrd hnohenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehj ohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvth X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Jan 2023 04:41:26 -0500 (EST) Content-Type: multipart/mixed; boundary="------------ohNm3NQIwJOnULK00y3T2di0" Message-ID: Date: Wed, 25 Jan 2023 10:41:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: en-GB, nb-NO To: "bug-gnu-emacs@gnu.org" From: =?UTF-8?Q?Jostein_Kj=c3=b8nigsen?= Subject: 29.0.60; typescript-ts-mode does not correctly highlight function-valued variables. [PATCH] Received-SPF: pass client-ip=66.111.4.29; envelope-from=jostein@secure.kjonigsen.net; helo=out5-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit Cc: Theodor Thornhill 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: , Reply-To: jostein@kjonigsen.net Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) This is a multi-part message in MIME format. --------------ohNm3NQIwJOnULK00y3T2di0 Content-Type: multipart/alternative; boundary="------------Q1QwlPuvDggJAVDT8Mm70KZ6" --------------Q1QwlPuvDggJAVDT8Mm70KZ6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit When working with codebases where people define functions by assigned arrow-expressions to local variables, typescript-ts-mode (and tsx-ts-mode) currently does not highlight them as function declarations. // this works function demoFunction() { } // this doesnt const demoFunction = () => { }; We actually have a selector for this, but it is not getting triggered, because of what looks like ordering issues. We also have override :t for almost every single feature in this mode, making it hard to know how selectors gets applied. Attached is a patch whic: 1. reorders selectors to correctly highlight function-declaration (required change, but not sufficient) 2. disables override everywhere, except for declaration, in order to keep fontification correct. So far I haven't been able to observe any ill side-effects from this change, but it might be worth double-checking. -- Jostein In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version  3.24.36, cairo version 1.17.6) of 2023-01-15 built on thinkpad-t14s Repository revision: 59c3c53efa43e82f0f2e48a4c27d5bd623201d4a Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12201007 System Description: Arch Linux Configured using:  'configure --with-json --with-tree-sitter' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings:   value of $LANG: en_US.UTF-8   locale-coding-system: utf-8-unix Major mode: TypeScript[TSX] Minor modes in effect:   electric-pair-mode: t   global-git-commit-mode: t   magit-auto-revert-mode: t   highlight-symbol-mode: t   flycheck-mode: t   editorconfig-mode: t   company-mode: t   eglot--managed-mode: t   flymake-mode: t   which-function-mode: t   helm-mode: t   helm-minibuffer-history-mode: t   shell-dirtrack-mode: t   helm--remap-mouse-mode: t   async-bytecomp-package-mode: t   delete-selection-mode: t   global-auto-revert-mode: t   yas-global-mode: t   yas-minor-mode: t   global-nlinum-mode: t   nlinum-mode: t   ido-yes-or-no-mode: t   override-global-mode: t   server-mode: t   global-hl-line-mode: t   pixel-scroll-precision-mode: t   doom-modeline-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   column-number-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/jostein/.emacs.d/elpa/transient-20230107.1528/transient hides /home/jostein/build/emacs/lisp/transient Features: (shadow emacsbug sort find-dired dired-aux pulse tabify cus-start helm-command helm-elisp helm-eval edebug helm-info markdown-mode color mail-extr json-ts-mode elec-pair typescript-ts-mode js c-ts-mode cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs treesit winner ffap tramp-archive tramp-gvfs tramp-cache time-stamp zeroconf dbus vc-hg vc-bzr vc-src vc-sccs vc-cvs vc-rcs log-view vc bug-reference flyspell ispell magit-extras magit-bookmark magit-submodule magit-obsolete 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 magit-diff smerge-mode diff git-commit log-edit message sendmail yank-media rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader pcvs-util magit-core magit-autorevert magit-margin magit-transient magit-process with-editor magit-mode transient magit-git magit-base magit-section crm misearch multi-isearch face-remap vc-git diff-mode vc-dispatcher conf-mode executable display-line-numbers disp-table vc-svn bookmark add-log ido-completing-read+ memoize minibuf-eldef elisp-slime-nav paredit highlight-symbol flycheck editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch company-oddmuse company-keywords company-etags etags fileloop generator company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-capf company-cmake company-semantic company-template company-bbdb company eglot external-completion array jsonrpc ert ewoc debug backtrace flymake-proc flymake warnings which-func hideshow eww url-queue thingatpt shr pixel-fill kinsoku url-file svg xml dom puny mm-url gnus nnheader gnus-util mail-utils range mm-util mail-prsvr helm-imenu helm-mode helm-misc helm-files image-dired image-dired-tags image-dired-external image-dired-util xdg image-mode dired dired-loaddefs exif tramp tramp-loaddefs trampver tramp-integration cus-edit pp cus-load wid-edit files-x tramp-compat shell parse-time iso8601 ls-lisp helm-buffers helm-occur helm-tags helm-locate helm-grep helm-regexp helm-utils helm-help helm-types helm helm-global-bindings helm-easymenu helm-core async-bytecomp helm-source helm-multi-match helm-lib async pcase imenu ob-plantuml org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete org-list org-footnote org-faces org-entities time-date noutline outline icons ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu calendar cal-loaddefs org-version org-compat org-macs format-spec delsel autorevert filenotify yasnippet nlinum linum ido-yes-or-no advice ido edmacro kmacro use-package-bind-key bind-key easy-mmode xref project server hl-line pixel-scroll cua-base compile-eslint compile text-property-search comint ansi-osc ansi-color ring doom-modeline doom-modeline-segments doom-modeline-env doom-modeline-core all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons shrink-path rx f f-shortdoc s dash compat dracula-theme cl-extra help-mode use-package-ensure use-package-core finder-inf yasnippet-autoloads ido-yes-or-no-autoloads elisp-slime-nav-autoloads cmake-mode-autoloads flycheck-autoloads pkg-info-autoloads magit-autoloads all-the-icons-autoloads crontab-mode-autoloads powershell-autoloads doom-modeline-autoloads undo-tree-autoloads rust-mode-autoloads magit-section-autoloads paredit-autoloads dracula-theme-autoloads cargo-autoloads yaml-mode-autoloads helm-autoloads popup-autoloads queue-autoloads nlinum-autoloads bmx-mode-autoloads company-autoloads git-commit-autoloads multiple-cursors-autoloads dap-mode-autoloads lsp-treemacs-autoloads treemacs-autoloads cfrs-autoloads posframe-autoloads hydra-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads bui-autoloads transient-autoloads ido-completing-read+-autoloads memoize-autoloads with-editor-autoloads compat-autoloads epl-autoloads lsp-docker-autoloads yaml-autoloads highlight-symbol-autoloads expand-region-autoloads lsp-mode-autoloads lv-autoloads markdown-mode-autoloads spinner-autoloads ht-autoloads shrink-path-autoloads f-autoloads dash-autoloads s-autoloads info editorconfig-autoloads helm-core-autoloads async-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 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 move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: nil -- Vennlig hilsen *Jostein Kjønigsen* jostein@kjonigsen.net 🍵 jostein@gmail.com https://jostein.kjønigsen.no --------------Q1QwlPuvDggJAVDT8Mm70KZ6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

When working with codebases where people define functions by assigned arrow-expressions to local variables, typescript-ts-mode (and tsx-ts-mode) currently does not highlight them as function declarations.

// this works
function demoFunction() {
}

// this doesnt
const demoFunction = () => {
};

We actually have a selector for this, but it is not getting triggered, because of what looks like ordering issues.

We also have override :t for almost every single feature in this mode, making it hard to know how selectors gets applied.

Attached is a patch whic:

1. reorders selectors to correctly highlight function-declaration (required change, but not sufficient)
2. disables override everywhere, except for declaration, in order to keep fontification correct.

So far I haven't been able to observe any ill side-effects from this change, but it might be worth double-checking.

--
Jostein

In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.36, cairo version 1.17.6) of 2023-01-15 built on thinkpad-t14s
Repository revision: 59c3c53efa43e82f0f2e48a4c27d5bd623201d4a
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12201007
System Description: Arch Linux

Configured using:
 'configure --with-json --with-tree-sitter'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: TypeScript[TSX]

Minor modes in effect:
  electric-pair-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  highlight-symbol-mode: t
  flycheck-mode: t
  editorconfig-mode: t
  company-mode: t
  eglot--managed-mode: t
  flymake-mode: t
  which-function-mode: t
  helm-mode: t
  helm-minibuffer-history-mode: t
  shell-dirtrack-mode: t
  helm--remap-mouse-mode: t
  async-bytecomp-package-mode: t
  delete-selection-mode: t
  global-auto-revert-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  global-nlinum-mode: t
  nlinum-mode: t
  ido-yes-or-no-mode: t
  override-global-mode: t
  server-mode: t
  global-hl-line-mode: t
  pixel-scroll-precision-mode: t
  doom-modeline-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
  column-number-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/jostein/.emacs.d/elpa/transient-20230107.1528/transient hides /home/jostein/build/emacs/lisp/transient

Features:
(shadow emacsbug sort find-dired dired-aux pulse tabify cus-start
helm-command helm-elisp helm-eval edebug helm-info markdown-mode color
mail-extr json-ts-mode elec-pair typescript-ts-mode js c-ts-mode cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs treesit winner ffap tramp-archive tramp-gvfs tramp-cache
time-stamp zeroconf dbus vc-hg vc-bzr vc-src vc-sccs vc-cvs vc-rcs
log-view vc bug-reference flyspell ispell magit-extras magit-bookmark
magit-submodule magit-obsolete 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 magit-diff smerge-mode
diff git-commit log-edit message sendmail yank-media rfc822 mml mml-sec
epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils
mailheader pcvs-util magit-core magit-autorevert magit-margin
magit-transient magit-process with-editor magit-mode transient magit-git
magit-base magit-section crm misearch multi-isearch face-remap vc-git
diff-mode vc-dispatcher conf-mode executable display-line-numbers
disp-table vc-svn bookmark add-log ido-completing-read+ memoize
minibuf-eldef elisp-slime-nav paredit highlight-symbol flycheck
editorconfig editorconfig-core editorconfig-core-handle
editorconfig-fnmatch company-oddmuse company-keywords company-etags
etags fileloop generator company-gtags company-dabbrev-code
company-dabbrev company-files company-clang company-capf company-cmake
company-semantic company-template company-bbdb company eglot
external-completion array jsonrpc ert ewoc debug backtrace flymake-proc
flymake warnings which-func hideshow eww url-queue thingatpt shr
pixel-fill kinsoku url-file svg xml dom puny mm-url gnus nnheader
gnus-util mail-utils range mm-util mail-prsvr helm-imenu helm-mode
helm-misc helm-files image-dired image-dired-tags image-dired-external
image-dired-util xdg image-mode dired dired-loaddefs exif tramp
tramp-loaddefs trampver tramp-integration cus-edit pp cus-load wid-edit
files-x tramp-compat shell parse-time iso8601 ls-lisp helm-buffers
helm-occur helm-tags helm-locate helm-grep helm-regexp helm-utils
helm-help helm-types helm helm-global-bindings helm-easymenu helm-core
async-bytecomp helm-source helm-multi-match helm-lib async pcase imenu
ob-plantuml org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src ob-comint org-pcomplete pcomplete org-list org-footnote
org-faces org-entities time-date noutline outline icons ob-emacs-lisp
ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys
oc org-loaddefs find-func cal-menu calendar cal-loaddefs org-version
org-compat org-macs format-spec delsel autorevert filenotify yasnippet
nlinum linum ido-yes-or-no advice ido edmacro kmacro
use-package-bind-key bind-key easy-mmode xref project server hl-line
pixel-scroll cua-base compile-eslint compile text-property-search comint
ansi-osc ansi-color ring doom-modeline doom-modeline-segments
doom-modeline-env doom-modeline-core all-the-icons all-the-icons-faces
data-material data-weathericons data-octicons data-fileicons
data-faicons data-alltheicons shrink-path rx f f-shortdoc s dash compat
dracula-theme cl-extra help-mode use-package-ensure use-package-core
finder-inf yasnippet-autoloads ido-yes-or-no-autoloads
elisp-slime-nav-autoloads cmake-mode-autoloads flycheck-autoloads
pkg-info-autoloads magit-autoloads all-the-icons-autoloads
crontab-mode-autoloads powershell-autoloads doom-modeline-autoloads
undo-tree-autoloads rust-mode-autoloads magit-section-autoloads
paredit-autoloads dracula-theme-autoloads cargo-autoloads
yaml-mode-autoloads helm-autoloads popup-autoloads queue-autoloads
nlinum-autoloads bmx-mode-autoloads company-autoloads
git-commit-autoloads multiple-cursors-autoloads dap-mode-autoloads
lsp-treemacs-autoloads treemacs-autoloads cfrs-autoloads
posframe-autoloads hydra-autoloads pfuture-autoloads
ace-window-autoloads avy-autoloads bui-autoloads transient-autoloads
ido-completing-read+-autoloads memoize-autoloads with-editor-autoloads
compat-autoloads epl-autoloads lsp-docker-autoloads yaml-autoloads
highlight-symbol-autoloads expand-region-autoloads lsp-mode-autoloads
lv-autoloads markdown-mode-autoloads spinner-autoloads ht-autoloads
shrink-path-autoloads f-autoloads dash-autoloads s-autoloads info
editorconfig-autoloads helm-core-autoloads async-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 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 move-toolbar gtk x-toolkit xinput2 x multi-tty
make-network-process emacs)

Memory information:
nil

--------------Q1QwlPuvDggJAVDT8Mm70KZ6-- --------------ohNm3NQIwJOnULK00y3T2di0 Content-Type: text/x-patch; charset=UTF-8; name="0001-typescript-ts-mode-fix-fontification-of-function-val.patch" Content-Disposition: attachment; filename*0="0001-typescript-ts-mode-fix-fontification-of-function-val.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSBlNWRlNzIwYzU2MzVlZWFlNGIxYTM3MjhkOTRlYjRiZGI2MDE3NGQwIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/Sm9zdGVpbj0yMEtqPUMzPUI4bmln c2VuPz0gPGpvc3RlaW5Aa2pvbmlnc2VuLm5ldD4KRGF0ZTogV2VkLCAyNSBKYW4gMjAyMyAx MDozODowOSArMDEwMApTdWJqZWN0OiBbUEFUQ0hdIHR5cGVzY3JpcHQtdHMtbW9kZTogZml4 IGZvbnRpZmljYXRpb24gb2YgZnVuY3Rpb24tdmFsdWVkCiB2YXJpYWJsZXMKCi0gcmVtb3Zl IG92ZXJyaWRlcyBhbGwgb3ZlciB0aGUgcGxhY2UuLi4gc2luY2UgdGhhdCBtZWFucyB3ZSBj YW50CiAgb3ZlcnJpZGUgdGhlIG9uZSBwbGFjZSB3ZSBhY3R1YWxseSBuZWVkIHRvIQotLS0K IGxpc3AvcHJvZ21vZGVzL3R5cGVzY3JpcHQtdHMtbW9kZS5lbCB8IDIwICsrKys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gogICAgICAg a2V5OiAocHJvcGVydHlfaWRlbnRpZmllcikgQGZvbnQtbG9jay1wcm9wZXJ0eS1mYWNlKQpA QCAtMjc0LDcgKzI2NSw2IEBAIHR5cGVzY3JpcHQtdHMtbW9kZS0tZm9udC1sb2NrLXNldHRp bmdzCiAgICAgIChhcnJheV9wYXR0ZXJuIChpZGVudGlmaWVyKSBAZm9udC1sb2NrLXZhcmlh YmxlLW5hbWUtZmFjZSkpCiAKICAgIDpsYW5ndWFnZSBsYW5ndWFnZQotICAgOm92ZXJyaWRl IHQKICAgIDpmZWF0dXJlICdqc3gKICAgIGAoKGpzeF9vcGVuaW5nX2VsZW1lbnQKICAgICAg IFsobmVzdGVkX2lkZW50aWZpZXIgKGlkZW50aWZpZXIpKSAoaWRlbnRpZmllcildCi0tIAoy LjM5LjEKCg== --------------ohNm3NQIwJOnULK00y3T2di0-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 07:06:25 2023 Received: (at 61053) by debbugs.gnu.org; 25 Jan 2023 12:06:25 +0000 Received: from localhost ([127.0.0.1]:58500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKeXo-0000pT-Qy for submit@debbugs.gnu.org; Wed, 25 Jan 2023 07:06:25 -0500 Received: from out0.migadu.com ([94.23.1.103]:33968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKeXk-0000p8-Ls for 61053@debbugs.gnu.org; Wed, 25 Jan 2023 07:06:22 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1674648378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o67+eihlWVZ5Ojo1eMVYw4sDp+mQ0PjdAOCHpS8GVk4=; b=KLp71lWUs+vfaWIrypmNhlAynIlx08lDuohkFayVMrwzOY6LWBBSq0gcrY9YTbPsfTdl4J 8xqMohpiZUfMVku9HlXeHdMuxKsQqXbnOBCSscXuAtyaEEGkNUStFrP4aqvCXVo6GoW79z TfivfKcpgsuk2kULC4MI1WjUXNtg7do1iP9WSFndBZ60TKPyEQpF1/N+VHxPPrjnDTWM1a 4iFszKCrCd5y3qGAXEF+wNL5TUDb0CeEXnTPsSnd1X2ROt82hJWl1mD/kUxGVoMP4vnyNc SpB5sFLXT7gC+RyRV2ibkG4H1XzgFGMVRZkWusmkeXAlt0g/JN6Trf72xJXtWg== From: Theodor Thornhill To: Jostein =?utf-8?Q?Kj=C3=B8nigsen?= Subject: Re: bug#61053: 29.0.60; typescript-ts-mode does not correctly highlight function-valued variables. [PATCH] In-Reply-To: ("Jostein =?utf-8?Q?Kj=C3=B8nigsen=22's?= message of "Wed, 25 Jan 2023 10:41:23 +0100") References: Date: Wed, 25 Jan 2023 13:06:16 +0100 Message-ID: <87r0vi95tz.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 61053 Cc: jostein@kjonigsen.net, 61053@debbugs.gnu.org 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.7 (-) Jostein Kj=C3=B8nigsen writes: > When working with codebases where people define functions by assigned arr= ow-expressions to local variables, > typescript-ts-mode (and tsx-ts-mode) currently does not highlight them as= function declarations. > > // this works > function demoFunction() { > } > > // this doesnt > const demoFunction =3D () =3D> { > }; > > We actually have a selector for this, but it is not getting triggered, be= cause of what looks like ordering issues. > > We also have override :t for almost every single feature in this mode, ma= king it hard to know how selectors gets > applied. > > Attached is a patch whic: > > 1. reorders selectors to correctly highlight function-declaration (requir= ed change, but not sufficient) > 2. disables override everywhere, except for declaration, in order to keep= fontification correct. > > So far I haven't been able to observe any ill side-effects from this chan= ge, but it might be worth double-checking. > Thanks, Jostein! Looks like it works on my end aswell. Applied and pushed, so closing this. Keep them coming :) Theo From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 07:06:46 2023 Received: (at control) by debbugs.gnu.org; 25 Jan 2023 12:06:46 +0000 Received: from localhost ([127.0.0.1]:58504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKeYA-0000qB-41 for submit@debbugs.gnu.org; Wed, 25 Jan 2023 07:06:46 -0500 Received: from out-7.mta0.migadu.com ([91.218.175.7]:14136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKeY7-0000py-Mt for control@debbugs.gnu.org; Wed, 25 Jan 2023 07:06:44 -0500 Date: Wed, 25 Jan 2023 13:06:39 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1674648402; h=from:from:reply-to:subject:subject:date:date:to:to:cc; bh=9WBHyd2v4Ydi4B99fdEr9YJLJ6tlMfoITY9xhZb864E=; b=b9dEzF4ePzCGVTIRexarluINohri2LXyba2cUfDnxHpH0BgsDDlbfRmlaYsE2xI6kW8TlA xj87kIgx7iZh0+Mq5+6iVTvQ8n8eKVvZuHNGBo5mY8WJ9Uw+yxeeX3/DUkbHveW9NyUTlw yjZ4axbnpiV5OcFy6gUmAB50lExyEUeUpQb7zcIvQaucSwOpJjCZMuA1hYPNsXbt/zZo/w lpOAkzvcG8vFU16xdEt7vVkLEv1vfGOj1kQrlD1QpydQFaTawCfUKqnYOkid/vAE245hJZ d4EY+tZhGdrH58ZgI9vkmH+0NG/SKS2uUUeQfj5U96/fm6I6pwkgMD4RkXI5Nw== To: control@debbugs.gnu.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Theodor Thornhill Subject: control message for bug #61053 X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control 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" Message-Id: X-Spam-Score: -1.0 (-) close 61053 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 08:05:53 2023 Received: (at 61053) by debbugs.gnu.org; 25 Jan 2023 13:05:54 +0000 Received: from localhost ([127.0.0.1]:58583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKfTN-0007FT-Ib for submit@debbugs.gnu.org; Wed, 25 Jan 2023 08:05:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKfTK-0007F9-PG for 61053@debbugs.gnu.org; Wed, 25 Jan 2023 08:05:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKfTE-0008S5-Q2; Wed, 25 Jan 2023 08:05:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=n5cNnh9zkei9/NDcExCm1E0FN99JNRNKfjjzqwHxiWs=; b=KVsQ9GcElHlzDPpMssY8 3z/kbIKlJJ2OdM2r2eCa4F+gja2HTEwXKr/EbrghYqytgVGceVyozPEoAmhlCEObzbDg8eTF6FIBB wdFe+QXtbuJD6ZOJbY9GBbyOO14ScPP6q7LIL6l8nSCHLP013jW4GKkvjYVrv20Xv7aA/NbRgYd5w 3ykvkam6KQ4/Us3Wu4sCpxpU9bdJPhJdOAFFA0uACD0SsH4UkKQJIKviefsqOfTrlQTvHHNaWp+rp BOA3RwMQY8MdHemVwKGXLVL5p1tdjDDcBZx6bXi+sRJbu88ab5EpZ7DqzLXkdDA02j+az47M0m3s0 YY9lJS+va6N6XA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKfTE-0007rT-9i; Wed, 25 Jan 2023 08:05:44 -0500 Date: Wed, 25 Jan 2023 15:05:58 +0200 Message-Id: <83sffyg3wp.fsf@gnu.org> From: Eli Zaretskii To: jostein@kjonigsen.net In-Reply-To: (message from Jostein =?utf-8?Q?Kj=C3=B8nigsen?= on Wed, 25 Jan 2023 10:41:23 +0100) Subject: Re: bug#61053: 29.0.60; typescript-ts-mode does not correctly highlight function-valued variables. [PATCH] References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61053 Cc: theo@thornhill.no, 61053@debbugs.gnu.org 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.3 (---) > Cc: Theodor Thornhill > Date: Wed, 25 Jan 2023 10:41:23 +0100 > From: Jostein Kjønigsen > > When working with codebases where people define functions by assigned arrow-expressions to local > variables, typescript-ts-mode (and tsx-ts-mode) currently does not highlight them as function declarations. > > // this works > function demoFunction() { > } > > // this doesnt > const demoFunction = () => { > }; > > We actually have a selector for this, but it is not getting triggered, because of what looks like ordering > issues. > > We also have override :t for almost every single feature in this mode, making it hard to know how selectors > gets applied. > > Attached is a patch whic: > > 1. reorders selectors to correctly highlight function-declaration (required change, but not sufficient) > 2. disables override everywhere, except for declaration, in order to keep fontification correct. Thanks. When fixing such "tricky" issues, please always include in the code comments which explain the tricky stuff, in this case why some code must be before the other. Otherwise we run the risk that someone, some day, will reorder the code, and we get the bug back. Adding tests for this is even better (but doesn't make the comments less important). From unknown Fri Aug 15 04:06:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 23 Feb 2023 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