Skip to content

mikoto2000/lsp4snippet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lsp4snippet

Language server for snippets.

Features:

  • : textDocument/completion.
    • : load snippet from YAML file.
      • : single YAML file support.
      • : multi YAML file support.
      • : glob support.
    • : insert indent
    • : supply template if content is empty.
  • : file extension to file type mapping mechanism
  • : incremental synchronization

Usage:

java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dlog.level=ALL -noverify -Dfile.encoding=UTF-8 -Xmx1G -jar /PATH/TO/lsp4snippet-x.y.z.jar --snippet /PATH/TO/Configuration.yaml

Requirements:

  • OpenJDK 11 or higher

Configuration:

example:

snippets:
    javascript:
        - label: func
          description: function
          newText: |-
              function ${1:name}(${2:args}) {
                  ${3:content}
              }
        - label: if
          description: if statement
          newText: |-
              if (${1:condition}) {
                  ${2:expr}
              }
        - label: for
          description: for statement
          newText: |-
              for (${1:initial} : ${2:condition} : ${3:increment}) {
                  ${4:expr}
              }

License:

Copyright (c) 2019 mikoto2000

This program and the accompanying materials are made
available under the terms of the Eclipse Public License 2.0
which is available at https://www.eclipse.org/legal/epl-2.0/

Author:

mikoto2000 mikoto2000@gmail.com

About

language server for snippet.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages