ricecoder-storage 0.1.71

Storage and configuration management for RiceCoder
Documentation
# Kotlin Language Completion Configuration
# Provides Kotlin-specific keywords, snippets, and patterns for code completion

language: kotlin
version: "1.0"
description: "Kotlin language completion configuration"

# Kotlin-specific keywords
keywords:
  - abstract
  - annotation
  - as
  - break
  - by
  - catch
  - class
  - companion
  - const
  - constructor
  - continue
  - crossinline
  - data
  - delegate
  - do
  - dynamic
  - else
  - enum
  - expect
  - external
  - false
  - field
  - file
  - final
  - finally
  - for
  - fun
  - get
  - if
  - import
  - in
  - infix
  - init
  - inline
  - inner
  - interface
  - internal
  - is
  - it
  - lateinit
  - noinline
  - null
  - object
  - open
  - operator
  - out
  - override
  - package
  - param
  - private
  - property
  - protected
  - public
  - receiver
  - reified
  - return
  - sealed
  - set
  - setparam
  - super
  - suspend
  - tailrec
  - this
  - throw
  - true
  - try
  - typealias
  - typeof
  - val
  - var
  - vararg
  - when
  - where
  - while

# Kotlin-specific snippets and templates
snippets:
  - label: "class_snippet"
    template: "class ${1:ClassName} {\n    ${2:body}\n}"
    description: "Class declaration"
  
  - label: "data_class_snippet"
    template: "data class ${1:ClassName}(${2:properties})"
    description: "Data class"
  
  - label: "sealed_class_snippet"
    template: "sealed class ${1:ClassName} {\n    ${2:subclasses}\n}"
    description: "Sealed class"
  
  - label: "interface_snippet"
    template: "interface ${1:InterfaceName} {\n    ${2:methods}\n}"
    description: "Interface definition"
  
  - label: "fun_snippet"
    template: "fun ${1:functionName}(${2:params}): ${3:ReturnType} {\n    ${4:body}\n}"
    description: "Function declaration"
  
  - label: "lambda_snippet"
    template: "{ ${1:params} -> ${2:body} }"
    description: "Lambda expression"
  
  - label: "extension_snippet"
    template: "fun ${1:Type}.${2:functionName}(${3:params}): ${4:ReturnType} {\n    ${5:body}\n}"
    description: "Extension function"
  
  - label: "for_snippet"
    template: "for (${1:item} in ${2:collection}) {\n    ${3:body}\n}"
    description: "For loop"
  
  - label: "when_snippet"
    template: "when (${1:expr}) {\n    ${2:pattern1} -> ${3:result1}\n    ${4:pattern2} -> ${5:result2}\n    else -> ${6:default}\n}"
    description: "When expression"
  
  - label: "try_catch_snippet"
    template: "try {\n    ${1:code}\n} catch (e: ${2:Exception}) {\n    ${3:handle}\n}"
    description: "Try-catch block"

# Kotlin standard library types and functions
standard_library:
  - name: "kotlin"
    items:
      - "String"
      - "Int"
      - "Long"
      - "Double"
      - "Float"
      - "Boolean"
      - "Char"
      - "Byte"
      - "Short"
      - "Any"
      - "Unit"
      - "Nothing"
      - "Pair"
      - "Triple"
  
  - name: "kotlin.collections"
    items:
      - "List"
      - "MutableList"
      - "ArrayList"
      - "Map"
      - "MutableMap"
      - "HashMap"
      - "Set"
      - "MutableSet"
      - "HashSet"
      - "Sequence"
  
  - name: "kotlin.io"
    items:
      - "println"
      - "print"
      - "readLine"
      - "readText"
      - "writeText"
  
  - name: "kotlin.text"
    items:
      - "contains"
      - "startsWith"
      - "endsWith"
      - "substring"
      - "split"
      - "replace"
      - "toUpperCase"
      - "toLowerCase"
      - "trim"
  
  - name: "kotlinx.coroutines"
    items:
      - "launch"
      - "async"
      - "runBlocking"
      - "withContext"
      - "delay"
      - "Job"
      - "Deferred"

# Naming conventions
naming_conventions:
  - pattern: "^[A-Z]"
    description: "Class names should use PascalCase"
  
  - pattern: "^[a-z]"
    description: "Function and variable names should use camelCase"
  
  - pattern: "^[A-Z_]+$"
    description: "Constants should use UPPER_SNAKE_CASE"

# Ranking weights for completion scoring
ranking:
  relevance_weight: 0.4
  frequency_weight: 0.3
  recency_weight: 0.3