Giter Site home page Giter Site logo

lw64 / vala-language-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vala-lang/vala-language-server

0.0 0.0 0.0 6.19 MB

Code Intelligence for Vala & Genie

License: GNU Lesser General Public License v2.1

Shell 0.03% Python 1.00% Vala 98.00% Meson 0.97%

vala-language-server's Introduction

Vala Language Server

This is a language server for the Vala programming language.

Installation

We recommend using VSCode with the Vala plugin.

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

  • Ubuntu, Fedora, Debian, openSUSE, and Mageia: install from the OBS repo build result

  • Fedora (official): sudo dnf install vala-language-server

  • elementaryOS: sudo apt install vala-language-server

  • Alpine Linux: apk add vala-language-server

  • Guix: guix install vala-language-server

  • Void Linux: xbps-install vala-language-server

  • Windows (via MSYS2): pacman -S mingw-w64-x86_64-vala-language-server

...and more. See below:

Packaging status

VLS with VSCode VLS with Vim with coc.nvim and vista plugins VLS with GNOME Builder

Table of Contents

Features

  • diagnostics
  • code completion
    • member access and scope-visible completion
    • context-sensitive suggestions
      • completions for abstract methods/properties to implement
  • symbol outline
  • goto definition
  • symbol references
  • goto implementation
  • signature help
  • hover
  • symbol documentation
    • from comments in source code
    • from GIR and VAPI files
  • search for symbols in workspace
  • highlight active symbol in document
  • rename
  • snippets
    • for implementing abstract methods/properties
  • code lenses
  • code actions / quick fixes
  • code formatting
  • call hierarchy
  • inlay hints
  • workspaces
  • supported projects
    • meson
    • compile_commands.json
    • Vala script (file beginning with #!/usr/bin/env -S vala shebang)
    • cmake
    • autotools

Dependencies

  • glib-2.0
  • gobject-2.0
  • gio-2.0 and either gio-unix-2.0 or gio-windows-2.0
  • gee-0.8
  • json-glib-1.0
  • jsonrpc-glib-1.0 >= 3.28
  • libvala >= 0.48.12
  • you also need the posix VAPI, which should come preinstalled
  • uncrustify, for formatting (optional)

Install dependencies with Guix

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

guix environment vala-language-server

Building from Source

meson -Dprefix=/usr build
ninja -C build
sudo ninja -C build install

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

Editors

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.

vim and neovim

coc.nvim

  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"]
        }
    }
}

vim-lsp

  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

nvim-lspconfig

Visual Studio Code

GNOME Builder

  • requires GNOME Builder >= 3.35
  • Running ninja -C build install should install the third-party plugin to $PREFIX/lib/gnome-builder/plugins. Enable Vala and disable GNOME Vala Language Server.

Kate

  • officially supported in Kate git master

Emacs

Sublime Text

  • Install the Vala-TMBundle and LSP packages
  • Add this to your LSP.sublime-settings:
{
    "clients": {
        "vala-language-server": {
            "command": [
                "/usr/bin/vala-language-server"
            ],
            "selector": "source.vala | source.genie",
            "enabled": true
        }
    }
}
  • Run Tools > LSP > Enable Language Server Globally... > vala-language-server

Contributing

Want to help out? Here are some helpful resources:

vala-language-server's People

Contributors

prince781 avatar benwaffle avatar jcwasmx86 avatar cogitri avatar albfan avatar jtrees avatar cleac avatar aleksrutins avatar esodan avatar diego-ivan avatar erikreider avatar thestr4ng3r avatar kevinzonda avatar naipotato avatar ryanprior avatar sfesenko avatar taozuhong avatar thiagojedi avatar aeldemery avatar soiamsong avatar solipfuct avatar

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.