From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincenzo Pupillo Newsgroups: gmane.emacs.devel Subject: Re: Define treesit-font-lock-level as buffer local Date: Thu, 07 Nov 2024 12:08:32 +0100 Message-ID: <2730223.lGaqSPkdTl@3-191.divsi.unimi.it> References: <4929184.OV4Wx5bFTl@3-191.divsi.unimi.it> <861pznqp9m.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15912"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Yuan Fu , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 07 12:09:10 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t90Ny-00041K-EL for ged-emacs-devel@m.gmane-mx.org; Thu, 07 Nov 2024 12:09:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t90NT-0003tl-EC; Thu, 07 Nov 2024 06:08:39 -0500 Original-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 1t90NR-0003tR-C6 for emacs-devel@gnu.org; Thu, 07 Nov 2024 06:08:37 -0500 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t90NP-0002DQ-QJ; Thu, 07 Nov 2024 06:08:37 -0500 Original-Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-37f52925fc8so506578f8f.1; Thu, 07 Nov 2024 03:08:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730977714; x=1731582514; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gZfqoVEaMjEUextAskPTWKDgmrfOx/4ZIo5qmUQDz5w=; b=caVJUldSDDko2OA582nBxd9+so0asRPwjTiUWGsUb+uRtsa6KNC1VJgAXLEhmSaauV PHwt+W4JiXN5dHZsW3BjYyLTbTFaUZWPFbog8SEcgx64EUei12nFK0obliUXGwtN9YJt U9+jR8aya0/qstKjqsdNkZeVwUEchDSuRzsFqp93QNXptNa1uC5Luj+Mbg32VbVD0leT +/qr80e7wJYxdhfbIax9WKqd1w+MA1W+31DZPXzFO5jMyS1Yqu7HZYD+FM0iiELognow jPDGxsVXQWk++uuhIroMiFSG6lsGU6Zj+4wnFJMWwSE7NzeWn4bWwF3FQjYjXyfTVtvI 0Wdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730977714; x=1731582514; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gZfqoVEaMjEUextAskPTWKDgmrfOx/4ZIo5qmUQDz5w=; b=QI2cLZnc7xHW4nlF7MR4gXRqCBhQiF9/zoMUwaV0G9fe07U37+ansAoVOeaUwmwxqC Yo52jIJ0oqDP6tVJ18hMRFiUcpggF8WkWqiIMAQ20hfsM4FSquSCUWw+0AfglLqvMxtg TBp1ZGjBfmkR4LUNxe2JBSdoo5DFvpFnQ361qVN8efjzHm0dzvI6h0G91MkIGko15dSu ++8EWuMhlWtUZbDJXr0UOP+4BEAUMjj6kQOV3P9bGg0fe6IEGiD7/rOSbh2E6H2YygjM vOt+ITdSocclIIrT3bppCJozSMTJYScGC2H2CbNAS4AynZ6WWslFRUuUe9R4CEpA+qnY nZIg== X-Forwarded-Encrypted: i=1; AJvYcCVpfCumBJy1o9wtKQB/V2o5SdEuXcaMTDvj4rWUYp0qXUo0P3kTqra/9oODjmxQT6SkQ4Px@gnu.org X-Gm-Message-State: AOJu0Yz04QQCv+r/GHIopKu7RZDLXiI3pLQ3LZ9vIYf4y3VGSvtc7Xat nZw4zi210brM8OBuJbNzOAbZ3gmJZuGYiILs/nhLeULXD4UchtEy9QPhpw== X-Google-Smtp-Source: AGHT+IFAZcpE+Qirew/wnqD7GEEAiyCWEBx8maMjsXumogOS/mIo6tJxJ9odpJEysMUSt/B5THni/A== X-Received: by 2002:a5d:6da6:0:b0:37d:501f:483f with SMTP id ffacd0b85a97d-381c7ab2fb6mr18256592f8f.44.1730977713671; Thu, 07 Nov 2024 03:08:33 -0800 (PST) Original-Received: from 3-191.divsi.unimi.it (3-191.divsi.unimi.it. [159.149.3.191]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381ed97db25sm1439058f8f.41.2024.11.07.03.08.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 03:08:33 -0800 (PST) In-Reply-To: <861pznqp9m.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=v.pupillo@gmail.com; helo=mail-wr1-x430.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325220 Archived-At: In data gioved=C3=AC 7 novembre 2024 12:03:49 Ora standard dell=E2=80=99Eur= opa centrale, Eli Zaretskii ha scritto: > > From: Vincenzo Pupillo > > Date: Thu, 07 Nov 2024 11:30:03 +0100 > >=20 > > Ciao, > > I use tree-sitter for different languages, for some of them I prefer fo= nt lock level 3, for others I prefer level 4.=20 > > treesit-font-lock-level, however, is not defined as buffer local and so= there is no elegant way to have=20 > > different levels for different languages.=20 > > Would it be possible to define treesit-font-lock-level as a buffer loca= l? >=20 > Is it a problem for you to do that in your init file? No, it's not a problem. > Also, we could support a value of that variable which is a list, like > we do with font-lock-maximum-decoration. This will be more useful > than making the variable buffer-local, since presumably your > preferences are per-mode, not per-buffer. =20 Yes, this would be a better solution. > Yuan, WDYT? >=20 V.