IDE для Golang
Какая нормальная IDE сейчас есть? Попробовал осилить Eclipse — как был ерундой, так ерундой и остался.
IDEA + плагин. Может Gogland уже юзабельный, не пробовал.
Я не любитель IDE, но Gogland неплохо выглядит.
С Vim есть непонятки у меня, что блин из этого использовать:
Нет чтобы сделать офф. пакетный менеджер, а люди лишь репозитории для него плодили.
С VIM вообще отдельная история. Много раз пытался его в стиле IDE использовать но понял для себя, что кроме как его не настраивай — его стезя это правка конфигов а не разработка софта
а люди лишь репозитории для него плодили.
репозиторий уже наплодили
называется GitHub
поэтому берешь vim-plug и подключаешь все что нужно через «peponame/pluginname»
И подводных камней никаких?
Вроде как VSCode используют все.
ну, вроде все плагины подключились, периодически обновляешь
некоторые требуют дополнительных телодвижений, типо пересборки какой-то бинарной части (youcompleteme) — но тоже через функцию обновляет
http://vimawesome.com/ — тут в плагинах для каждого менеджера есть описание как подключать плагин
и тред можешь отмечать решенным.
Pathogen достаточно как по мне. Еще не хватало превращать вим в арчик. Так скинул каталог в bundle и забыл. Если уж приспичит что-то обновлять, руками скачать и скопировать не проблема. Развели тут пакетные менеджеры на каждый прыщ панимаш.
Я бы тоже за vscode с плагином проголосовал.
Вроде видел как-то, что emacs нахваливали.
Sublime + плагины для Go. Работает нормально и, самое главное, побыстрее уродцев на JS как Atom, VsCode и brackets
IDEA или Gogland, если надо основательно, степенно, медленно, ынтерпрайзно.
MS Visual Code если надо быстро, модно, молодёжно.
Остановился на Atom с кучкой плагинов. Пробовал IDEA, VS Code — тож норм
Какие там камни? Работает, есть не поросит. Использую ещё vim-plug и completor.
Если бы ТС пользовался емаксом, вряд ли бы он стал создавать этот тред.
VS Code + плагин к ней(github, с полным описанием)
Описание как завести дебаггер для Go: delve/Documentation/installation для Linux, macOS, Windows, в VS Code работает почти без глюков.
Gogland от JetBrains (пока EAP и все еще крайне сыроватый): https://www.jetbrains.com/go/download/
Я использую Gogland. Раньше использовал VS Code (до появления гогленда). Очень примитивное, постоянно подсветка ошибок отваливается, рандомные ошибки, что попало происходит. Дебагер геморойно настраивается, нет рефакторингов. Если говорить вообще о чем-то серьезном — например юнит-тесты, то тут вообще феил, вскоуд не умеет их дебажить. Для серьезной работы каждый день не годиться, ибо постоянно глюки, глюки, баги, ошибки.
А как там дела с Delve? Без отладчика жизни нет..
Если кодишь под виндой, GDB и всё основанное на нём — срывает крышу к чертям (неважно из какого редактора запускать)
Из рабочего остается Delve, но ему крышу раньше срывало просто так везде. Говорят починили, но гошники чего только не говорят
То есть отключил автодополнение у vim-go через gocode и использовал gocode в completor?
afaik сам vim-go автодополнением не заправляет, а только через внешние плагины.
Так я IDE спрашивал, а не ОС
cast EXL ,
nikolnik
А как в гогланде при такой структуре проекта из IDE дебагер запускать?
При такой организации файла, просто запустить go run main.go недостаточно, нужно сперва сделать go build, а потом запустить ./proj
Почему недостаточно? Со структурой проекта все нормально и его можно запускать через go run main.go. Любой проект на го запускается через go run main.go
Вообще если нужны какие-то телодвижения для запуска, например у тебя для сборки приложения используется еще какая-то фигня, смотри в это окошко: http://imgur.com/a/ToPdC
Потому что при ‘go run main.go’ он не видит ‘myconstants.go’ и как следствие:
За-то если сделать build без указания файла, а просто в директории все отрабатывает ок:
Это потому, что go run ожидает список файлов на запуск. Делай go run main.go myconstants.go и все. А вообще, идиоматически пакет main — это entypoint, там должна содержаться только логика для композиции приложения. Всякие константы к этому не относятся и их по-хорошему надо выносить в отдельные пакеты.
UPD Еще можно go run *.go
А вообще, идиоматически пакет main — это entypoint, там должна содержаться только логика для композиции приложения. Всякие константы к этому не относятся и их по-хорошему надо выносить в отдельные пакеты.
Выносить в отдельные пакеты конечно правильнее. Только в случае с Go — это же каждый только то написанный, или подкорректированный пакет придется через go install прогонять? Как-то крайне не удобно оно.
Через go install надо подключать только пакеты, которые надо скачать со стороннего репозитория.
Ставь VSCode от Microsoft это сейчас лучшая среда для Go под Linux. Я не шучу, я уже штук 5 перебрал. В eclipse плохой плагин.
Так там есть встроенная IDE.
Ставь VSCode от Microsoft это сейчас лучшая среда для Go под Linux.
Поставил, потыкал, закрыл. Ерунда какая-то. Уже неделю использую gogland от Idea — зачетная тема.
Источник
Top 7 The Best IDEs For Developing In Golang
Here’s a list of some of the best IDEs that you can choose while developing Go language.
An inevitable question definitely comes into the mind of a Golang developer is;
Which is the best Golang IDE? Or Which IDE to use?
S o, this question has not any objective answer as it totally depends on the requirements of the users. But, yes, we can take a look at the top Golang IDEs available for making a choice in future projects.
Take a look at the data from Stackoverflow’s Developer survey, where they have listed out the most popular development environments around the world.
In the Golang development, some IDEs from this survey are well suited for Golang. Along with the Go language, Many IDEs are gaining popularity. It is slowly climbing the rankings with its efficient features of the most popular programming languages.
As Golang is climbing high in the most popular programming languages, more and more number of businesses are switching to the Golang development company for their software development requirements.
What is an IDE?
A software suite that includes all the tasks of programming in one app is known as an Integrated Development Environment or IDE.
It plays the role of a single interface which includes;
- Debugger
- Code editor,
- Automation tools
- Compiler, etc.
Thus it fulfills all the requirements of programmers for writing and testing software.
Why Use an IDE?
- Integrated Code Organization and Navigation
- Integrated Testing
- Integrated Debugging
Benefits of an IDE:-
- Standardization
- Easy collaboration
- Improves Productivity
- Effective project management
- Encourages continual Learning
All set to know the best IDEs for Golang development? Here we go!
1. GoLand
Jetbrains, a Software development company, released this IDE for Golang. It is a sophisticated yet commercial IDE for Golang development. GoLand comes with impressive coding assistance and tool integration. This IDE is helpful in analyzing;
- Smart code completion
- Code generation
- Tabbed interface
- Quick navigation
- Highlighting function exit points
- Source code
- Showing the type of any expression
- Refactoring,
- Inspections and quick fixes
As it is a commercial IDE, it offers Golang developers a robust, ergonomic environment. Goland has a wide ecosystem as it is created by an established company. This ecosystem provides additional tools as you need more.
2. Visual Studio Code
It is an extensible open-source IDE created primarily by Microsoft. It offers support for an extensive range of programming languages and is focused initially on web development. This IDE is based on Electron, which is, in turn, based on Chromium. It supports Golang development by integrating all the Go tools and the Delve debugger through Delve debugger. You can just install some Go tools and packages to get started.
Moreover, there is a supportive and strong community for this IDE consisting of Golang developers with regular contributions.
The Code of Visual Studio is very quick & responsive. Here is its substantial feature list:
- Workspace symbol search
- Completion Lists
- Snippets
- Signature Help
- Find References
- Build-on-save & List-on-save
- Generate unit tests skeleton
- Run Tests under the cursor, in the current file, in the current package, in the whole workspace
- Code navigation
- Symbol search
- Call stacks
- Code navigation
- An interactive console
- Bracket matching
- Semantic/Syntactic error reporting as you type
- Add/Remove Tags on struct fields
3. LiteIDE
It is very unusual as It is among the first open-source & Golang-centric IDEs. LiteIDE is a Qt & C++ application that has a custom feel and look.
This IDE offers configurable build commands, gdb and Delve debugger, code management, advanced code editor, and auto-completion. The features of LiteIDE have the target of providing comfort for the Golang coders.
Take a look at the breakdown of the features of LiteIDE.
- Plugin support
- System environment management
- Kate format for auto-completion and theming
- MIME type-based system
- Simple and open debug system
- Quick Open
- Configurable build commands
- Configurable auto-completion with WordApi
- Code Navigation
- Class view and outline
- Code Refactor
- Package browser
- Go code support
- Document browser
- Find Usages
- GOPATH API index
- Go playground
4. Vim
It is an open-source IDE. VIm is highly configured and customized with various plugins. For creating a hassle-free environment for Go developers, It installs all the required binaries automatically.
Its features include;
- Quick file executions
- Multiple 3rd liner support
- Source code analysis
- Goto definition
- Adding and removing import paths and many more.
5. IntelliJ IDEA
Jetbrains, a Software development company, released IntelliJ IDEA. IntelliJ IDEA is an open-source IDE. With the help of the Go language support plugin, this IDE can be utilized with Go.
Feature of this IDE includes;
- Advanced refactoring
- Shortcuts
- Smart code completion
- Detects duplicates
- Supports other tools and frameworks.
6. Sublime Text
It is a great & sophisticated IDE for Go having a huge community of programmers. It favors improved performance and speed. The collection of plugins of Go language for Sublime Text 3 is GoSublime.
Feature of this IDE includes;
- Syntax check while wiring codes
- Removal of package imports
- Automatic code completion
- Code completion from Go code, and more.
7. Eclipse
It is one of the most extensively used IDEs. Because of its powerful extensions and flexibility, it has high popularity among Golang coders. The open-source extension of Eclipse IDE is GoClipse.
Feature of this IDE includes;
- Source code editor
- A builder to report errors
- GDB debugger support
- A project wizard and more.
Golang has come a long way from the inception, and it has a strong ecosystem consisting of various options for the development environment. Here we have discussed the top 7 IDEs for Golang development, but there are more! Yet these are frequently talked about. Which one is your pick? Do remember that the right IDE selection would make working with Golang even more fun.
Источник