Giter VIP home page Giter VIP logo

language-arma-atom's Introduction

Arma language support in Atom

This packages adds syntax highlighting and auto-completions for SQF files in Atom, including functions and macros from the CBA and ACE3 projects. This package is maintained and developed by the ACE3 development team and the Arma community effort.

Support for the following file types used by the Real Virtuality engine has been added:

  • sqf
  • sqe
  • sqm
  • cpp
  • hpp
  • ext
  • cfg

Features

Syntax Highlighting

Syntax highlighting for all functions and script commands by Bohemia Interactive is supported. Next to that, functions and macros from CBA and ACE3 projects are also supported.

Syntax Highlighting

Autocomplete

With a goal of faster development in SQF, auto-completion for all BIS functions and script commands, as well as CBA and ACE3 functions and macros, is supported. All autocomplete assets also have a type, description and URL to their documentation.

Autocomplete

CBA and ACE3 commands are optional, but enabled by default.

Snippets

Quick development also requires writing a lot of different blocks or combinations of code. A handful of useful snippets ranging from BIS conditional structures and loops through CBA macros and ACE3 function headers were added to help you with this.

Snippets

CBA and ACE3 snippets are optional, but enabled by default.

Open Latest RPT File

Allows you to quickly open the latest Arma RPT log file with quick and easy access. Simply open the Command Palette and search for it or navigate to Packages -> Language Arma Atom -> Open Latest RPT File.

Open Latest RPT

Build Project Tools

Only available if the project being worked on is based on a project framework like CBA's and ACE3's. The project must contain build.py and make.py tools.

To ease development when working on projects with a framework like CBA's or ACE3's, quick options for building the project directly from Atom is supported. You have the ability to build a development version or a full release, simply open the Command Palette and search for it or navigate to Packages -> Language Arma Atom -> Build Dev/Release.

Build Dev

Contributing

Contributions are greatly appreciated. You can help out with the ongoing development by looking for potential bugs in our code base, or by contributing new features. To contribute something to the Arma Language Package, simply fork this repository and submit your pull requests for review by other collaborators (see Contributing Guide).

Please, use our Issue Tracker to report a bug, propose a feature, or suggest changes to the existing ones.

language-arma-atom's People

Contributors

aaco avatar bux avatar cuel avatar dedmen avatar fusselwurm avatar jokoho48 avatar jonpas avatar kymckay avatar publicjorn avatar shadowranger avatar simon84 avatar thojkooi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

language-arma-atom's Issues

Highlighting editing.

Where should i add them to get some worlds highlighted as commands for example ?
(guies question general (not only to the package), but would really appreciate help)

Update the maintenance scripts

I said I'd look into the scripts that retrieve SQF commands. My initial plan was to scrape the intercept pointers deceleration file the same way I did for the sqf repository (this is still an option as far as that is concerned). However I've realised that this package also reads the description and other information of each command so I'm in the process of checking why the scripts aren't working.

The first thing I notice is that armadoc.py only processes (alphabetically) up to curatorEditingArea.

Here is the information initially queried by the armadoc.py script. It seems that the code to continue requesting more information (I assume that's what this is meant to do) isn't working:

while 'query-continue' in content:
data = data + content['query']['categorymembers']
params['cmcontinue'] = content['query-continue']['categorymembers']['cmcontinue']
f = urllib.request.urlopen("https://community.bistudio.com/wikidata/api.php?%s" % urllib.parse.urlencode(params))
content = json.loads(f.read().decode('utf-8'));

TextEditor.scrollToBottom is deprecated.

This is now a view method. Call TextEditorElement::scrollToTop instead.

TextEditor.scrollToBottom (<embedded>:5509:18)
<unknown> (C:\Users\bmxch\.atom\packages\language-arma-atom\lib\open-latest-rpt-file.coffee:32:17)

Cannot find module 'copy-newer' Issue

  1. Open Any File

Atom Version: 1.8.0
System: JOKOHO482
Thrown From: language-arma-atom package, v2.6.0

Stack Trace

Failed to activate the language-arma-atom package

At Cannot find module 'copy-newer'

Error: Cannot find module 'copy-newer'
    at Module._resolveFilename (module.js:338:15)
    at Function.Module._resolveFilename (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\module-cache.js:383:52)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\native-compile-cache.js:50:27)
    at Object.<anonymous> (file:///C:/Users/jokoho482/.atom/packages/language-arma-atom/index.coffee:2:13)
    at Object.<anonymous> (file:///C:/Users/jokoho482/.atom/packages/language-arma-atom/index.coffee:1:1)
    at Module._compile (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .coffee] (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\native-compile-cache.js:50:27)
    at Package.module.exports.Package.requireMainModule (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package.js:715:27)
    at Package.module.exports.Package.activateNow (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package.js:173:16)
    at C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package.js:841:28
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at PackageManager.module.exports.PackageManager.triggerActivationHook (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\package-manager.js:573:43)
    at TokenizedBuffer.module.exports.TokenizedBuffer.setGrammar (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\tokenized-buffer.js:200:27)
    at TokenizedBuffer.module.exports.TokenizedBuffer.reloadGrammar (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\tokenized-buffer.js:211:21)
    at new TokenizedBuffer (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\tokenized-buffer.js:86:14)
    at new DisplayBuffer (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\display-buffer.js:91:32)
    at new TextEditor (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\text-editor.js:149:30)
    at Workspace.module.exports.Workspace.buildTextEditor (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\workspace.js:623:14)
    at Workspace.buildTextEditor (C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\workspace.js:60:52)
    at C:\Users\jokoho482\AppData\Local\atom\app-1.8.0\resources\app.asar\src\workspace.js:594:26
    at process._tickCallback (node.js:392:9)

Commands

     -1:36 tree-view:remove (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -1:33.7.0 tree-view:add-file (span.name.icon.icon-file-directory)
     -1:31.5.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -1:28 tree-view:add-folder (div.header.list-item)
  3x -1:26.6.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -1:23.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:14.1.0 tree-view:add-file (span.name.icon.icon-file-directory)
     -1:09.2.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -1:07.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:58.9.0 core:select-all (atom-text-editor.editor.is-focused)
     -0:58.7.0 core:copy (atom-text-editor.editor.is-focused)
     -0:57.9.0 core:paste (atom-text-editor.editor.is-focused)
     -0:56.5.0 core:save (atom-text-editor.editor.is-focused)
     -0:53.6.0 tree-view:move (span.name.icon.icon-file-text)
     -0:52.8.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.mini.is-focused)
     -0:50.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "autoHideMenuBar": true,
    "disabledPackages": [
      "wrap-guide"
    ],
    "openEmptyEditorOnStart": false,
    "themes": [
      "atom-material-ui",
      "atom-material-syntax-dark"
    ]
  },
  "language-arma-atom": {
    "autocomplete": {}
  }
}

Installed Packages

# User
atom-material-syntax-dark, v0.2.5
atom-material-ui, v1.2.13
highlight-selected, v0.11.2
keyboard-localization, v1.4.18
language-arma-atom, v2.6.0
minimap, v4.24.7
minimap-bookmarks, v0.3.1
minimap-codeglance, v0.4.5
minimap-find-and-replace, v4.5.1
minimap-git-diff, v4.3.1
minimap-highlight-selected, v4.4.0
minimap-pigments, v0.2.1
minimap-selection, v4.4.0
project-plus, v0.9.0

# Dev
No dev packages

Code Snipped If_exitWith Issue

If_exitWith missing chamber
Current Result:

if (CONDITION) exitwith {
    //code
;

Target Result:

if (CONDITION) exitwith {
    //code
};

Wrong definition for (Q)PATHTOEF

QPATHTOEF is defined as
#define QPATHTOEF(var1,var2) QUOTE(PATHTOEF(var1,var2))
but in atom it shows as the same as QPATHTOF which only has 1 arg.

TextEditor.scrollToBottom is deprecated

This is now a view method. Call TextEditorElement::scrollToTop instead.

TextEditor.scrollToBottom (<embedded>:5427:18)
<unknown> (C:\Users\campb\.atom\packages\language-arma-atom\lib\open-latest-rpt-file.coffee:32:17)

Failed to load the Language-Arma Atom Package Settings

Receiving this error after recent update

Steps to reproduce

  1. Start Atom With Language-Arma-Atom installed
  2. Error should pop up

Atom Version: 1.9.8
System: Microsoft Windows 10 Pro
Thrown From: language-arma-atom package, v2.6.1

Stack Trace

Failed to load the language-arma-atom package settings

At C:\Users\dixon\.atom\packages\language-arma-atom\settings\language-sqf-native-commands.json: Unexpected end of input in C:\Users\dixon\.atom\packages\language-arma-atom\settings\language-sqf-native-commands.json

SyntaxError: C:\Users\dixon\.atom\packages\language-arma-atom\settings\language-sqf-native-commands.json: Unexpected end of input
    at Object.parse (native)
    at parseObject (C:\Users\dixon\AppData\Local\atom\app-1.9.8\resources\app.asar\node_modules\season\lib\cson.js:54:19)
    at parseContents (C:\Users\dixon\AppData\Local\atom\app-1.9.8\resources\app.asar\node_modules\season\lib\cson.js:102:16)
    at C:\Users\dixon\AppData\Local\atom\app-1.9.8\resources\app.asar\node_modules\season\lib\cson.js:204:20
    at tryToString (fs.js:414:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:401:12)
  at C:\Users\dixon\.atom\packages\language-arma-atom\settings\language-sqf-native-commands.json:1:1

Commands

Config

{
  "core": {
    "disabledPackages": [
      "atom-django"
    ]
  }
}

Installed Packages

# User
django-atom, v0.2.4 (inactive)
django-templates, v0.5.0 (inactive)
language-arma-atom, v2.6.1 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.51.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.43.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.3.2 (active)
one-light-ui, v1.3.2 (inactive)
one-dark-syntax, v1.2.0 (active)
one-light-syntax, v1.2.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.2 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.0 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.0 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.39.0 (active)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
find-and-replace, v0.198.0 (inactive)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.64.1 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.238.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.4.1 (active)
styleguide, v0.46.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.98.1 (active)
timecop, v0.33.1 (active)
tree-view, v0.208.0 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.32.2 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.0 (active)
language-csharp, v0.12.1 (active)
language-css, v0.36.2 (active)
language-gfm, v0.86.0 (active)
language-git, v0.13.0 (active)
language-go, v0.42.0 (active)
language-html, v0.44.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.22.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.0 (active)
language-less, v0.29.3 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.0 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.68.5 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.52.0 (active)
language-shellscript, v0.22.3 (active)
language-source, v0.9.0 (active)
language-sql, v0.21.1 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.8 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

`

Classnames starting with numbers aren't highlighted

Take this bit of code :

class 30Rnd_556x45_Stanag {
    ...
};

The classname won't be colored, because it's starting with a number! I don't know if something can be done for this issue, but I'd love to see all my classes in the same color. It can be weird with files containing a large number of magazine classes.

Much code in one String doesn't show properly

Hey,
If I use this on an Arma script that has for example a big string like:

_bigstring = "
much here, like 100 lines or more
";
call compile _bigstring;

then you would see everything just in "green" as it is all part of "that" string :-/

Promise.done is deprecated.

Atom now uses ES6 Promises instead of Q. Call promise.then instead of promise.done

Promise.done (C:\Users\wmcri\AppData\Local\atom\app-1.16.0\resources\app.asar\src\atom-environment.js:1218:5)
Object.open (C:\Users\wmcri\.atom\packages\language-arma-atom\lib\open-latest-rpt-file.coffee:30:60)
atom-workspace.subscriptions.add.atom.commands.add.language-arma-atom:open-latest-RPT-file (C:\Users\wmcri\.atom\packages\language-arma-atom\index.coffee:79:38)
CommandRegistry.handleCommandEvent (C:\Users\wmcri\AppData\Local\atom\app-1.16.0\resources\app.asar\src\command-registry.js:259:29)
handleCommandEvent (C:\Users\wmcri\AppData\Local\atom\app-1.16.0\resources\app.asar\src\command-registry.js:3:59)
CommandRegistry.dispatch (C:\Users\wmcri\AppData\Local\atom\app-1.16.0\resources\app.asar\src\command-registry.js:160:19)

Request: Make ACE and CBA optional

Hi, I thought it'd be user-friendly to be able to "uncheck" ACE and CBA support from the package settings.
This way, for the average mission scripter (non-ace non-plugins) there would be less matches for the autocomplete and snippets functions in SQF scope.

I made a fork and tried to figure this out myself, but I bumped into 2 obstacles:

  1. it seems "snippets" and "settings" (subfolders) are autmatically loaded
  2. I can't find any documentation on the "settings" folder being auto-loaded (assuming this is Provider-API functionality).

I have this outstanding question on stackoverflow, to see if it's at all possible to exclude snippet files from the snippet folder. Or maybe some of you already know how this can be done..

Add SQF Specs

  • Figure out why the grammar is not being loaded for the specs #56
  • Write the specs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.