2

It appears to me that go-mode and speedbar are not working together - the .go files do not appear in the file list.

https://github.com/dominikh/go-mode.el/issues/270 is a bug on go-mode which suggests that it isn't just me seeing this problem.

What is required to change this?

Realraptor
  • 1,253
  • 6
  • 17

1 Answers1

1

Looks like adding

(speedbar-add-supported-extension ".go")

Might be a big part of the solution.

Drew
  • 75,699
  • 9
  • 109
  • 225
Slowjoe
  • 11
  • 1
  • Can you elaborate, explaining how/why this helps? – Drew Mar 21 '19 at 01:17
  • The function adds the file extension to the `speedbar-supported-extension-expressions` user-option. The ".go" file extension could also be added directly to the user-option in the customization buffer. The list is used to build `speedbar-file-regexp` which is used inside Speedbar.el to detect the files of interest. This works when go-mode is installed. – PRouleau Jan 23 '21 at 04:03
  • Ideally the code for the major mode should evaluate the `(speedbar-add-supported-extension ".go")` form to add speedbar support. When that's not done, the choice is to add the extension support to the customizable user-option or to place this code somewhere, like the Emacs init code. – PRouleau Jan 23 '21 at 19:09