Skip to content

Releases: vala-lang/vala-language-server

0.48.7

24 Feb 06:28
Compare
Choose a tag to compare

Full Changelog: 0.48.6...0.48.7

Fix version in meson.build

0.48.6

22 Feb 06:56
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.48.5...0.48.6

0.48.5

19 Jun 01:47
Compare
Choose a tag to compare

what's new

This release contains many new features and improvements. Please note, many of these new features require a supporting IDE. For VS Code and derivatives, you must install version 1.0.8 or later of the Vala extension.

code formatting

VLS can now format your code—either an entire source file or a selection. uncrustify must be installed for this to work.

vls-formatting.mp4

code actions / suggested fixes

VLS can now suggest fixes to your code. Currently we have two actions:

implement all prerequisites

vls-implement.mp4

convert integer to a different base

vls-baseconvert.mp4

There are many more actions we plan to add!

call hierarchy

VLS can now answer queries about the call graph of a method.

vls-callhierarchy.mp4

inlay hints

VLS will now show hints at special places in your code. VLS will hint the types of variables with inferred types (if they are nontrivial), the arguments of a function, and will show the types of parameters in anonymous functions.

before

Screenshot from 2022-06-18 21-34-10

after

Screenshot from 2022-06-18 21-33-30

type hierarchy

VLS can now answer queries about the type hierarchy of a data type.

vls-typehierarchy.mp4

improvements

introduce file metadata cache (f38b3b2)

VLS will avoid recompiling your project on the slightest change. If the compilation target's exported API does not change after a modification (for example, you only change a method implementation), then we can avoid recompiling other build targets that depend on the modified target, since the .vapi will be unchanged. This saves considerable time in large Vala projects with many build targets, such as Shotwell and Geary.

render a symbol reference in documentation with a link to valadoc.org

VLS will now render a link to the relevant ValaDoc page for each symbol mentioned in documentation.

before

Screenshot from 2022-06-18 21-45-44

after

Screenshot from 2022-06-18 21-45-03

other improvements

  • make it easier to use VLS as a Meson subproject by @esodan in #231
  • add packaging status badge to README by @benwaffle in #234
  • add wraps for some dependencies, allowing VLS to be built without json-glib, jsonrpc-glib, and libgee installed on the system (484465d)

fixes

  • mesonproject: refine custom compiler search by @Prince781 in #247
  • fix crash, if an invalid file is sent by the client. by @JCWasmx86 in #245
  • added ability to use local uncrustify config by @ErikReider in #243
  • fix use-after-free when processing GIR documentation (75f399c)
  • improve code completion and signature help for generics and async methods (d86b98c)
  • support rendering @since taglet in documentation (ef22ab2)

Full Changelog: 0.48.4...0.48.5

0.48.4

26 Dec 06:19
Compare
Choose a tag to compare

This release contains only bug fixes and incremental improvements.

fixes

  • avoid deadlocks in signal handler (2eb3550)
  • code style analyzer: round up when calculating average number of spaces before parentheses (3b8759b)

improvements

  • improve completion behavior with array accesses (7bab995, a662f77)
  • improve completion behavior with parameterized types (097e105)
  • improve completion behavior with object creation expressions (dfe057b)
  • add --version flag (#210)
  • completion now supports pointer member accesses (e.g. foo->bar) (a1ef671)
  • cache workspace/symbol results (50c739d)
  • cache code lenses (971a9d8)
  • support gi-docgen formatted comments (2e9d1a9)
  • completion now supports null-safe member accesses (e.g. foo?.bar) for Vala 0.54+ (fb5cbb9)

0.48.3

04 Jul 09:42
Compare
Choose a tag to compare

what's new

code help

  • more expressions are supported by the rapid completion parser
  • the highlighted range has been narrowed to the symbol on hover, making it easier to move your mouse over sub-expressions and sub-symbols
  • suggest unimplemented symbols for compact classes
  • Vala with statements are now supported
  • keyword suggestions have been improved

symbols are rendered with the name of their parent, which gives more visual context

before:
Screenshot from 2021-07-04 04-11-14

after:
Screenshot from 2021-07-04 04-10-35

signature help for printf()-style functions is tailored to the format string

Peek 2021-07-04 04-35

code lenses for methods that are overridden, hidden, or implemented

(clicking on the code lens to list the base/hidden symbol is only supported with the VS Code plugin, but see the next feature)
Peek 2021-07-04 05-10

use goto-definition on implementing/hiding symbols to go to the base/hidden symbol

(this works for everything else that doesn't support VLS's code actions)
Peek 2021-07-04 05-18

snippets for method completion

method snippets

Demonstration of VLS understanding the code style when completing (notice that VLS dynamically adjusts to the coding style as it changes from one space to zero spaces before method arguments):
method snippets style

fixes/other improvements

  • project: improve dependency graph construction (#168)
  • support Meson subprojects (#162)
  • make GIR documentation work with custom targets (#162) and Vala scripts (#186)
  • set default value for insertTextFormat (#148)
  • completion: fix inclusion of override when suggesting unimplemented symbols
  • fix substitution of type args in parent types
  • add a few workarounds for recursive types to avoid compiler crashes
  • improve the handling of changes to the project

contributors

Princeton Ferro (@Prince781), Ben Iofel (@benwaffle), Rasmus Thomsen (@Cogitri), Tao Zuhong (@taozuhong)

0.48.2

15 Apr 20:45
Compare
Choose a tag to compare

This release contains only bugfixes. The lack of activity between this and the previous release is explained by my attention being diverted to the Language Server Testing Framework, which will address #26.

packaging

Again, we've switched to Open Build System and deprecated the PPA and Copr. See the README or the download page for installation instructions.

fixes

  • default to project URI for diagnostics (#169)
  • adapt to the new Vala.Loop API in Vala 0.52 (#172)

contributors

Princeton Ferro (@Prince781), @aeldemery

0.48.1

29 Oct 19:09
Compare
Choose a tag to compare

what's new

code help

  • minor fixes to completion suggestions: error codes are now displayed, and avoid spurious suggestions when typing > in some cases
  • show suggestions and signature help for this and base accesses and constructor invocations
  • show suggestions for class symbols

VLS now supports document- and project-wide symbol renaming

VLS now supports the textDocument/rename and textDocument/prepareRename portions of the language server protocol, making it easier to refactor your code.

renaming of local variables
renaming of symbols, such as namespaces, referenced by many files in the project

greatly improved rendering of documentation, support for ValaDoc and GTK-Doc comments

VLS now runs an internal parser on comments written in ValaDoc and GTK-Doc format. As a result, documentation looks much cleaner and more beautiful. Lists, tables, links, code snippets, parameters, and images are now properly rendered. VLS even goes the extra mile by converting C symbol names to their equivalent in Vala, wherever they appear in documentation. For example, g_timeout_add_full() becomes GLib.Timeout.add(), GVariantIter becomes GLib.VariantIter, etc.

before:
gvariant doc before
gvarianttype doc before

after:
gvariant doc after
gvarianttype doc after

In addition, some fixes to symbol lookup have been made, allowing you to see documentation for more symbols on hover.

vala-language-server(1) man page

VLS now has a man page. Thanks to @Cogitri (Rasmus Thomsen), you can now do man vala-language-server to get information about VLS. We plan on expanding this manual as VLS becomes more configurable.

fixes

  • show more symbol modifiers/improve rendering on properties, fields, methods, and setters (1307a92)
  • gracefully handle duplicate invalid constructors (#135)
  • mesonproject: handle new behavior in Meson 0.55 (#139, #149, 485fcf6)
  • fix null generic type arguments when hovering over named constructors (83536db)
  • improve signature help with anonymous function calls and delegates (e0412a3)
  • the GNOME Builder plugin is configured automatically to the version of GNOME Builder preinstalled; otherwise, version 3.38 is assumed
  • project: don't ignore the last build target in a project when looking for dependents of a build target (#124)

packaging

We are in the process of transitioning to Open Build Service to package VLS for rpm- and deb- based distributions. Currently, you can install VLS 0.48.1 through our OBS repository for Debian Testing and Unstable, Fedora 33 and Rawhide, and Ubuntu 20.10. Fedora 32 and Ubuntu 20.04 currently only have VLS 0.48.0 due to a dependency on libvala 0.48.7. You can also get VLS for other distros in these ways:

  • Guix: guix install vala-language-server (thanks to @ryanprior)

  • Arch Linux (via AUR): yay -S vala-language-server
    or yay -S vala-language-server-git

  • Alpine Linux Edge: apk add vala-language-server (thanks to @Cogitri)

  • Ubuntu 18.04 and elementaryOS

    In order to install VLS, you need Vala 0.48 or later, which is only available
    by default on Ubuntu 20.04. You can get an up-to-date version of Vala
    from the Vala Team's Vala-Next repository. First you need to remove older
    Vala components:

    sudo apt-add-repository ppa:vala-team/next
    # If you have 0.40 and 0.48, there may be random issues popping out
    sudo apt-get remove valac-0.40-vapi "libvala.*-0.40-0"
    sudo apt-get install valac-0.48 valac-bin

    Now you can install the Vala Language Server:

    sudo add-apt-repository ppa:prince781/vala-language-server
    sudo apt-get update
    sudo apt-get install vala-language-server

contributors

Princeton Ferro (@Prince781), Rasmus Thomsen (@Cogitri), Ryan Prior (@ryanprior), Florian Märkl (@thestr4ng3r), @soiamsoNG, Alex Cleac (@cleac)

0.48

30 May 05:01
Compare
Choose a tag to compare

The first production release of the Vala Language Server.

what's new

code help

  • the symbol extractor has been improved to allow rapid completion in more circumstances
  • method signature help now uses the symbol extractor, making it much faster
  • added snippets for Vala keywords and statements

VLS now suggests unimplemented methods and properties when inside the body of a class

completions for unimplemented symbols

  • VLS now analyzes the interpreter line in Vala scripts for compiler arguments (#113)

VLS now resolves parameterized types everywhere (#115)

before:
before1

after:
after1

before:
before2

after:
after2

project management

  • VLS can now tell when you're editing files that don't belong to the current project and handle them appropriately

fixes

  • disconnect project-changed-event only if connected (#90)
  • fix support for compile_commands.json projects (39172e1)
  • handle paths properly on Windows (#58)
  • fix memory leaks on completion (af4a222)
  • fix segfault when receiving textDocument/documentSymbols on an invalid document (d3bcea4)
  • handle arrays in completion (#107)
  • various fixes to results shown by textDocument/implementation (7a5d4af)
  • fixed computing of document symbol ranges, which fixes breadcrumbs navigation in editors like VSCode (bd64b24)
  • bail out early if the Vala parser gets into an infinite loop and an unbounded number of error message are generated (14e74cd)

0.48-alpha4

15 Apr 14:31
Compare
Choose a tag to compare
0.48-alpha4 Pre-release
Pre-release
  • Improved completion support and performance
  • Improved elementaryOS support

v0.48-alpha3

12 Apr 09:35
Compare
Choose a tag to compare
v0.48-alpha3 Pre-release
Pre-release
  • Improved Meson support, support projects with mixed C and Vala, and improvements to single-file mode
  • Reduced memory usage by fixing leaks
  • Various bug fixes