Code Monkey home page Code Monkey logo

lsp-kotlin's Introduction

LSP-kotlin

Kotlin support for Sublime's LSP plugin.

Uses Kotlin Language Server to provide validation, formatting and other features for Kotlin files. See linked repository for more information.

Prerequisites

  • Java must be installed and configured in your PATH

Installation

Configuration

Open configuration file using command palette with Preferences: LSP-kotlin Settings command or opening it from the Sublime menu (Preferences > Package Settings > LSP > Servers > LSP-kotlin).

Settings

The language server doesn't contain customizable settings at the moment.

lsp-kotlin's People

Contributors

predragnikolic avatar rchl avatar terminalfi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

lsp-kotlin's Issues

Support Kotlin LSP 1.3.9

I modified the package to download version 1.3.9 but the plugin is now crashing with the following error:

:: [15:35:29.606] --> kotlin initialize (1): {'capabilities': {'workspace': {'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}, 'workspaceFolders': True, 'codeLens': {'refreshSupport': True}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'symbol': {'tagSupport': {'valueSet': [1]}, 'dynamicRegistration': True, 'symbolKind': {'valueSet': [1, 26, 16, 18, 22, 6, 9, 10, 4, 5, 2, 20, 3, 15, 12, 19, 8, 7, 21, 11, 14, 17, 13, 24, 23, 25]}, 'resolveSupport': {'properties': ['location.range']}}, 'inlayHint': {'refreshSupport': True}, 'semanticTokens': {'refreshSupport': True}, 'applyEdit': True, 'executeCommand': {}, 'configuration': True, 'diagnostics': {'refreshSupport': True}}, 'general': {'regularExpressions': {'engine': 'ECMAScript'}, 'markdown': {'parser': 'Python-Markdown', 'version': '3.2.2'}}, 'textDocument': {'declaration': {'linkSupport': True, 'dynamicRegistration': True}, 'rangeFormatting': {'rangesSupport': True, 'dynamicRegistration': True}, 'selectionRange': {'dynamicRegistration': True}, 'documentHighlight': {'dynamicRegistration': True}, 'documentLink': {'tooltipSupport': True, 'dynamicRegistration': True}, 'inlayHint': {'dynamicRegistration': True, 'resolveSupport': {'properties': ['textEdits', 'label.command']}}, 'hover': {'contentFormat': ['markdown', 'plaintext'], 'dynamicRegistration': True}, 'typeHierarchy': {'dynamicRegistration': True}, 'typeDefinition': {'linkSupport': True, 'dynamicRegistration': True}, 'implementation': {'linkSupport': True, 'dynamicRegistration': True}, 'definition': {'linkSupport': True, 'dynamicRegistration': True}, 'callHierarchy': {'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'signatureHelp': {'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'activeParameterSupport': True, 'documentationFormat': ['markdown', 'plaintext']}, 'dynamicRegistration': True, 'contextSupport': True}, 'rename': {'prepareSupport': True, 'prepareSupportDefaultBehavior': 1, 'dynamicRegistration': True}, 'synchronization': {'didSave': True, 'willSaveWaitUntil': True, 'dynamicRegistration': True, 'willSave': True}, 'completion': {'insertTextMode': 2, 'completionItem': {'insertTextModeSupport': {'valueSet': [2]}, 'snippetSupport': True, 'labelDetailsSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'tagSupport': {'valueSet': [1]}, 'deprecatedSupport': True, 'insertReplaceSupport': True, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}}, 'dynamicRegistration': True, 'completionList': {'itemDefaults': ['editRange', 'insertTextFormat', 'data']}, 'completionItemKind': {'valueSet': [17, 19, 25, 22, 20, 2, 4, 13, 11, 7, 9, 1, 8, 3, 14, 15, 5, 18, 10, 16, 21, 6, 23, 12, 24]}}, 'documentSymbol': {'tagSupport': {'valueSet': [1]}, 'hierarchicalDocumentSymbolSupport': True, 'dynamicRegistration': True, 'symbolKind': {'valueSet': [1, 26, 16, 18, 22, 6, 9, 10, 4, 5, 2, 20, 3, 15, 12, 19, 8, 7, 21, 11, 14, 17, 13, 24, 23, 25]}}, 'codeLens': {'dynamicRegistration': True}, 'foldingRange': {'foldingRangeKind': {'valueSet': ['comment', 'imports', 'region']}, 'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'semanticTokens': {'overlappingTokenSupport': False, 'augmentsSyntaxTokens': True, 'multilineTokenSupport': True, 'requests': {'range': True, 'full': {'delta': True}}, 'formats': ['relative'], 'tokenTypes': ['typeParameter', 'struct', 'modifier', 'enumMember', 'comment', 'method', 'enum', 'type', 'class', 'regexp', 'namespace', 'macro', 'function', 'keyword', 'event', 'property', 'number', 'interface', 'decorator', 'parameter', 'variable', 'string', 'operator'], 'tokenModifiers': ['defaultLibrary', 'deprecated', 'declaration', 'abstract', 'async', 'readonly', 'documentation', 'definition', 'modification', 'static'], 'dynamicRegistration': True}, 'publishDiagnostics': {'dataSupport': True, 'tagSupport': {'valueSet': [1, 2]}, 'codeDescriptionSupport': True, 'relatedInformation': True, 'versionSupport': True}, 'codeAction': {'dataSupport': True, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.fixAll', 'source.organizeImports']}}, 'isPreferredSupport': True, 'dynamicRegistration': True, 'resolveSupport': {'properties': ['edit']}}, 'references': {'dynamicRegistration': True}, 'diagnostic': {'dynamicRegistration': True, 'relatedDocumentSupport': True}}, 'window': {'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'showDocument': {'support': True}, 'workDoneProgress': True}}, 'workspaceFolders': [{'uri': 'REDACTED', 'name': 'neets'}], 'rootPath': 'REDACTED', 'clientInfo': {'version': '1.29.0', 'name': 'Sublime Text LSP'}, 'processId': 1443124, 'initializationOptions': {}, 'rootUri': 'REDACTED'}
kotlin: Exception in thread "main" java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.cli.jvm.config.JvmContentRootsKt.configureJdkClasspathRoots(org.jetbrains.kotlin.config.CompilerConfiguration)'
kotlin: 	at org.javacs.kt.compiler.CompilationEnvironment.<init>(Compiler.kt:122)
kotlin: 	at org.javacs.kt.compiler.Compiler.<init>(Compiler.kt:468)
kotlin: 	at org.javacs.kt.CompilerClassPath.<init>(CompilerClassPath.kt:31)
kotlin: 	at org.javacs.kt.KotlinLanguageServer.<init>(KotlinLanguageServer.kt:29)
kotlin: 	at org.javacs.kt.KotlinLanguageServer.<init>(KotlinLanguageServer.kt:25)
kotlin: 	at org.javacs.kt.MainKt.main(Main.kt:42)

It seems that the root cause is the NoSuchMethodError. I'm happy to make a pull request, but I'm not sure what exactly needs to be done. Do you have any thoughts?

FWIW, version 1.3.9 runs just fine outside of Sublime.

kotlin-language-server is crashing

LSP: kotlin crashed (1 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP: starting ['/Users/Luuk/Library/Caches/Sublime Text/Package Storage/LSP-kotlin/server/bin/kotlin-language-server'] in /Users/Luuk/Developer/afstuderen/maestro
LSP: kotlin crashed (2 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP: starting ['/Users/Luuk/Library/Caches/Sublime Text/Package Storage/LSP-kotlin/server/bin/kotlin-language-server'] in /Users/Luuk/Developer/afstuderen/maestro
LSP: kotlin crashed (3 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP: starting ['/Users/Luuk/Library/Caches/Sublime Text/Package Storage/LSP-kotlin/server/bin/kotlin-language-server'] in /Users/Luuk/Developer/afstuderen/maestro
LSP: kotlin crashed (4 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP: starting ['/Users/Luuk/Library/Caches/Sublime Text/Package Storage/LSP-kotlin/server/bin/kotlin-language-server'] in /Users/Luuk/Developer/afstuderen/maestro
LSP: kotlin crashed (5 / 5 times in the last 180.0 seconds), exit code 1, exception: None
Package Control: Urllib HTTPS Debug General

Is this me or just the package?

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.