Giter Site home page Giter Site logo

govlang / v-analyzer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from v-analyzer/v-analyzer

0.0 0.0 0.0 31.33 MB

Bring IDE features for V programming languages in VS Code, Vim and other editors

License: MIT License

JavaScript 0.21% TypeScript 5.67% CSS 0.22% V 93.89%

v-analyzer's Introduction

v-analyzer

Association Official Project VSCode Extension Build CI Analyzer tests VS Code extension tests

Bring IDE features for V programming languages in VS Code, Vim, and other editors.

v-analyzer provides the following features:

  • code completion/IntelliSense
  • go to definition, type definition
  • find all references, document symbol, symbol renaming
  • types and documentation on hover
  • inlay hints for types and some construction like or block
  • semantic syntax highlighting
  • formatting
  • signature help

Installation

Linux and macOS

v -e "$(curl -fsSL https://raw.githubusercontent.com/v-analyzer/v-analyzer/master/install.vsh)"

Windows

curl 'https://raw.githubusercontent.com/v-analyzer/v-analyzer/master/install.vsh' | %{ v -e $_ }

Pre-built binaries

You can download pre-built binaries from the release page. Currently, we provide binaries for Linux (x64), macOS (x64 and ARM), and Windows (x64).

Building from source

Note If you're using Windows, then you need GCC for any build, as TCC doesn't work due to some issues.

Update V to the latest version:

v up

Install dependencies:

v install

You can build debug or release version of the binary. Debug version will be slower, but faster to compile.

Debug build:

v build.vsh debug

Release build:

v build.vsh release

Binary will be placed in bin/ folder.

Setup

Add bin/ folder to your $PATH environment variable to use v-analyzer command inside VS Code and other editors (preferred).

Or, you can specify the path to the binary in your VS Code settings:

{
  "v-analyzer.serverPath": "/path/to/v-analyzer/bin/v-analyzer"
}

Note Restart VS Code after changing the settings or PATH.

Config

v-analyzer is configured using global or local config. The global config is located in ~/.config/v-analyzer/config.toml, changing it will affect all projects.

A local config can be created with the v-analyzer init command at the root of the project. Once created, it will be in ./.v-analyzer/config.toml. Each setting in the config has a detailed description.

Pay attention to the custom_vroot setting, if v-analyzer cannot find where V was installed, then you will need to specify the path to it manually in this field.

Updating

To update v-analyzer to the latest version, run:

v-analyzer up

You can also update to a nightly version:

v-analyzer up --nightly

Note In the nightly version you will get the latest changes, but they may not be stable!

VS Code extension

This repository also contains the source code for the VS Code extension in the editors/code folder. See also extension page in VS Code Marketplace.

Authors

  • jsonrpc, lsp, tree_sitter_v modules written initially by VLS authors and after that in 2023 it was modified by the VOSCA.

Thanks

License

This project is under the MIT License. See the LICENSE file for the full license text.

v-analyzer's People

Contributors

i582 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.