GNU bug report logs - #74461
[PATCH] Add go-work-ts-mode

Previous Next

Package: emacs;

Reported by: Gabriel Santos <gabrielsantosdesouza <at> disroot.org>

Date: Thu, 21 Nov 2024 13:59:02 UTC

Severity: wishlist

Tags: confirmed, patch

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #53 received at 74461 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Gabriel Santos <gabrielsantosdesouza <at> disroot.org>
Cc: dev <at> rjt.dev, Eli Zaretskii <eliz <at> gnu.org>, 74461 <at> debbugs.gnu.org
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
Date: Sun, 22 Dec 2024 10:33:27 -0500
>>Do we have a way to tell Eglot which LSP server(s) to use via some
>>buffer-local var, instead of having to change this centralized
>>"database"?
>
> Looking at the following commits:
>
> - 5f56bc1
> <https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5f56bc1cdfcd474dd9cfad07240df6c252abd35c>
> - e37754f
> <https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e37754fc59bac409881d456a83aa0bf2468c94fb>
>
> That doesn't seem to be the case.

It was a kind of rethorical question: whether we do or not, we *should*
have such a mechanism and we should use it here.

> Go uses tabs for indentation,
> and spaces for alignment.
[...]
> The language specification doesn't mention
> that, but I think it should.
> Maybe I should send them an e-mail about that.

I don't think the language cares (or should care).  It's only a convention.
But if it's the only convention in use in Go, that's fine: just add
a link to https://go.dev/doc/effective_go#formatting that justifies
the setting.

>>Since we don't have another (non-treesitter) mode for these files, I'd
>>recommend you go straight for:
>>
>>    ;;;###autoload
>>    (add-to-list 'auto-mode-alist '("/go\\.work\\'" . go-work-ts-mode))
>
>
> Sorry if I misunderstand,
> but that doesn't seem to be the case
> for other tree-sitter modes.

Past practice does not always reflect best practices, especially when
talking about relatively new practices.


        Stefan





This bug report was last modified 103 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.