vls
vls copied to clipboard
Code completion stops working
Dear VLS team,
As mentioned on Discord, for now - being new to V - I'll try to help by just raising and documenting discovered issues. Later, I want to contribute with code fixes. So, here is my first issue.
System Information
V doctor
OS: linux, Pop!_OS 21.04
Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz
CC version: cc (Ubuntu 10.3.0-1ubuntu1) 10.3.0
getwd: /home/dxps/dev/dxps_gh/vlang_playground/vweb_hello_world
vmodules: /home/dxps/.vmodules
vroot: /home/dxps/apps/v
vexe: /home/dxps/apps/v/v
vexe mtime: 2021-12-11 19:24:23
is vroot writable: true
is vmodules writable: true
V full version: V 0.2.4 fe14e2f
Git version: git version 2.30.2
Git vroot status: weekly.2021.48-78-gfe14e2fc (1 commit(s) behind V master)
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 333c14de
VLS info
vls version 0.0.1.d7a7c11
Problem Description
Opening this simple example using vweb
listed below, I expect that code completion / intellisense to work properly all the times. The code (a server.v
file) is:
module main
import vweb
struct App {
vweb.Context
}
fn main() {
vweb.run(&App{}, 8182)
}
pub fn (mut app App) index() vweb.Result {
return app.text('Hello world from vweb!')
}
Expected Output
See Sample 1
.
Actual Output
See Sample 2
.
Steps to Reproduce
The steps to reproduce are:
- First time, the code completion dropdown correctly provides the relevant options (see
Sample 1
). - Doing Go to Definition (Ctrl+b) it correctly opens the
vweb.v
. - Back to the code (
server.v
file), this time no applicable option is provided, just the snippets (seeSample 2
).
Sample 1
Sample 2
VSCode Info
- running VSCode ver. 1.63.0
- VLS settings:
Thanks.
Issue persists when completion is executed after go to def is executed (either accidentally or not):
see https://github.com/vlang/vls/issues/229
Try https://blog.vosca.dev/meet-v-analyzer/ instead, now that it is released.