language: java
version: "1.0"
description: "Java language completion configuration"
keywords:
- abstract
- assert
- boolean
- break
- byte
- case
- catch
- char
- class
- const
- continue
- default
- do
- double
- else
- enum
- extends
- final
- finally
- float
- for
- goto
- if
- implements
- import
- instanceof
- int
- interface
- long
- native
- new
- package
- private
- protected
- public
- return
- short
- static
- strictfp
- super
- switch
- synchronized
- this
- throw
- throws
- transient
- try
- void
- volatile
- while
snippets:
- label: "class_snippet"
template: "public class ${1:ClassName} {\n ${2:body}\n}"
description: "Class declaration"
- label: "interface_snippet"
template: "public interface ${1:InterfaceName} {\n ${2:methods}\n}"
description: "Interface definition"
- label: "method_snippet"
template: "public ${1:returnType} ${2:methodName}(${3:params}) {\n ${4:body}\n}"
description: "Method declaration"
- label: "constructor_snippet"
template: "public ${1:ClassName}(${2:params}) {\n ${3:body}\n}"
description: "Constructor"
- label: "for_snippet"
template: "for (int ${1:i} = 0; ${1:i} < ${2:n}; ${1:i}++) {\n ${3:body}\n}"
description: "For loop"
- label: "for_each_snippet"
template: "for (${1:Type} ${2:item} : ${3:collection}) {\n ${4:body}\n}"
description: "For-each loop"
- label: "try_catch_snippet"
template: "try {\n ${1:code}\n} catch (${2:Exception} e) {\n ${3:handle}\n}"
description: "Try-catch block"
- label: "try_finally_snippet"
template: "try {\n ${1:code}\n} finally {\n ${2:cleanup}\n}"
description: "Try-finally block"
- label: "if_snippet"
template: "if (${1:condition}) {\n ${2:then}\n} else {\n ${3:else}\n}"
description: "If-else statement"
- label: "switch_snippet"
template: "switch (${1:expr}) {\n case ${2:value1}:\n ${3:body1}\n break;\n default:\n ${4:default}\n}"
description: "Switch statement"
standard_library:
- name: "java.lang"
items:
- "String"
- "StringBuilder"
- "StringBuffer"
- "Integer"
- "Long"
- "Double"
- "Float"
- "Boolean"
- "Object"
- "Class"
- "System"
- "Thread"
- "Runnable"
- "Exception"
- "RuntimeException"
- name: "java.util"
items:
- "ArrayList"
- "LinkedList"
- "HashMap"
- "HashSet"
- "TreeMap"
- "TreeSet"
- "Collections"
- "Arrays"
- "List"
- "Map"
- "Set"
- "Iterator"
- name: "java.io"
items:
- "File"
- "FileReader"
- "FileWriter"
- "BufferedReader"
- "BufferedWriter"
- "InputStream"
- "OutputStream"
- "IOException"
- name: "java.nio"
items:
- "Files"
- "Paths"
- "Path"
- "ByteBuffer"
- "CharBuffer"
- name: "java.time"
items:
- "LocalDate"
- "LocalTime"
- "LocalDateTime"
- "ZonedDateTime"
- "Instant"
- "Duration"
- "Period"
naming_conventions:
- pattern: "^[A-Z]"
description: "Class names should use PascalCase"
- pattern: "^[a-z]"
description: "Method and variable names should use camelCase"
- pattern: "^[A-Z_]+$"
description: "Constants should use UPPER_SNAKE_CASE"
ranking:
relevance_weight: 0.4
frequency_weight: 0.3
recency_weight: 0.3