micro-editor / go-plugin Goto Github PK
View Code? Open in Web Editor NEWAuto gofmt/goimports and gorename
Auto gofmt/goimports and gorename
When I am saving my code, it is not automatically importing packages.
Macos:
Micro encountered an error: attempt to index a non-table object(nil) with key 'init'
stack traceback:
[G]: ?
*lua.ApiError attempt to index a non-table object(nil) with key 'init'
stack traceback:
[G]: ?
/Users/v.kulibaba/go/pkg/mod/github.com/yuin/[email protected]/state.go:600 (0x11cf363)
panicWithTraceback: panic(err)
/Users/v.kulibaba/go/pkg/mod/github.com/yuin/[email protected]/state.go:695 (0x11cfdb8)
(*LState).raiseError: ls.Panic(ls)
/Users/v.kulibaba/go/pkg/mod/github.com/yuin/[email protected]/state.go:1658 (0x11d3e42)
(*LState).getFieldString: ls.raiseError(1, format, args...)
/Users/v.kulibaba/go/pkg/mod/github.com/yuin/[email protected]/state.go:1253 (0x11d3d52)
(*LState).getFieldString: ls.RaiseError("attempt to index a non-table object(%v) with key '%s'", curobj.Type().String(), key)
/Users/v.kulibaba/go/pkg/mod/github.com/yuin/[email protected]/state.go:1836 (0x133df77)
(*LState).GetField: return ls.getFieldString(obj, skey)
/Users/v.kulibaba/Program/micro/internal/config/plugin.go:106 (0x133df44)
(*Plugin).Call: luafn := ulua.L.GetField(plug, fn)
/Users/v.kulibaba/Program/micro/internal/config/plugin.go:32 (0x133d511)
RunPluginFn: _, err := p.Call(fn, args...)
/Users/v.kulibaba/Program/micro/cmd/micro/micro.go:206 (0x14505bd)
main: err = config.RunPluginFn("init")
/usr/local/go/src/runtime/proc.go:203 (0x103119e)
main: fn()
/usr/local/go/src/runtime/asm_amd64.s:1357 (0x105d071)
goexit: BYTE $0x90 // NOP
I have been using https://github.com/mvdan/gofumpt recently and I think it is doing a great job with the formatting of code. I would suggest switching to using that instead.
will you add autocomplete support?
Hey,
Running micro 2.0.10 on Windows 11 and running the plugin version - go (2.0.2)
when trying to save and use gofmt exit status 2 occur
Are there any plans for adding gopls?
I use this package a lot but it seems to fail to provide errors within test files. This is unfortunate as it makes writing tests take a lot more time than what it necessarily needs to.
According the plugin docs here, the installation location of the plugin must be in directory in ~/.config.micro/plug
. Using the plugin name go-plugin
, this means, the gplugin files should be in ~/.config.micro/plug/go-plug
.
$ tree ~/.config/micro
~/.config/micro
└── plug
└── go-plugin
├── README.md
├── go.lua
├── help
│ └── go-plugin.md
└── info.json
Following the documentation instructions, the plugin files will be placed directly in ~/.config.micro/plug
directory.
$ git clone https://github.com/micro-editor/go-plugin ~/.config/micro/plug
$ tree ~/.config/micro
~/.config/micro
└── plug
├── README.md
├── go.lua
├── help
│ └── go-plugin.md
└── info.json
Changing the installation command in the documentation to download the plugin files in ~/.config/micro/plug/go-plugin
.
git clone https://github.com/micro-editor/go-plugin ~/.config/micro/plug/go-plugin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.