vala-language-server

Code Intelligence for Vala & Genie

LGPL-2.1 License

Downloads
93
Stars
281
Committers
25

Bot releases are visible (Hide)

vala-language-server - 0.48.7 Latest Release

Published by benwaffle over 1 year ago

vala-language-server - 0.48.6

Published by benwaffle over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/vala-lang/vala-language-server/compare/0.48.5...0.48.6

vala-language-server - 0.48.5

Published by Prince781 over 2 years ago

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.

https://user-images.githubusercontent.com/1341033/174460798-3183fc06-c293-432c-8cbd-0a2273dd7c63.mp4

code actions / suggested fixes

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

implement all prerequisites

https://user-images.githubusercontent.com/1341033/174461629-82401f8e-361f-4403-9c65-d1996cc846e5.mp4

convert integer to a different base

https://user-images.githubusercontent.com/1341033/174461833-bc305c14-56d2-4bc7-a754-269ab14911e9.mp4

There are many more actions we plan to add!

call hierarchy

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

https://user-images.githubusercontent.com/1341033/174462159-22582480-649e-453a-946b-966367c50634.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.

https://user-images.githubusercontent.com/1341033/174462375-45eeb2fb-9711-4a16-a220-943108656abd.mp4

improvements

introduce file metadata cache (f38b3b2f8452cbfd9eca52930f664dc12b945e64)

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

fixes

Full Changelog: https://github.com/vala-lang/vala-language-server/compare/0.48.4...0.48.5

vala-language-server - 0.48.4

Published by Prince781 almost 3 years ago

This release contains only bug fixes and incremental improvements.

fixes

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

improvements

  • improve completion behavior with array accesses (7bab995295940cc020ed0229ae09deed8059b3a1, a662f7783fa9c8dda3f1e229c0adcced4b397e00)
  • improve completion behavior with parameterized types (097e105853f06a7c99b29e82380c63dbe3a22b90)
  • improve completion behavior with object creation expressions (dfe057b7542df70e00fe2d50a0ed61469ca08cab)
  • add --version flag (#210)
  • completion now supports pointer member accesses (e.g. foo->bar) (a1ef671e9ba12226bed69c4da320b4f9509b9e98)
  • cache workspace/symbol results (50c739dbd2163f09ecd83efcba1c7fd4b64d5b6d)
  • cache code lenses (971a9d8f43f0359e72f430f9affe03956f5b8054)
  • support gi-docgen formatted comments (2e9d1a9adbe561428230991087a8e44e197f50c2)
  • completion now supports null-safe member accesses (e.g. foo?.bar) for Vala 0.54+ (fb5cbb9310f763e27af39111ecbb389e90778344)
vala-language-server - 0.48.3

Published by Prince781 over 3 years ago

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)

vala-language-server - 0.48.2

Published by Prince781 over 3 years ago

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

vala-language-server - 0.48.1

Published by Prince781 almost 4 years ago

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

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)

vala-language-server - 0.48

Published by Prince781 over 4 years ago

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)
vala-language-server - 0.48-alpha4

Published by Prince781 over 4 years ago

  • Improved completion support and performance
  • Improved elementaryOS support
vala-language-server - v0.48-alpha3

Published by Prince781 over 4 years ago

  • 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