A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/benwaffle/vala-language-server below:

vala-lang/vala-language-server: Code Intelligence for Vala & Genie

This is a language server for the Vala programming language.

We recommend using VSCode with the Vala plugin.

...and more. See below:

Install dependencies with Guix

If you're using Guix, to launch a shell with build dependencies satisfied:

guix environment vala-language-server
meson -Dprefix=/usr build
ninja -C build
sudo ninja -C build install

This will install vala-language-server to /usr/bin

An important note: VLS cannot know what arguments are used for the file you are editing unless it can locate a build script, compile commands list, or shebang to analyze. (This is generally true for most language servers of compiled languages.) Before making an issue, check whether you have a build script or shebang for your file.

  1. Make sure coc.nvim is installed.
  2. After successful installation, in Vim run :CocConfig and add a new entry for VLS to the languageserver property like below:
{
    "languageserver": {
        "vala": {
            "command": "vala-language-server",
            "filetypes": ["vala", "genie"]
        }
    }
}
  1. Make sure vim-lsp is installed
  2. Add the following to your .vimrc:
if executable('vala-language-server')
  au User lsp_setup call lsp#register_server({
        \ 'name': 'vala-language-server',
        \ 'cmd': {server_info->[&shell, &shellcmdflag, 'vala-language-server']},
        \ 'whitelist': ['vala', 'genie'],
        \ })
endif
require'lspconfig'.vala_ls.setup {
  -- defaults, no need to specify these
  cmd = { "vala-language-server" },
  filetypes = { "vala", "genie" },
  root_dir = root_pattern("meson.build", ".git"),
  single_file_support = true,
}
{
    "clients": {
        "vala-language-server": {
            "command": [
                "/usr/bin/vala-language-server"
            ],
            "selector": "source.vala | source.genie",
            "enabled": true
        }
    }
}

If you're using meson, vala-language-server will automatically detect the packages you depend on.

If you just want to write a quick script without a build system, you can add a shebang line to the top of your .vala file:

#!/usr/bin/env -S vala --pkg gtk4

Want to help out? Here are some helpful resources:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4