neovim-go-nix-develop
vim-go
Our great sponsors
neovim-go-nix-develop | vim-go | |
---|---|---|
8 | 25 | |
21 | 15,811 | |
- | - | |
4.2 | 8.3 | |
4 months ago | 10 days ago | |
Lua | Vim Script | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
neovim-go-nix-develop
-
Is there any way to autocomplete language functions? For example, show things like fmt.Printf or fmt.Println when writing fmt.Print and pressing the autocomplete key.
https://github.com/jamespwilliams/neovim-go-nix-develop is a minimal Go neovim dev env I put together a while back (it can be created in one command with Nix, but even if you don’t use/know about Nix, you can read the file and see the config used).
-
SpaceVim Release v2.0.0
https://github.com/jamespwilliams/neovim-go-nix-develop
The above is my attempt to create a minimal Neovim configuration that uses treesitter and nvim-lsp (albeit only for Go).
It uses Nix, so if you have Nix installed you can immediately try the configuration out in a self-contained development shell.
It’s too minimal for everyday use, but could be of inspiration.
-
Set up a Go neovim development environment in one command using Nix
I've updated it to use 1.18: https://github.com/jamespwilliams/neovim-go-nix-develop/commit/6e6e980752bbe50f9eea17dd438729aabfa7ef65
vim-go
-
nvim when I open an empty file from go
There are a handful of really good go plugins that take care of this for you, such as https://github.com/ray-x/go.nvim or https://github.com/fatih/vim-go
-
What's the most commonly used IDE for golang development ?
With vim-go and snippets, neovim has almost the same functionality as GoLand
- Is there any way to autocomplete language functions? For example, show things like fmt.Printf or fmt.Println when writing fmt.Print and pressing the autocomplete key.
-
Which editor do you use for your Go coding?
Neovim with its lsp integration. Yes, my configuration breaks whenever neovim is upgraded (it is < v1 after all). But usually I wait a little while, and then update plugins and I’m good to ‘go’. One very very good plug-in is https://github.com/fatih/vim-go. The wiki page has a suggested vimrc, which works very well to integrate things like identifier highlighting, and references.
with this wonderful plugin: https://github.com/fatih/vim-go
- What's your Golang IDE?
-
Anyone write Go full time using vim?
At first Ihad struggled with some common "IDE" tasks. But then I discovered vim-go and realized that it could do pretty much everything that I need and even more.
-
Share your must-know Go development tips
I use vim as an editor, and I think that vim-go (https://github.com/fatih/vim-go) is a huge help, if you use the "gd" shortcut to take you to where a variable, type or function is defined, and the ctrl-T shortcut to take you back. Use goimports (https://pkg.go.dev/golang.org/x/tools/cmd/goimports) as the vim-go code formatter. This will keep imports up-to-date. There are some other vim-go features that may be helpful. You can have it highlight syntax errors, for example. Not every feature is helpful to every programmer, however.
-
vim-rust go-to-definition doesn't work with standard library features
Maybe there's a reason why this isn't possible, but if I compare this work-flow with something like https://github.com/fatih/vim-go I can use go-to-definition for everything (whether it be a third-party package or a standard library feature such as fmt.Printf).
What are some alternatives?
coc-go - Go language server extension using gopls for coc.nvim.
coc.nvim - Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
go.nvim - A feature-rich Go development plugin, leveraging gopls, treesitter AST, Dap, and various Go tools to enhance the dev experience.
Go for Visual Studio Code
YouCompleteMe - A code-completion engine for Vim
gocode - An autocompletion daemon for the Go programming language
ale - Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
kotlin-vim - Kotlin plugin for Vim. Featuring: syntax highlighting, basic indentation, Syntastic support
GNU/Emacs go-mode - Emacs mode for the Go programming language
deoplete.nvim - :stars: Dark powered asynchronous completion framework for neovim/Vim8
Local Golang playground - GNU/Emacs mode that setup local Go playground for code snippets like play.golang.org or even better :)
goimports-reviser - Right imports sorting & code formatting tool (goimports alternative)