What you're seeing is the developmental branch of the V Language server. This means that it may not be guaranteed to work reliably on your system.
If you are experiencing problems, please consider filing a bug report.
V Language Server (also known as "VLS") is a LSP v3.15-compatible language server for the V programming language.
Pre-built binaries for Windows (x64), MacOS (x64/M1), and Linux (x64) can be found here.
The official V VSCode extension provides a way to automatically download and install VLS by checking the "Enable VLS" in the extension settings in which a message prompt will appear for you to install VLS.
NOTE: TCC, the default compiler shipped with V, is not recommended ATM due to some issues in the Tree Sitter's output.
To build the language server from source, you need to have the following:
Linux and MacOS users are also expected to install the Boehm GC library.
- For Debian/Ubuntu users:
sudo apt-get install libgc-dev
- For MacOS (via Homebrew):
brew install bdw-gc
Afterwards, open your operating system's terminal and execute the following:
## Clone the project:
git clone https://github.com/vlang/vls && cd vls
## Build the project
## Use " v run build.vsh gcc" if you're compiling VLS with GCC.
v run build.vsh clang
# The binary will be created in the current root directory `vls`.
To use the language server, you need to have an editor with LSP support. See this link for a full list of supported editors.
GitHub Web Editor is not supported yet at this moment. See this issue comment.
For Visual Studio Code and other derivatives, all you need to do is to install 0.1.4 or above versions of the V VSCode extension. Afterwards, go to settings and scroll to the V extension section. From there, enable VLS by checking the "Enable VLS" box.
If you have VLS downloaded in a custom directory, you need to input the absolute path of the vls
language server executable to the "Custom Path" setting. If you cloned the repository and compiled it from source, the executable will be in the vls
root directory. So make sure to add vls/bin/vls
or vls/bin/vls.exe
(for Windows).
VLS on JetBrain IDEs does not work at this moment. See issue 52 for more details.
For other editors, please refer to the plugin's/editor's documentation for instructions on how to setup an LSP server connection.
- Queue support (support for cancelling requests)
-
initialize
(Activates features based on VSCode's capabilities for now.) -
initialized
-
shutdown
-
exit
-
$/cancelRequest
-
showMessage
-
showMessageRequest
-
logMessage
-
progress/create
-
progress/cancel
-
event
(Implemented but not usable)
-
registerCapability
-
unregisterCapability
-
workspaceFolders
-
didChangeWorkspaceFolder
-
didChangeConfiguration
-
configuration
-
didChangeWatchedFiles
-
symbol
-
executeCommand
-
applyEdit
-
didOpen
-
didChange
-
willSave
-
willSaveWaitUntil
-
didSave
-
didClose
-
publishDiagnostics
-
completion
-
completion resolve
-
hover
-
signatureHelp
-
declaration
-
definition
-
typeDefinition
-
implementation
-
references
-
documentHighlight
-
documentSymbol
-
codeAction
-
codeLens
-
codeLens resolve
-
documentLink
-
documentLink resolve
-
documentColor
-
colorPresentation
-
formatting
-
rangeFormatting
-
onTypeFormatting
-
rename
-
prepareRename
-
foldingRange
When reporting a crash in the language server, you just need to copy the contents of the latest auto-generated error which can be found in the home directory (C:\Users\<user_name>
for Windows, /home/<user_name>
for Linux, and /Users/<user_name>
for MacOS). The contents of the file can be then pasted into the issue tracker form.
Bugs that are not crashes however can still generate report by passing the --generate-report
flag to the language server CLI.
VLS provides a log file (${workspacePath}/vls.log
) for debugging the language server incoming requests and outgoing responses / notifications. By default, this can only be saved and accessed on server crash. To save the log on every exit, pass the --debug
flag to the language server CLI.
- Fork it (https://github.com/vlang/vls/fork)
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- nedpals - creator and maintainer
- danieldaeschle - maintainer
- hungrybluedev - contributor
- streaksu - contributor
- ylluminarious - contributor
- yuyi98 - contributor