Skip to content

Commit

Permalink
Add Tooling Section (#42)
Browse files Browse the repository at this point in the history
* Add build systems page

* Add IDE table

* Add Code Editors and IDEs page

* Add syntax support page

* Add language server protocol support page

* Update Syntax support links

* Add "Other Tools" page in Tooling section

* Add missing links to Code Editors in Code Editors and IDEs page

* Update CMake links in Build Systems page

Fixes #27
  • Loading branch information
colinkiama authored Jun 12, 2024
1 parent 679e1cf commit 8831a47
Show file tree
Hide file tree
Showing 7 changed files with 199 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Vala Documentation
About <about>
Installation Guide <installation-guide>
Tutorials <tutorials/index>
Tooling <tooling/index>
Contributor Guide <contributor-guide/index>
Developer Guides <developer-guides/index>
FAQ <faq>
Expand Down
13 changes: 13 additions & 0 deletions source/tooling/build-systems.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Build Systems
=============

- `Meson <https://mesonbuild.com>`_ - a front end to the `Ninja build system <https://ninja-build.org>`_ with `Vala support <https://mesonbuild.com/Vala.html>`_ (The main build system for Vala)
- `Automake <http://www.gnu.org/software/automake/manual/automake.html#Vala-Support>`_ - supports Vala since 1.11
- `Autovala <http://www.rastersoft.com/programas/autovala.html>`_ - a program that automates the creation of CMake files for Vala projects.
- `CMake <http://cmake.org>`_:

- CMake `macros <http://github.com/jakobwesthoff/Vala_CMake>`_ exist to support Vala. (`Detailed article <http://westhoffswelt.de/blog/0043_build_vala_projects_with_cmake_macros.html>`_).
- An `alternative set of CMake modules <https://github.com/nemequ/gnome-cmake>`_ that support parallel builds.
- `Valder <http://activey.github.io/valder/>`_ - build system written in Vala and C
- `Waf <https://wiki.gnome.org/Projects/Vala/Waf>`_ based template project
- `xmake <https://xmake.io>`_ - build system written in Lua
150 changes: 150 additions & 0 deletions source/tooling/code-editors-and-ides.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
Code Editors and IDEs
=====================

Text editors with additional features for handling computer code can be called "code editors". The most fully featured ones are often called "integrated development environments". There are a number of editors that can handle Vala code. Many are listed below along with a list of features they implement.

.. note::

This is a list of known code editors with some form of Vala support. There may be other editors not listed here that support Vala.

.. list-table::
:header-rows: 1

* - Editor
- Syntax Highlighting
- Code Formatting
- Static Code Analysis
- Auto-completion
- Jump to Definition
- Integrated Documentation
- Integrated Build, Test and Debug
- Refactoring Tools
* - `Anjuta <https://wiki.gnome.org/Apps/Anjuta>`_
- Yes
-
- Yes
- Yes
-
-
-
-
* - `elementary OS Code <https://github.com/elementary/code>`_
- Yes
-
-
-
-
-
-
-
* - `Emacs <https://www.gnu.org/software/emacs/>`_
- Yes
-
-
-
-
-
-
-
* - `Geany <http://www.geany.org/>`_
- Yes
-
-
- Yes
- Yes
-
-
-
* - `gedit <https://gedit-technology.github.io/apps/gedit/>`_
- Yes
-
-
-
-
-
-
-
* - `GNOME Builder <https://apps.gnome.org/Builder/>`_
- Yes
- Yes
- Yes
- Yes
- Yes
- Yes
- Yes
-
* - `Helix <https://helix-editor.com/>`_
- Yes
- Yes
- Yes
- Yes
- Yes
-
-
-
* - `IntelliJ IDEA <https://www.jetbrains.com/idea/>`_
- Yes
-
-
-
-
-
-
-
* - `medit <https://mooedit.sourceforge.net/>`_
- Yes
-
-
-
-
-
-
-
* - `Sublime Text <https://www.sublimetext.com/>`_
- `Yes <https://packagecontrol.io/packages/Vala-TMBundle>`_
-
- `Yes <https://lsp.sublimetext.i`o/language_servers/#vala>`_
- `Yes <https://lsp.sublimetext.io/language_servers/#vala>`_
- `Yes <https://lsp.sublimetext.io/language_servers/#vala>`_
- `Yes <https://lsp.sublimetext.io/language_servers/#vala>`_
-
-
* - `TextMate <https://macromates.com/>`_
- `Yes <https://github.com/technosophos/Vala-TMBundle>`_
-
- `Basic <https://github.com/technosophos/Vala-TMBundle>`_
-
-
-
-
-
* - `Vim <https://wiki.gnome.org/Projects/Vala/Tools/Vim>`_
- `Yes <https://wiki.gnome.org/Projects/Vala/Tools/Vim#Syntax_Highlighting>`_
-
- `Yes <https://wiki.gnome.org/Projects/Vala/Tools/Vim#Static_Code_Analysis>`_
-
- `Yes <https://wiki.gnome.org/Projects/Vala/Tools/Vim#Jump_to_Definition>`_
-
-
-
* - `VS Code <https://wiki.gnome.org/Projects/Vala/Tools/VisualStudioCode>`_
- `Yes <https://wiki.gnome.org/Projects/Vala/Tools/VisualStudioCode#Syntax_Highlighting>`_
- `Yes <https://wiki.gnome.org/Projects/Vala/Tools/VisualStudioCode#Code_Formatting>`_
- `Yes <https://github.com/vala-lang/vala-language-server>`_
- `Yes <https://github.com/vala-lang/vala-language-server>`_
- `Yes <https://github.com/vala-lang/vala-language-server>`_
- `Yes <https://imgur.com/KQKhCNY>`_
- `Yes <https://wiki.gnome.org/Projects/Vala/Tools/VisualStudioCode#Debugging>`_ (`GDB <https://wiki.gnome.org/Projects/Vala/Tools/VisualStudioCode#Debugging>`_, `Meson <https://marketplace.visualstudio.com/items?itemName=mesonbuild.mesonbuild>`_)
-

Syntax highlighting and code formatting affect the visual display of the code in the editor. For example syntax highlighting will color keywords differently to identifiers to make it easier to read the code. Code formatting will change indentation and spacing to match a given coding style, such as inserting a space between a function name and the opening parenthesis of its arguments.

Static code analysis shows diagnostic messages in the editor about syntax errors. These are usually the same messages that appear when compiling from the command line because many editors use ``libvala`` to analyse the code.

Auto-completion and jump to definition require the editor to parse the code in the project and store the locations where identifiers are defined. Auto-completion is often triggered with the ``CTRL + SPACE`` key combination. If there is more than one possible completion a list of options will usually appear. Jump to definition is used to navigate the project and read an identifiers' related code, such as the code block of a function definition.

Integrated documentation provides documentation for symbols in the editor. The documentation is likely to be from the same sources used by `Valadoc.org <https://valadoc.org>`_.

Integrated build, test and debug is probably best understood in relation to the `Red-Green-Refactor cycle <http://blog.cleancoder.com/uncle-bob/2014/12/17/TheCyclesOfTDD.html>`_ of test driven development. The editor provides a user interface to make it easy to build the project or component, then run the test suite and see the test report. Tests that are failing can be run, step by step, through a debugger to identify why the code is not working as expected.

Refactoring tools provide support for techniques like extracting repeated code into a method or renaming an identifier to make its intent clearer.
8 changes: 8 additions & 0 deletions source/tooling/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Tooling
=======

.. toctree::
:glob:
:maxdepth: 1

*
9 changes: 9 additions & 0 deletions source/tooling/language-server-protocol-support.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Language Server Protocol Support
================================

The Language Server Protocol was originally developed by Microsoft for Visual Studio Code, but clients have now been developed for many other editors.

Currently there are two active developing implementations of a language server for Vala:

* `Vala Language Server <https://github.com/vala-lang/vala-language-server>`_ - designed for any editor that supports LSP, including VSCode, vim, and GNOME Builder. Fully compatible with Meson and ``compile_commands.json``. Has diagnostics, robust completion, signature help, document outlining, workspace symbols search, support for finding references, and more. Has packages available in a number of distributions, including Ubuntu, Fedora, Arch, and Alpine Linux. See the README for more information.
* `GVls (GNOME Vala Language Server) <https://gitlab.gnome.org/esodan/gvls>`_ - Supports Meson introspection provided by Clients or auto-detected. Supports diagnostics, completion, signature help, document's symbos, workspace symbols, find symbols, documentation. Server supports stdio and internet connection, from clients. Provides a fast LSP Client supporting connection using stdio and internet connections.
7 changes: 7 additions & 0 deletions source/tooling/other-tools.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Other Tools
===========

* `Valadoc <https://wiki.gnome.org/Projects/Valadoc>`_ - generate documentation from VAPIs, GIRs and other files
* `Gcovr <http://gcovr.com>`_ - code coverage reports, use the ``--debug`` switch with ``valac`` to include source file line numbers. Codecov Vala Example: `<https://github.com/codecov/example-vala>`_
* `Uncrustify <http://uncrustify.sourceforge.net>`_ - source code beautifier
* `Vala-Lint <https://github.com/vala-lang/vala-lint>`_ - check Vala code files for code-style errors
11 changes: 11 additions & 0 deletions source/tooling/syntax-support.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Syntax Support
==============

* `GtkSourceView <https://wiki.gnome.org/Projects/GtkSourceView>`_ extends the GtkTextView widget to provide syntax highlighting for applications using GTK+, this includes the elementary OS Code, gedit and GNOME Builder editors. Syntax highlighting for each language is through a ``.lang`` file. GtkSourceView has both a `Vala lang file <https://gitlab.gnome.org/browse/gtksourceview/tree/data/language-specs/vala.lang>`_ and a `Genie lang file <https://gitlab.gnome.org/browse/gtksourceview/tree/data/language-specs/genie.lang>`_
* Although `TextMate <http://macromates.com/>`_ is a macOS editor, its language bundles can be imported into many other editors, for example: `Visual Studio Code <https://code.visualstudio.com/docs/extensions/yocode>`_, `Sublime Text <http://docs.sublimetext.info/en/latest/extensibility/syntaxdefs.html>`_, the `JetBrains IntelliJ collection of editors <https://plugins.jetbrains.com/plugin/7221-textmate-bundles-support>`_, `Atom <https://flight-manual.atom.io/hacking-atom/sections/converting-from-textmate/>`_, `Ace web editor <https://ace.c9.io/>`_ and `Linuguist <https://github.com/github/linguist/blob/master/CONTRIBUTING.md>`_, used for GitHub syntax highlighting. A `Vala TextMate bundle <https://github.com/technosophos/Vala-TMBundle>`_ does already exist. To understand more about how to write a language bundle read `TextMate Language Grammars <https://manual.macromates.com/en/language_grammars>`_, `TextMate Scope Selectors <https://manual.macromates.com/en/scope_selectors.html|>`_, `Writing a TextMate Grammar: Some Lessons Learned <https://www.apeth.com/nonblog/stories/textmatebundle.html>`_ and `Notes on how to create a Language Grammar <https://benparizek.com/notebook/notes-on-how-to-create-a-language-grammar-and-custom-theme-for-a-textmate-bundle>`_
* `GNU source-highlight <http://www.gnu.org/software/src-highlite/>`_
* `highlight.js <http://github.com/isagalaev/highlight.js>`_ - Client side syntax highlighter (JS+HTML)
* `MoinMoin Wiki <https://wiki.gnome.org/Projects/Vala/MoinMoin>`_ parser.
* `Pygments <http://pygments.org/>`_ has a lexer since version 1.1.
* `Tree-Sitter by Prince781 <https://github.com/vala-lang/tree-sitter-vala>`_

0 comments on commit 8831a47

Please sign in to comment.