Skip to content

Instantly share code, notes, and snippets.

View x-ji's full-sized avatar

Xiang Ji x-ji

View GitHub Profile
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
# In `dotspacemacs/user-config`:
(add-hook 'elixir-mode-hook
(lambda ()
(add-hook 'before-save-hook #'lsp-format-buffer nil t)))
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
# In dotspacemacs/user-config
(add-hook 'vue-mode-hook
(lambda ()
(add-hook 'before-save-hook #'prettier-js nil t)))
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
# In `dotspacemacs/layers`:
(elixir :variables
elixir-backend 'lsp
elixir-ls-path "path-to-elixir-ls/release-1.9.0"
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
# In `dotspacemacs/layers`:
lsp
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
(lsp :variables
lsp-enable-file-watchers nil
)
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
# In `dotspacemacs/user-config`:
(add-hook 'elixir-mode-hook
(lambda ()
(add-hook 'before-save-hook #'lsp-format-buffer nil t)))
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
# In `dotspacemacs/layers`
(vue :variables
vue-backend 'lsp)
# Depends on whether you already configured this variable in the `javascript` layer
(node :variable node-add-modules-path)
@x-ji
x-ji / Markdium-Shell.sh
Created October 18, 2019 14:48
Markdium-Language Server Protocol
# Folder for private layers
cd ~/.emacs.d/private
git clone git@github.com:thanhvg/vue.git
# Install the necessary tools manually
# vue-language-server is the language server developed by vetur
npm install -g eslint prettier vue-language-server
@x-ji
x-ji / Markdium-text.txt
Created October 18, 2019 14:48
Markdium-Language Server Protocol
((elixir-mode
(elixir-ls-path . "path-to-elixir-ls/release-1.8.1")))
@x-ji
x-ji / Markdium-Shell.sh
Created October 18, 2019 14:48
Markdium-Language Server Protocol
git clone git@github.com:elixir-lsp/elixir-ls.git
cd elixir-ls
mix compile
# For example, when the target Elixir version is 1.9.0
mix elixir_ls.release -o release-1.9.0