Closed olimorris closed 1 year ago
Bump for this - having the same issue
I am trying to figure out how to solve it. This is because the Language Server Protocol (LSP) indicates that these functions are starting at this position, and it seems that this only occurs in Lua code.
I see. However, why is the actual column position of the function relevant? Couldn't you just ignore it end set it to 0 (nobody wants a codelens line not starting at the beginning of the line)
I see. However, why is the actual column position of the function relevant? Couldn't you just ignore it end set it to 0 (nobody wants a codelens line not starting at the beginning of the line)
It's because of indentations, for example:
class A {
// lens starts from this column
int add(int a, int b) {
return a + b;
}
}
Maybe I can set it to 0 with Lua file? Not sure if there is an impact. :)
Here's a thought - if the server is lua_ls
and the line begins with "local," then set the indentation to 0. What do you think about this solution?
I'd actually like to write a PR for this to code more experience with OSS if that is ok.
Here's a thought - if the server is
lua_ls
and the line begins with "local," then set the indentation to 0. What do you think about this solution?I'd actually like to write a PR for this to code more experience with OSS if that is ok.
Great! Thank you in advance. I am currently a bit occupied. :)
I have the following Lua code:
and I noticed that there is a weird indentation which I perceive to be due to
local
:For anything without
local
it works just fine: