Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 22 2018 18:48

    fwcd on master

    Added Gitter (compare)

F. W.
@fwcd_gitlab
The ideal solution to the code completion issue (analogous to the way TypeScript handles this too) would be to provide a single completion list entry that allows the user, once inserted, to select an overload through the parameter hints (by pressing the arrow keys).
Probably not a good example, since Bufferis listed twice here (First as a global constructor and then as a module import). In general every method name should only be listed once regardless of the overloads though.
Noah Santschi-Cooney
@Strum355
I was trying to see where to do that before i did it the way that i then submitted but couldnt find the way to do it in the api
I know its a thing but maybe its not implemented in lsp4j?
F. W.
@fwcd_gitlab

AFAIK it is called "signature help" (in KotlinTextDocumentService):

    override fun signatureHelp(position: TextDocumentPositionParams): CompletableFuture<SignatureHelp?> = async.compute {
        reportTime {
            LOG.info("Signature help at {}", describePosition(position))

            val (file, cursor) = recover(position, false)
            fetchSignatureHelpAt(file, cursor) ?: noResult("No function call around ${describePosition(position)}", null)
        }
    }

...which is implemented already, but still has some issues (for example not showing the popup if the parentheses were inserted by the language server after pressing a completion item or not always finding the appropriate function signature).

Noah Santschi-Cooney
@Strum355
been doing rust recently. even kotlin has a better language server than rust :smile:
F. W.
@fwcd_gitlab
Yeah, though Rust has at least an officially maintained language server
Noah Santschi-Cooney
@Strum355
any eta on periodic full compilation
for clearing out residual errors
currently the only way is to restart vscode which gets rid of change history for ctrl+z
Noah Santschi-Cooney
@Strum355
heh i started something a couple of months ago and now that ive time to revisit, i cant remember where i was tryna go
Noah Santschi-Cooney
@Strum355
https://twitter.com/deepu105/status/1095992144152748033 this is a thing, gonna see what i can do for this lang server
Jon Carr
@joncarr
Hi, I'm writing a PR to add out-of-the-box kotlin-language-server support for emacs and lsp-mode. Everything appears to be going great but I have one warning I can't get to go away. The error is Unknown request method: workspace/configuration. So my question is, where might I find the details for this request method inside the kotlin-language-server code so I can write a handler to satisfy it's requirements???
Noah Santschi-Cooney
@Strum355
@joncarr you might be better off reading the language server specifications, as that is a part of that
Jon Carr
@joncarr
@Strum355 I think so, thanks
Matthew McGarvey
@matthewmcgarvey
:wave: hi everyone
Matthew McGarvey
@matthewmcgarvey
It seems like you have to use eclipse to work with their stuff. So annoying
Matthew McGarvey
@matthewmcgarvey
I give up, eclipse is terrible
Noah Santschi-Cooney
@Strum355
not sure whats going on here ahah
Matthew McGarvey
@matthewmcgarvey
I was trying to look at an eclipse project (their java lsp) and they recommend using eclipse and I couldn't get it to work. If anyone knows how to set up that project I'd greatly appreciate it
Noah Santschi-Cooney
@Strum355
Use the checkout the redhat language server instead perhaps
The one with vscode java extension
prassee
@prassee
newbie here ... does installing the VSCode extension is just enough to start using the IDE features. I assume the language server is installed in the background
Matthew McGarvey
@matthewmcgarvey
Yes, it is enough :+1:
prassee
@prassee
so the same applies for Emacs as well
Matthew McGarvey
@matthewmcgarvey
that I don't know but I imagine it should. I think they extend the VSCode extension
prassee
@prassee
how many here use kotlin for server side
Matthew McGarvey
@matthewmcgarvey
I would imagine it's the vast majority who don't use it for server side
Matthew McGarvey
@matthewmcgarvey
wow, I meant it's the vast majority who do use it for server side
Ryan Sobol
@ryansobol
hey all, just installed this extension. i'm seeing the following error in the vs code console
workbench.main.js:2365 Internal error.
         onDidNotificationChange @ workbench.main.js:2365
workbench.main.js:3855 Activating extension 'fwcd.kotlin' failed: Internal error..
        _logMessageInConsole @ workbench.main.js:3855
workbench.main.js:238 [Extension Host] Activating extension `fwcd.kotlin` failed:  Internal error.
         t.log @ workbench.main.js:238
workbench.main.js:238 [Extension Host] Here is the error stack:  Error: Internal error.
    at handleResponse (/Users/ryansobol/.vscode/extensions/fwcd.kotlin-0.1.13/node_modules/vscode-jsonrpc/lib/main.js:436:48)
    at processMessageQueue (/Users/ryansobol/.vscode/extensions/fwcd.kotlin-0.1.13/node_modules/vscode-jsonrpc/lib/main.js:263:17)
    at Immediate.setImmediate (/Users/ryansobol/.vscode/extensions/fwcd.kotlin-0.1.13/node_modules/vscode-jsonrpc/lib/main.js:247:13)
    at runCallback (timers.js:696:18)
    at tryOnImmediate (timers.js:667:5)
    at processImmediate (timers.js:649:5)
Noah Santschi-Cooney
@Strum355
Is there a way for you to get the logs from the kotlin side of the extension
wikoion
@wikoion
Hey, been trying to get this working with the coc.nvim extension for vim/neovim, don't suppose anyone has any experience with this do they?
In my coc-settings.json I have:
{
    "languageserver": { 
        "kotlinLanguageServer": {
            "command": "/Users/wikoion/git/KotlinLanguageServer/server/build/install/server/bin/server",
            "filetypes": ["kotlin"],
            "rootPatterns": [".kt",".kts"],
            "additionalSchemes": ["jar", "zipfile"]
        }  
    }
}
Noah Santschi-Cooney
@Strum355
@fwcd_gitlab loads of progress been made recently i see! Hows the status of the overall project atm?
F. W.
@fwcd_gitlab
It's doing fine, we've finally made some progress adding a formatter, improving the Java-to-Kotlin converter and providing support for more editors!
Noah Santschi-Cooney
@Strum355
I see you did something with an embedded compiler. Did we see improvement in the linter and autocomplete?
F. W.
@fwcd_gitlab
The autocomplete is more accurate and provides completions for keywords now, but there are still some performance issues
kotlin-compiler-embeddable is really the same thing as kotlin-compiler, just that some of the classes are located under different packages (org.jetbrains.kotlin.com.intellij.* instead of com.intellij.*)
Luiz Guilherme D'Abruzzo Pereira
@luiz290788
Hello, is anyone else getting this error Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' optionkotlin(INLINE_FROM_HIGHER_PLATFORM) I'm facing it language server project on Compiler.kt
It seems that it hasn't detected the target jvm version from gradle
Luiz Guilherme D'Abruzzo Pereira
@luiz290788
I was able to fix it by settings "kotlin.compiler.jvm.target": "1.8" on my settings
Noah Santschi-Cooney
@Strum355
image.png
Hey @fwcd_gitlab im getting the following with build from master
Noah Santschi-Cooney
@Strum355
aha i think ive discovered it
the gradle project was in a subfolder of the workspace directory, one level below
this was causing it to crash
Noah Santschi-Cooney
@Strum355
@fwcd_gitlab are master tests currently failing? :thinking:
Noah Santschi-Cooney
@Strum355
server/src/main/kotlin/org/javacs/kt/signaturehelp/SignatureHelp.kt.activeParameter, this is meant to return the index of the "active param". what defines active param? when is this the case?
Noah Santschi-Cooney
@Strum355
ah found it out