Ide для lua windows

IDE для Lua

Рекомендуемые сообщения

Присоединяйтесь к обсуждению

Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.

О нас

Проект ComputerCraft.ru основан в 2014 году. Особенностью наших игровых серверов является обязательное наличие компьютерных и технических модов и аддонов. Когда мод ComputerCraft устарел и больше не отвечал техническим требованиям, ему на замену пришел современный и высокотехнологичный мод OpenComputers. Черепашек заменили роботы из мода Opencomputers.

ComputerCraft.ru — это площадка для игры в Minecraft и общения на форуме, стабильные серверы и возможность в легкой и игровой форме обучиться программированию на языке Lua и реализовать все свои самые смелые инженерные идеи и решения и поделиться ими с другими игроками. За все время существования проекта сменилось 10 игровых серверов, которые посетили более 9000 игроков. На сайте собрано множество интересных программ и библиотек, статей, гайдов, веселых историй и горячих обсуждений, выдвинуто множество идей автоматизации и способов программирования.

У нас играют и пишут программы как новички так и опытные программисты. А самые продвинутые участники нашего коллектива даже разрабатывают собственные авторские моды и аддоны, ресурспаки, репозитории, мощнейшие библиотеки и операционные системы.

Регистрируйтесь прямо сейчас и присоединяйтесь к нашему дружному коллективу фанатов игры Minecraft , компьютерных и инженерных модов!

Луа — Окружающая среда

Если вы все еще хотите настроить свою среду для языка программирования Lua, вам потребуются следующие программы, доступные на вашем компьютере: (а) текстовый редактор, (б) интерпретатор Lua и (в) компилятор Lua.

Текстовый редактор

Вам нужен текстовый редактор, чтобы напечатать вашу программу. Примеры нескольких редакторов: Блокнот Windows, команда «Редактирование ОС», Brief, Epsilon, EMACS и vim или vi.

Имя и версия текстового редактора могут различаться в разных операционных системах. Например, Блокнот будет использоваться в Windows, а vim или vi могут использоваться в Windows, а также в Linux или UNIX.

Файлы, которые вы создаете с помощью вашего редактора, называются исходными файлами, и эти файлы содержат исходный код программы. Исходные файлы для программ Lua обычно называются с расширением «.lua» .

Переводчик Lua

Это небольшая программа, которая позволяет вам набирать команды Lua и выполнять их немедленно. Он останавливает выполнение файла Lua в случае возникновения ошибки в отличие от компилятора, который выполняется полностью.

Компилятор Lua

Когда мы расширяем Lua на другие языки / приложения, нам нужен комплект разработки программного обеспечения с компилятором, совместимым с прикладным программным интерфейсом Lua.

Установка на Windows

Для среды Windows разработана отдельная среда разработки под названием «SciTE», которую можно скачать из https://code.google.com/p/luaforwindows/ раздела загрузки.

Запустите загруженный исполняемый файл, чтобы установить Lua IDE.

Поскольку это IDE, вы можете создавать и создавать код Lua, используя одно и то же.

В случае, если вы заинтересованы в установке Lua в режиме командной строки, вам необходимо установить MinGW или Cygwin, а затем скомпилировать и установить Lua в Windows.

Установка в Linux

Чтобы загрузить и собрать Lua, используйте следующую команду —

Чтобы установить на другие платформы, такие как aix, ansi, bsd, generic linux, mingw, posix, solaris, заменив Linux на make Linux, протестируйте его с соответствующим именем платформы.

У нас есть helloWorld.lua, в Lua следующим образом:

Теперь мы можем создать и запустить файл Lua, скажем helloWorld.lua, переключившись на папку, содержащую файл, с помощью cd, а затем с помощью следующей команды:

Мы можем увидеть следующий вывод.

Установка в Mac OS X

Чтобы собрать / протестировать Lua в Mac OS X, используйте следующую команду —

В некоторых случаях вы, возможно, не установили Xcode и инструменты командной строки. В таких случаях вы не сможете использовать команду make. Установите Xcode из магазина приложений Mac. Затем перейдите в «Настройки XCode», а затем переключитесь на «Загрузки» и установите компонент с именем «Инструменты командной строки». Как только процесс будет завершен, вам будет доступна команда make.

Вам не обязательно выполнять инструкцию «make macosx test». Даже без выполнения этой команды вы все равно можете использовать Lua в Mac OS X.

У нас есть helloWorld.lua, в Lua, следующим образом —

Теперь мы можем создать и запустить файл Lua, скажем helloWorld.lua, переключившись на папку, содержащую файл, с помощью cd, а затем с помощью следующей команды:

Мы можем увидеть следующий вывод —

Lua IDE

Как упоминалось ранее, для Windows SciTE, IDE Lua является IDE по умолчанию, предоставляемой командой создателей Lua. Доступна альтернативная IDE от ZeroBrane Studio, которая доступна на нескольких платформах, таких как Windows, Mac и Linux.

Есть также плагины для затмения, которые позволяют разработку Lua. Использование IDE облегчает разработку благодаря таким функциям, как завершение кода, и настоятельно рекомендуется. Среда IDE также обеспечивает программирование в интерактивном режиме, аналогичное версии Lua для командной строки.

Ide для lua windows

ZeroBrane Studio is a lightweight cross-platform Lua IDE with code completion, syntax highlighting, remote debugger, code analyzer, live coding, and debugging support for various Lua engines (Lua 5.1, Lua 5.2, Lua 5.3, Lua 5.4, LuaJIT, LÖVE, Moai, Gideros, Corona, Marmalade Quick, Cocos2d-x, OpenResty/Nginx, Torch7, Redis, GSL-shell, Adobe Lightroom, Lapis, Moonscript, and others).

Читайте также:  Версии линукс с сертификатом фстэк

  • Small, portable, and cross-platform (Windows, macOS, and Linux).
  • Written in Lua and is extensible with Lua packages.
  • Syntax highlighting and folding for 125+ languages and file formats.
  • Project view with auto-refresh and ability to hide files and directories from the list.
  • Bundled with several of the most popular Lua modules (luasocket, luafilesystem, lpeg, and luasec) compiled for all supported Lua versions.
  • Auto-complete for functions, keywords, and custom APIs with scope-aware completion for variables.
  • Scope-aware variable indicators for Lua code.
  • Integrated debugger with local and remote debugging for Lua 5.1, Lua 5.2, Lua 5.3, Lua 5.4, LuaJIT, and other Lua engines.
  • Interactive console to directly test code snippets with local and remote execution.
  • Live coding with Lua, LÖVE, Gideros, Moai, Corona SDK, GSL-shell, and other engines.
  • Static analysis to catch errors and typos during development.
  • Function outline.
  • Go to definition navigation.
  • Multi-cursor editing with scope-aware variable selection and renaming.
  • Fuzzy search with Go To File , project-wide Go To Symbol navigation, and Insert Library Function .
  • Find and replace in multiple files with preview and undo.
  • Several ways to extend the current functionality:
    • packages ( packages/ ): plugins that provide additional functionality;
    • translations ( cfg/i18n/ ): translations of the menus and messages to other languages;
    • user configuration ( cfg/ ): settings for various components, styles, color themes, and other preferences.
  • A short and simple overview for those who are new to this development environment.
  • A list of frequently asked questions about the IDE.
  • Tutorials and demos that cover debugging and live coding for different environments.
  • Tips and tricks.

The IDE can be installed into and run from any directory. There are three options to install it:

  • Download installation package for the latest release for individual platforms (Windows, OSX, or Linux);
  • Download snapshot of the repository for each of the releases, which works for all platforms;
  • Clone the repository to access the current development version; this option also works for all platforms.

No compilation is needed for any of the installation options, although the scripts to compile required libraries for all supported platforms are available in the build/ directory.

See the installation section in the documentation for further details and uninstallation instructions.

The IDE can be launched by using the zbstudio command with slight variations depending on whether a packaged installation or a repository copy is used:

  • Windows: Run zbstudio from the directory that the IDE is installed to or create a shortcut pointing to zbstudio.exe .
  • Linux: Run zbstudio when installed from the package installation or run ./zbstudio.sh when using a snapshot/clone of the repository.
  • macOS: Launch the ZeroBrane Studio application if installed or run ./zbstudio.sh when using a snapshot/clone of the repository.

The general command for launching is the following: zbstudio [option] [

  • Open files: zbstudio [ . ] .
  • Set project directory (and optionally open files): zbstudio

[ . ] .

  • Overwrite default configuration: zbstudio -cfg «string with configuration settings» , for example: zbstudio -cfg «editor.fontsize=12; editor.usetabs=true» .
  • Load custom configuration file: zbstudio -cfg , for example: zbstudio -cfg cfg/xcode-keys.lua .
  • All configuration changes applied from the command line are only effective for the current session.

    If you are loading a file, you can also set the cursor on a specific line or at a specific position by using filename:
    and filename:p

    In all cases only one instance of the IDE will be allowed to launch by default: if one instance is already running, the other one won’t launch, but the directory and file parameters passed to the second instance will trigger opening of that directory and file(s) in the already started instance.

    What is the Best IDE or Editor for Developing in Lua?

    When it comes to programming in a certain language, one of the most important decisions — besides simply starting — is the editor or the Integrated Development Environment (IDE) to use.

    The choice isn’t a one-time thing where you choose and are locked in, but choosing wisely can really lead to reduced headaches not only now but down the road. The one that you choose could end up being great for the language but not for other languages, or it could be great for a lot of languages, and so you’ll have to make the choice for each one you learn and program with.

    If you’re looking to hit the ground running with Lua specifically, though, and you want to save time finding out what a good IDE or editor would be, then hopefully this article will save you some time.

    Here, I’ll summarize some options as well as provide further details and even some aggregated internet opinions from actual Lua users. Without further ado, let’s get started.

    IntelliJ IDEA

    IntelliJ IDEA is consistently rated one of the best products in IDE-land; first of all, I suggest you check if the Community Version has what you need if you want a nice-featured (yet occasionally heavyweight) IDE option.

    I use IntelliJ IDEA (with Lua plugin) for large projects, when I need maximum productivity and long-term code quality.

    Without a doubt, IntelliJ or Webstorm with EmmyLua plugin. Been using this for Lua development for four years and still regularly try others (Sublime, VS Code etc) but keep coming back to this.

    I used to be a sublime guy. Easy build system config, a lot of nice editing features, some of it unique to sublime. Good stuff. But I could never get autocompletion and linters work with it flawlessly.

    Nowadays I use Rider (IntelliJ IDE) which is usually for C# that I need for work with Unity anyway. Together with the EmmyLua plugin which adds the option to document your entire Lua code with types and all the good stuff which will show up for auto completion and can even enforce type safety.

    A God given thing for larger projects. I am truly in love with it.

    For Lua, many users suggest that you don’t need much more than a text editor of choice. For some core group of users, Vim fits that bill.

    But for smaller free-time projects, I use any text editor (mainly nano , but also vim ) + luacheck + makefiles to automate testing, packaging, deployment + tmux to have multiple panes (and one session per project, so I can start working where I left off). These tools can be easily integrated with each other, for example you can configure nano to call luacheck and display the results.

    Oh, and by the way, I usually run all this on Windows using WSL.

    There are multiple plugins for lsp on vim/neovim already, vim-lsp and LanguageClient-Neovim. There’s also a PR for neovim with semi functional lsp, from what I can tell (haven’t used that one).

    If you go with vim, I recommend vim-lsp, it’s the cleanest written and I like how it loads functions (easy to delay loading).

    This is probably the wrong answer, unless you’re really open to a long-term, high powered solution, but someone’s gotta mention Vim. It turns the act of editing text itself into its own language you can become fluent in. Plus it has plenty of plugins available to suit whatever purposes you might have.

    But like I said, it’s a long-term, high powered solution. You kinda have to become familiar with Vim for its own sake before you can effectively customize its functionality with its myriad settings & plugins.

    For an example of how crazy it can get, here’s my “vimrc” file, the place I put all my customized settings (and list my plugins, thanks to a plugin that lets me list them that way in order to automatically download & install them from the internet). It’s easier to navigate in vim itself, those box-character headers have “fold markers” in them for collapsing sections of text.

    Emacs

    Of course, you can’t mention Vim without mentioning Emacs.

    Since there is an LSP for Lua, you should be able to use most any editor that supports that (mostly…) Atom, VS Code, Emacs, (Neo)VIM, etc. They’ll all be limited by what the specific server for Lua supports. VIM is my preferred editor, but takes a fair amount to get set up and maintain. I tend to not mind a couple hours every so often to maintain my editor config now that I have it working well for my needs.

    I use Emacs with lua-mode and lsp-mode for navigation and other smarts. For the lsp backend I use Emmy with the LÖVE API support.

    Visual Studio Code aka VSCode

    VSCode is one of the most versatile and free IDEs on the market, and its extension game is getting better by the day. For Lua, it is more than functional given the right extensions.

    vscode for me. There are fantastic Lua extensions for it.

    The [extensions] I am using are: vscode-lua: intellisense and linting for Lua; Code Outline: very good extension for outlining; Bookmars: well…bookmarks 🙂

    Visual Studio Code, with the emmylua extension. I’m actually not using emmylua for the suggestions but because it’s the only lua debugger I’ve found that works properly. Although the suggestions are a nice additions.

    sumneko.lua — for language server
    tomblind.local-lua-debugger-vscode — best debugger ever
    trixnz.vscode-lua — for linting with luacheck

    ZeroBrane Studio

    By Paul Kulchenko, ZeroBrane is billed as a “Lua IDE, written in Lua” and “simple and lightweight”. It’s free to download, but they suggest a donation.

    According to ZeroBrane Studio’s site, the features include the following:

    • Lua IDE, written in Lua; simple and lightweight
    • Syntax highlighting and code folding
    • Auto-completion for functions and keywords
    • Interactive console to directly test code snippets with local and remote execution
    • Integrated debugger (with support for local and remote debugging)
    • Integrated static analyzer
    • Unique live coding feature (demo)
    • Love2d auto-completion, debugging, and live coding
    • Moai integration, debugging, and live coding
    • Gideros Mobiledebugging and live coding
    • OpenResty/Nginx Lua script debugging
    • Adobe Lightroom Lua plugin debugging
    • On-device debugging for Corona SDK and Gideros Mobile
    • Integrated markdown formatting for providing lessons and instructions
    • No install required; runs from any folder
    • Open-source (MIT license)
    • Windows, Mac, and Linux

    ZeroBrane is one I tend to use for learning and all sorts. Although I use NP++ or sublime because I work with Garrysmod.

    Although you do have to save the files before running them.

    If anyone knows of an IDE that works like a text editor that doesn’t require you to save to activly test modifications, please let me know.

    I tend to favor the use of ZeroBrane Studio, Kate (with the File system browser, Kate Snippets, and Terminal tool view extensions), and GVim. There’s also LDT for Eclipse, but I’m not sure if I’d really recommend that that (especially to a new developer.) As others have said, you’ll do just fine in most cases with any editor with syntax highlighting. Especially just starting out, don’t get too carried away with thinking that you need an IDE.

    I’ve really only used ZeroBrane Studio, but it seems to hit all the important stuff:

    — Acceptable editor (project view, to jump definition)

    — Out of the box support (including debugging) for different Lua runtimes (51, 52, 53, LuaJit, LOVE, etc)

    While cool I’ve never actually used the live coding or Markdown comment support.

    Why? It did everything I needed it to with virtually no setup/messing around.

    So far I only know of one editor/IDE that was made specifically for lua, which is ZeroBrane. A list of its features can be found on the linked website. Other than that, there isn’t much out there, mostly multi-purpose editors that also do lua to a certain extent. As with most languages though, IDE features are just there to make life easier, and an editor like notepad is more than enough to write good lua code.

    You may want to try ZeroBrane Studio IDE, which includes a remote debugger and integrates with Love2d, Moai, and other Lua engines.

    Sublime Text

    Sublime Text is a snappy and lightweight text editor as option that’s quick to download and simple to use.

    If you’re looking for Sublime set up for LÖVE, then click here.

    Sublime Text with the LuaExtended package is awesome.

    I use sublime text 3 for pretty much everything involving code. I like the themes and package system I find it really convenient!

    Also using Sublime Text. I’ve got SublimeLinter and luacheck set up so my code doesn’t rot. I think I’ve got a regular Lua plugin (unless there’s a Love-specific one) for syntax highlighting and whatnot. And a bunch of other plugins because I use Sublime for my day job as well (C, Python, etc.).

    Warning: bias, opinion, and anecdotes beyond this point…

    On the spectrum from basic editor to full-blown IDE I prefer an editor but with a very basic syntax highlighting and syntax checking (luacheck for lua) just to catch those annoying little slip-ups like forgetting an “end” keyword and having to go back and track it down.

    All the other “fluff” that IDEs offer seem nice-to-have at first but usually come at the cost of a more bloated, slower-running editor. Or even worse– increasing your reliance on the editor as a crutch for doing basic tasks.

    I have worked with people that use big IDE’s and when something goes wrong and the editor can’t help them they are helpless. As an aside, those also tend to be the kind of people that will bug me to run a few git commands for them to bail them out of a sticky situation the editor’s git gui can’t handle.

    Notepad++

    Notepad++ is a nice Windows text editor that many people are already familiar with, and it’s a very basic solution for Lua programming; having said that, it’s not to be counted out depending on one’s specific project or purpose.

    Notepad++……….. Or the standard text editor on your Linux.

    notepad++ will be more than ok for what you need to do… If you are on linux, notepadqq, or geany, or atom (atom being the most complex on in this small list).

    Lua, like all good programming languages, doesn’t necessarily require anything other a text editor, like Notepad++, Emacs, Vim (what I use), etc.

    Atom is yet another simple text editor like Sublime Text, and it may fit your fancy.

    The below quote summarizes it working with Lua pretty succintly:

    Additional sources

    I found this Lua Users wiki to be a useful resource; be sure to check it out for even more options than listed here.

    Dev Genius

    Coding, Tutorials, News, UX, UI and much more related to development

    Читайте также:  Как снять тестовый режим windows 10
    Оцените статью