Skip to content

Instantly share code, notes, and snippets.

@appledelhi
Created April 3, 2019 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save appledelhi/c2adc3e6cadba726dd417a8d659be84e to your computer and use it in GitHub Desktop.
Save appledelhi/c2adc3e6cadba726dd417a8d659be84e to your computer and use it in GitHub Desktop.
emacs lsp vls config
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "~/.vscode/extensions/octref.vetur-0.18.0/server/bin/vls")
:major-modes '(web-mode)
:ignore-messages '("readFile .*? requested by Vue but content not available")
:initialization-options (lambda ()
'(:vetur
(:completion
(:autoImport t :useScaffoldSnippets t :tagCasing "kebab")
:grammar
(:customBlocks
(:docs "md" :i18n "json"))
:validation
(:template t :style t :script t)
:format
(:options
(:tabSize 2 :useTabs :json-false)
:defaultFormatter
(:html "prettyhtml" :css "prettier" :postcss "prettier" :scss "prettier" :less "prettier" :stylus "stylus-supremacy" :js "prettier" :ts "prettier")
:defaultFormatterOptions
(:js-beautify-html
(:wrap_attributes "force-expand-multiline")
:prettyhtml
(:printWidth 100 :singleQuote :json-false :wrapAttributes :json-false :sortAttributes :json-false))
:styleInitialIndent :json-false :scriptInitialIndent :json-false)
:trace
(:server "verbose")
:dev
(:vlsPath ""))
))
:initialized-fn 'my-lsp-set-cfg
:server-id 'vls))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment