Kotlin language support for VS Code

Overview

Kotlin Language

Syntax support for the Kotlin programming language. This extension adds basic features to help make writing Kotlin much more pleasant in VSCode

Features

  • Syntax highlighting
  • Code snippets
  • Region code folding

Installation

You can install the plugin by searching for Kotlin Language extension in the extensions market place, or by entering

ext install kotlin language

in to the command palette.

Contributing

We welcome any contributions to help make the extension better. There are several ways you can contribute.

  1. By reporting issues
  2. Making feature requests
  3. Or by contributing code

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Credits

Comments
  • Integrate idea plugin

    Integrate idea plugin

    I'm wondering how much work would require to integrate the plugin used by intellij idea community edition. It has a lot of features including static analysis, formatter, goto declaration, refactor and similar stuff. What do you think, is it doable?

    opened by barsan-md 9
  • Fix #31 - Fix

    Fix #31 - Fix "Syntax highlighting breaks after < and <= operators"

    The issue is that the highlighting code cannot determine if a "<" character is a "less than" operator or the start of a generic type parameter section. So, currently, when "<" is seen, all code after it is highlighted as if it were in a generic type parameter section. The code that handles this only highlights "out" and "in" keywords and includes "#types".

    The fix I am proposing is to remove the generic type parameter section code and add "out" and "in" to the storage.modifier.kotlin keyword list.

    If proper syntax is used in a generic type parameter section, the highlighting should be correct (but non-relevant syntax will be highlighted, too). Also, "out" and "in" will be highlighted even if outside such a section. But there are other things like this that happen with the existing code, like highlighting "protected" as a keyword even if used as a variable name, which is valid syntax.

    This may be the best we can do using TextMate. It certainly is better than what happens when this issue is triggered.

    opened by wildlava 8
  • Introduce languageId kotlinscript for kts files

    Introduce languageId kotlinscript for kts files

    The code-runner extension e.g. uses the languageId to find the right command to run the edited file.

    When kt and kts files map to the same id, code-runner tries to compile the file to a jar and run the jar which is not working for kts files.

    So I think kt and kts files should map to different languageIds. This should not break any other functionality.

    opened by tommy1199 4
  • Merge https://github.com/vkostyukov/kotlin-sublime-package and update language definition

    Merge https://github.com/vkostyukov/kotlin-sublime-package and update language definition

    Merged upstream repository for Kotlin.tmLanguage into this repo. Upstream should be able to be pulled using "git pull [email protected]:vkostyukov/kotlin-sublime-package master" (haven't tested this).

    This repo should have been a fork of vkostyukov/kotlin-sublime-package in the first place. This is a way of fixing this without rebasing and rewriting history.

    Doing this adds support for a bunch of new keywords and removes outdated keywords and file extensions.

    Also fixed class/object/interface from upstream Kotlin.tmLanguage not working due to a possible bug in VS Code.

    opened by sommd 4
  • End of line comments not always syntax highlighted

    End of line comments not always syntax highlighted

    image

    As shown in the image, some comments are missed by the syntax highlighter.

    EDIT: changed image to include a properly highlighted comment for comparison.

    opened by cj81499 3
  • Use GitHub releases for vsix

    Use GitHub releases for vsix

    Although the vsix are currently rather light, doing this would make tags a necessity and make the download and install of these binaries more logical.

    opened by ghost 3
  • print() highlighting not working

    print() highlighting not working

    The highlighting color of the "println" function works as expected, but the color of "print" does not (it stays white, e.g.). Here's what it looks like:

    Screen Shot 2019-04-03 at 11 42 34
    opened by wildlava 2
  • Tabs for indentation

    Tabs for indentation

    Hi,

    Is there a way to get tabs (4 characters wide, not spaces) when using your extension?

    That's my personal preference even if it's not Kotlin's official style.

    I tried this in VS Code settings JSON file but it seemingly did nothing... Still getting 2 spaces for each Tab press.

    "[kotlin]": {
    	"editor.tabSize": 4,
    },
    
    opened by kmansoft 2
  • Kotlin icon does not display for Kotlin scripts (files with *.kts extension)

    Kotlin icon does not display for Kotlin scripts (files with *.kts extension)

    In VS Code, the extension provides a nice looking icon for regular Kotlin files (*.kt) but not for Kotlin script files (*.kts).

    code_2018-10-15_07-57-12

    It would be nice if the icon were used for Kotlin scripts as well.

    opened by TAGC 2
  • Add support for Kotlin-JS

    Add support for Kotlin-JS

    Hi I develop online apps and find VSC a great tool. For all the client (browser) code I use Kotlin-JS but the plugin keeps complaining about unresolved references (like in e.g. import org.w3c.dom.* ) or unsupported context (like dynamic) although the compiler runs through without problems. Can you please complete these references, or give advise for configuring the plugin!?

    thx

    opened by tomschrot 2
  • Support for annotations

    Support for annotations

    Could we get syntax highlighting for things like @JvmStatic, @JvmField, @Throws annotations?

    https://dl.dropboxusercontent.com/u/91292881/ShareX/2016/12/Code%20-%20Insiders_2016-12-03_22-41-27.png

    opened by jonatino 2
  • Bump minimatch and vscode

    Bump minimatch and vscode

    Bumps minimatch to 3.0.4 and updates ancestor dependency vscode. These dependencies need to be updated together.

    Updates minimatch from 0.3.0 to 3.0.4

    Commits
    Maintainer changes

    This version was pushed to npm by isaacs, a new releaser for minimatch since your current version.


    Updates vscode from 0.11.18 to 1.1.37

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump css-what from 2.1.0 to 6.1.0

    Bump css-what from 2.1.0 to 6.1.0

    Bumps css-what from 2.1.0 to 6.1.0.

    Release notes

    Sourced from css-what's releases.

    v6.1.0

    • feat: Support pseudo elements with data (#762) 3be227a

    https://github.com/fb55/css-what/compare/v6.0.1...v6.1.0

    v6.0.1

    • Fix parsing column combinators after tag names 503570e

    https://github.com/fb55/css-what/compare/v6.0.0...v6.0.1

    v6.0.0

    Breaking Changes

    • Added ES6 module export (by @​spocke, fb55/css-what#680)
      • CommonJS is still provided for earlier NodeJS versions, but this change might cause issues with your build system. If they aren't trivially resolved, please open an issue!
    • Removed all options 5cad07b
      • BREAKING: Added a new value for ignoreCase: 'quirks' should ignore the case only in quirks mode.
      • BREAKING: Tags and attributes aren't lowercased anymore
    • Made selector types & actions enums 65121fe
    • Set empty namespace to null in attributes de367ca
    • Simplify stringify output 8a29466 b3e5e59

    Features

    • Support parsing column combinators 8030f67

    Fixes

    • Strip leading whitespace encapsulated in comments a812a1c
      • This used to be a way to sneak in descendant operators in front of selectors.

    Refactors

    • Switched parsing to numbers 65121fe
    • Restructured the parser to a big switch statement 7b6cc76

    Other

    • Adopted CSS Selector parsing tests from WPT 1881bba
    • Updated README to reflect changes b165a8d

    New Contributors

    Full Changelog: https://github.com/fb55/css-what/compare/v5.1.0...v6.0.0

    v5.1.0

    What's Changed

    Full Changelog: https://github.com/fb55/css-what/compare/v5.0.1...v5.1.0

    v5.0.1

    Fixes:

    ... (truncated)

    Commits
    • ee41dda 6.1.0
    • 3be227a feat: Support pseudo elements with data (#762)
    • 13ffc5b build(deps-dev): bump @​typescript-eslint/parser from 5.16.0 to 5.17.0 (#760)
    • 7d0cc2f build(deps-dev): bump @​typescript-eslint/eslint-plugin (#759)
    • 389d1b3 build(deps-dev): bump eslint from 8.11.0 to 8.12.0 (#758)
    • afd14e7 build(deps-dev): bump prettier from 2.6.0 to 2.6.1 (#757)
    • a1542de build(deps-dev): bump typescript from 4.6.2 to 4.6.3 (#756)
    • 41d9752 build(deps-dev): bump ts-jest from 27.1.3 to 27.1.4 (#755)
    • fed0407 build(deps): bump minimist from 1.2.5 to 1.2.6 (#754)
    • 96a2408 build(deps-dev): bump @​types/node from 17.0.22 to 17.0.23 (#753)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Char literal syntax highlighting wrong for double-quote '

    Char literal syntax highlighting wrong for double-quote '"'

    Issue Type: Bug

    The Kotlin syntax for a double-quote char literal is '"'. Enter this by typing '"'. This syntax is highlighted incorrectly in vscode. It's highlighted as if the double-quotes somehow trump the single-quote char literals, which they should not.

    Here is some Kotlin source code that illustrates the problem.

    val a = '"'
    val dummy1 = 1
    val b = '"'
    val dummy2 = 2
    

    Here is an image showing the incorrect syntax highlighting in vscode:

    incorrect syntax highlighting

    Compare to an image of some correct highlighting from Android Studio:

    correct syntax highlighting

    Extension version: 1.7.1 VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:34:46.910Z) OS version: Windows_NT x64 10.0.19042

    System Info

    |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (8 x 3410)| |GPU Status|2d_canvas: enabled
    flash_3d: enabled
    flash_stage3d: enabled
    flash_stage3d_baseline: enabled
    gpu_compositing: enabled
    multiple_raster_threads: enabled_on
    oop_rasterization: disabled_off
    opengl: enabled_on
    protected_video_decode: unavailable_off
    rasterization: enabled
    skia_renderer: disabled_off_ok
    video_decode: enabled
    vulkan: disabled_off
    webgl: enabled
    webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.95GB (8.58GB free)| |Process Argv|. --crash-reporter-id e5e654ef-9a6a-490b-ab1a-fca91fec1429| |Screen Reader|no| |VM|0%|

    A/B Experiments
    vsliv368cf:30146710
    vsreu685:30147344
    openlogontheside:30221877
    python763:30178808
    python383:30185418
    vspor879:30202332
    vspor708:30202333
    vspor363:30204092
    python504:30227505
    vswsl492:30211401
    wsl2prompt:30224612
    pythonvsdeb440cf:30237828
    unusedprompt:30224610
    folderexplorercf:30224615
    openfilemenu:30224647
    pythonvsded773:30236629
    vsjup459:30237187
    
    
    opened by wyckster 0
  • Specific kotlin codeblock breaks markdown document

    Specific kotlin codeblock breaks markdown document

    First, look at the following.

    スクリーンショット 2020-08-18 19 24 41

    You can see that the text after the code block is affected by syntax highlighting. I found that the same thing happens when we write certain code within a code block. The easiest way to reproduce this is to write only one "{" character.

    スクリーンショット 2020-08-18 19 34 06

    I thought it was a bug, so I reported it. thanks.

    opened by nomurashunta 1
Releases(1.7.1)
Owner
Mathias Frøhlich
Mathias Frøhlich
🍼Debug Bottle is an Android runtime debug / develop tools written using kotlin language.

???? 中文 / ???? 日本語 / ???? English ?? Debug Bottle An Android debug / develop tools written using Kotlin language. All the features in Debug bottle are

Yuriel Arlencloyn 846 Nov 14, 2022
ATH Sample is a sample Authentication and Authorization Application with Kotlin Language and MVVM architecture.

ATH Sample ATH Sample is a sample Authentication and Authorization Application with Kotlin Language and MVVM architecture. Overview ATH Sample is a sa

AbolfaZl RezaEi 4 Jun 8, 2021
A furry-themed assembly language and interpreter written in Kotlin.

A furry-themed assembly language and interpreter written in Kotlin. Inspired by Furcode, the Synacor challenge, and JVM bytecode. I spent multiple hou

Maow 9 Nov 22, 2021
An under development minecraft plugin (1.8.8) to learning Kotlin language

CorePlus CorePlus is a minecraft plugin coded with Kotlin language. Still under development CorePlus will be an essential for each minecraft servers !

Gonz 3 Jun 16, 2021
Lambda-snake.kt - Snake Game Implementation for Web using Kotlin programming language compiled for Javascript

Projeto da disciplina de Linguagem de Programação Funcional 2021.1 (jan/2022) ??

Alex Candido 3 Jan 10, 2022
FaceTimeClone app that implements Coroutines , mvvm architecture , clean architecture , navigation component , hilt , etc.... using kotlin language

This repository contains a FaceTimeClone app that implements Coroutines , mvvm architecture , clean architecture , navigation component , hilt , etc.... using kotlin language

null 17 Dec 13, 2022
Kotlin DALL·E 2 is a new AI system that can create realistic images and art from a description in natural language.

OpenAI Dall•E AI Kotlin Mobile App OpenAI Dall•E Application Build With Kotlin MVVM (Model - View - ViewModel) Clean Architecture, Beautiful Design UI

Murat ÖZTÜRK 15 Jan 1, 2023
Metremenqeemi - Android/iOS app to teach the Coptic Language

ⲙⲉⲧⲣⲉⲙⲛ̀ⲭⲏⲙⲓ The Open Source Android/iOS app to learn how to read and understand the Coptic Language Join our Discord Channel About the Curriculum The

Mark Yacoub 8 Aug 30, 2022
fusion4j - declarative rendering language for the JVM based on Neos.Fusion

fusion4j - declarative rendering language for the JVM based on Neos.Fusion Supports the Neos Fusion syntax/semantic as described in the official Neos

sandstorm 2 May 3, 2022
Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.

Codename One - Cross Platform Native Apps with Java or Kotlin Codename One is a mobile first cross platform environment for Java and Kotlin developers

Codename One 1.4k Jan 9, 2023
A Kotlin work manager library for Android with progress notifications and Hilt support.

Boot Laces A kotlin work manager library for Android that includes notifications and Hilt support. User Instructions Add the JitPack repository to you

Chris Basinger 35 Oct 8, 2022
Dependency Injection library for Kotlin Multiplatform, support iOS and Android

Multiplatform-DI library for Kotlin Multiplatform Lightweight dependency injection framework for Kotlin Multiplatform application Dependency injection

Anna Zharkova 32 Nov 10, 2022
Kotlin multiplatform decorators support

DEKORATOR [WIP] Decorator support for Kotlin! Built with ❤ , powered by Kotlin compiler plugin. Support The plugin only works on targets using new IR

Martynas Petuška 3 Mar 18, 2022
A simple, classic Kotlin MVI implementation based on coroutines with Android support, clean DSL and easy to understand logic

A simple, classic Kotlin MVI implementation based on coroutines with Android support, clean DSL and easy to understand logic

Nek.12 4 Oct 31, 2022
BlurHash support for iOS, Android and JVM via Kotlin Multiplatform

blurhash A Kotlin Multiplatform library to use blurhash in your Android App, iOS / Mac App & JVM Backend. Android iOS JVM Why? If you've tried using b

Niklas Baudy 19 Nov 17, 2022
A somewhat copy past of Jetbrain's code from the kotlin plugin repo to make it humanly possible to test Intellij IDEA kotlin plugins that work on kotlin

A somewhat copy past of Jetbrain's code from the kotlin plugin repo to make it humanly possible to test Intellij IDEA kotlin plugins that work on kotlin

common sense OSS 0 Jan 20, 2022
Android Bundle format support for Kotlinx Serialization.

Bundlizer Android Bundle format support for Kotlinx Serialization. Usage Annotate your data models with @Serializable: import kotlinx.serialization.Se

Ahmed Mourad 69 Nov 9, 2022
Minecraft NBT support for kotlinx.serialization

knbt An implementation of Minecraft's NBT format for kotlinx.serialization. Technical information about NBT can be found here. Using the same version

Ben Woodworth 41 Dec 21, 2022
Template (pure) for KMM application with DI support

KMM di template Template (pure) for KMM application with DI support. Uses Multiplatform-DI for Dependency Injection Features Common architecture (VIP)

Anna Zharkova 8 Oct 18, 2022