Skip to content

Releases: DisposaBoy/GoSublime

20.06.14

14 Jun 18:36
890149f
Compare
Choose a tag to compare

20.06.14

This release contains a number of features and bug fixes that have been worked on over the last few months.

You will need to restart Sublime Text for all changes to take effect

  • Add new GoCmd{} option Humanize to make go test and go re/play (in test mdoe) output more readable (using https://github.com/dustin/go-humanize).

    • large numbers are split up using commas
    • 123456 ns/op is converted to µs/op, etc.
    • 123456 B/op is converted to KiB/op, etc.

    To enabled it, use:

    &golang.GoCmd{
        Humanize: true,
    }
    

    e.g. output:

    goos: linux
    goarch: amd64
    pkg: margo.sh/vfs
    BenchmarkPoke/Miss-8            388,868       2.952 µs/op
    BenchmarkPoke/Hit-8            1,739,704         684 ns/op
    PASS
    

    Known bugs:

    • The output fields are not aligned
  • Add new reducer golang.GoGenerate

    It adds a UserCmd (cord ctrl/cmd+.,ctrl/cmd+.c) named Go Generate that calls go generate in the closest go package (current dir or parent dirs).

    It can be enabled with:

    &golang.GoGenerate{
        Args: []string{"-v", "-x"},
    },
    
  • Auto-completion now works when the line ends with a dot (.)

  • Add new reducer golang.AsmFmt

    It does code fmt'ing for .s files using https://github.com/klauspost/asmfmt

    It formats .s files when they are saved, or the fmt cord ctrl+.,ctrl.f is pressed.

  • Add new reducer &web.Prettier{}

    It does code fmt'ing using https://github.com/prettier/prettier
    By default It fmt's CSS, HTML, JS, JSON, JSX, SVG, TS, TSX and XML files.

    To specify the list of langs to fmt set the Langs field:

    &web.Prettier{
        // Langs: []mg.Lang{mg.JS}, // only fmt .js files
        Langs: web.PrettierDefaultLangs,
    },
    

    You might also need to import "margo.sh/web".

    You will need to install prettier separately.

  • Add new Lang constants: mg.HTML, mg.SVG and mg.XML

  • Add mgutil.SplitWriter a writer that writes to an underlying writer in split chunks e.g. lines somewhat similar to bufio.scanner

  • go.play and go.replay (cord ctrl/cmd+.,ctrl/cmd+r) now works in in unsaved _test.go files.

  • go.replay now runs the Benchmark* func surrounding the cursor.

    Compared to ctrl/cmd+shift+left-click, it also runs tests.

    Known bugs:

    • It currently ignores the TestArgs and BenchmarkArgs options of the golang.TestCmds reducer.
  • mg.CmdCtx supports a new option Verbose,

    When cx.Verbose = truethe commands that are run are printed to the output prefixed with #.

    e.g. output:

    [ `replay` | done ]
    # go test -test.run=. -test.bench=^BenchmarkPoke$
    goos: linux
    [...]
    

    It's enabled for go.play and go.replay (cord ctrl/cmd+.,ctrl/cmd+r).

  • Issues without a valid tag are now defaulted to mg.Error instead of being ignored.

    This fixes some cases where the error palette shows errors, but the status and HUD doesn't.

  • Fix some cases where issues are reported in the wrong file or incorrectly anchored to the current file.

  • goutil.IsPkgDir() and other functions now use the VFS, so should touch the disk less.

20.03.09

09 Mar 10:50
bd0163d
Compare
Choose a tag to compare

This release fixes a couple bugs:

  • GO111MODULE=off is set after building, in cases where GO111MODULE wasn't already set by the user.
  • An update message is shown even when the local GoSublime version is greater than that reported by the server.

v20.03.01

01 Mar 14:07
96954d1
Compare
Choose a tag to compare

This release fixes a margo build failure when upgrading to go1.14.

v20.02.01

01 Feb 12:57
8265060
Compare
Choose a tag to compare

This release focuses on fixing a performance issue due to a failure to resetting all cached data prematurely.

  • Cache some files in memory to avoid re-reading from disk every time.

  • The &nodejs.PackageScripts{} reducer now uses yarn instead of npm if the yarn.lock file is present.

v20.01.01

01 Jan 11:28
f78e351
Compare
Choose a tag to compare

This release mainly focuses on under-the-hood improvements for module support.

  • The default auto-completion import mode has been changed to Kim-Porter, our solution for auto-completion and package/module going forward.

    One side-effect of this change is that unimported-packages support is less reliable but we feel this is a small drawback when compared to the much improved auto-completion support.

    We plan to remove support for switching import modes in the future, but if you would like to revert to the previous default (bearing in mind auto-completion might stop working), configure the MarGocodeCtl reducer as follows:

        &golang.MarGocodeCtl{
          ImporterMode: golang.SrcImporterWithFallback,
        }
  • The Go/TypeCheck linter is now more complete and should be able to type-check (without failure) all packages for which auto-completion is available.
    This linter offers typechecking (like the gotype tool) but can work on unsaved files and while you type and is faster a full go install lint.

    To enable add the following reducer to your margo.go file:

      &golang.TypeCheck{},
  • Some HTTP handler snippets have been added and are offered in files that import "net/http".

19.10.22

22 Oct 09:05
aeeff9a
Compare
Choose a tag to compare
  • API BREAKAGE:
    ParseWithMode and ParseWithMode now takes a *mg.Ctx instead of a mg.KVStore.

  • Add experimental support for auto-completion and type-checking in go modules.

  • Add experimental reducer &golang.TypeCheck{}.
    It's a linter that does a full type-check as you type (even in unsaved files).
    It can be thought of as a replacement for the gotype binary of old.

    NOTE: This is purely an experiment used primarily for testing the package importer
    and type-checking and will probably break randomly, if it works at all.

    With that said, the plan is to clean it up and develop it further in the future.

  • The Ariana color scheme has been tweaked to improve readability.

  • Add a prefix to status items and reduce the space between them.

  • Add langs mg.GoMod and mg.GoSum for go.mod and go.sum files, respectively.
    For convenience, goutil.Langs now holds the list of all Go-related langs
    and Go linters are now available in go.mod and go.sum.

  • The tasks count styled has been changed to Tasks ➊➋➌.
    The status animates between Tasks ➊➋➌ and Tasks ➀➁➂ while there are tasks less than 16s old.

  • The issue count styled has been changed to Error ➊ꞏ🄋.

    NOTE: The meanings of the numbers have been reverted.

    Previously, given 1/2 Errors, there was 1 issue with tag Error in this view, and there was a total 2 errors in all views.
    The new meanings Error ➊ꞏ🄋 is: ➊ is the number issues in the current view and 🄋 is the number issues in other views.

    Only first number is highlighted if there are issues in the current view.
    Likewise, when there are issues, but none in the current view, only the second number is highlighted.

  • Don't show the func prefix in the calltip status. The parens already make it obviously a function.

19.06.16

16 Jun 19:54
Compare
Choose a tag to compare
  • Fix a deadlock/freeze (seen on Mac OS) when starting up with multiple windows open.
  • Fix an issue where the active window loses focus when starting up.

18.11.28

28 Nov 19:19
e1cd2a7
Compare
Choose a tag to compare

This release introduces the HUD and comes with many improvements to snippets and a tweaked version of the Mariana color scheme named Ariana.

ANN

30 Sep 17:26
8f22a3f
Compare
Choose a tag to compare
ANN
v18.09.30

Update CHANGELOG.md

switch some links from margo.sh to margo.kuroku.io

31 Jul 11:55
Compare
Choose a tag to compare
v18.07.31

temporarily switch some links to margo.kuroku.io to work around #848