[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#74461: [PATCH] Add go-work-ts-mode
From: |
Gabriel Santos |
Subject: |
bug#74461: [PATCH] Add go-work-ts-mode |
Date: |
Sun, 22 Dec 2024 13:05:52 -0300 |
>It was a kind of rethorical question: whether we do or not, we *should*
>have such a mechanism and we should use it here.
Oh definitely, another point for discussion.
>> 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.
I added it to the commentary section:
+;; Go uses tabs as a convention for indentation:
+;; https://go.dev/doc/effective_go#formatting
+;; so indent-tabs-mode is enabled for the modes.
>>>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.
I'll change that, but after this is accepted
I'll make this change to the other modes,
CCing emacs-devel and the respective maintainers.
--
Gabriel Santos