From: Noah Peart <noah.v.peart@gmail.com>
To: 70361@debbugs.gnu.org
Subject: bug#70361: [PATCH] Add font-locking for operators in go-ts-mode.
Date: Fri, 12 Apr 2024 22:23:05 -0700 [thread overview]
Message-ID: <CAPVBTScmTQ_jXt483miDqyRsivrLWtXU9g7gztFP=aZO5XHrBQ@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 854 bytes --]
Tags: patch
Adds font-locking for Go operators in `go-ts-mode'. The operator feature
is already added to `treesit-font-lock-feature-list' in `go-ts-mode` - this
just adds the missing rule to `go-ts-mode--font-lock-settings'.
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.33, cairo version 1.16.0) of 2024-04-07 built on noah-X580VD
Repository revision: ee377aaddf9d73116b93c3d54b1ffef9a3a8b925
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Ubuntu 22.04.4 LTS
Configured using:
'configure --prefix=/usr/local --with-modules --with-tree-sitter
--with-threads --with-x-toolkit=gtk3 --with-xwidgets --with-gnutls
--with-json --with-mailutils --with-jpeg --with-png --with-rsvg
--with-tiff --with-xml2 --with-xpm --with-imagemagick CC=gcc-12
CXX=gcc-12'
[-- Attachment #1.2: Type: text/html, Size: 969 bytes --]
[-- Attachment #2: 0001-Add-font-locking-for-operators-in-go-ts-mode.patch --]
[-- Type: text/x-patch, Size: 888 bytes --]
From fd393a6259e5f3479a9f244764ef26a796505e28 Mon Sep 17 00:00:00 2001
From: Noah Peart <noah.v.peart@gmail.com>
Date: Fri, 12 Apr 2024 22:09:17 -0700
Subject: [PATCH] Add font-locking for operators in go-ts-mode.
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings): Add
font-locking for Go operators.
---
lisp/progmodes/go-ts-mode.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el
index cc330688dc3..7ca3bfa5e65 100644
--- a/lisp/progmodes/go-ts-mode.el
+++ b/lisp/progmodes/go-ts-mode.el
@@ -135,6 +135,10 @@ go-ts-mode--font-lock-settings
:feature 'delimiter
'((["," "." ";" ":"]) @font-lock-delimiter-face)
+ :language 'go
+ :feature 'operator
+ `([,@go-ts-mode--operators] @font-lock-operator-face)
+
:language 'go
:feature 'definition
'((function_declaration
--
2.34.1
next reply other threads:[~2024-04-13 5:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-13 5:23 Noah Peart [this message]
2024-04-13 7:20 ` bug#70361: [PATCH] Add font-locking for operators in go-ts-mode Eli Zaretskii
2024-04-13 7:27 ` Noah Peart
2024-04-13 7:32 ` Noah Peart
2024-04-13 7:40 ` Eli Zaretskii
2024-04-13 7:53 ` Noah Peart
2024-04-13 9:33 ` Eli Zaretskii
2024-04-14 23:25 ` Yuan Fu
2024-04-14 23:34 ` Yuan Fu
2024-04-15 12:05 ` Noah Peart
2024-04-16 1:49 ` Randy Taylor
2024-04-16 5:57 ` Yuan Fu
2024-04-16 5:58 ` Yuan Fu
2024-04-16 12:34 ` Eli Zaretskii
2024-04-17 2:47 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPVBTScmTQ_jXt483miDqyRsivrLWtXU9g7gztFP=aZO5XHrBQ@mail.gmail.com' \
--to=noah.v.peart@gmail.com \
--cc=70361@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.