feat: elm support
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
"coc.preferences.formatOnSaveFiletypes": [
|
"coc.preferences.formatOnSaveFiletypes": [
|
||||||
"css",
|
"css",
|
||||||
"dockerfile",
|
"dockerfile",
|
||||||
|
"elm",
|
||||||
"html",
|
"html",
|
||||||
"javascript",
|
"javascript",
|
||||||
"javascriptreact",
|
"javascriptreact",
|
||||||
@@ -38,6 +39,17 @@
|
|||||||
"filetypes": ["tf", "terraform"],
|
"filetypes": ["tf", "terraform"],
|
||||||
"initializationOptions": {},
|
"initializationOptions": {},
|
||||||
"settings": {}
|
"settings": {}
|
||||||
|
},
|
||||||
|
"elmLS": {
|
||||||
|
"command": "elm-language-server",
|
||||||
|
"filetypes": ["elm"],
|
||||||
|
"rootPatterns": ["elm.json"],
|
||||||
|
"initializationOptions": {
|
||||||
|
"elmPath": "elm",
|
||||||
|
"elmFormatPath": "elm-format",
|
||||||
|
"elmTestPath": "elm-test",
|
||||||
|
"elmAnalyseTrigger": "change"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ Plug 'vim-airline/vim-airline-themes'
|
|||||||
|
|
||||||
" Enable caching of syntax highlighting groups
|
" Enable caching of syntax highlighting groups
|
||||||
let g:airline_highlighting_cache = 1
|
let g:airline_highlighting_cache = 1
|
||||||
|
|
||||||
" Enable tabline
|
" Enable tabline
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
let g:airline#extensions#tabline#left_sep = ' '
|
let g:airline#extensions#tabline#left_sep = ' '
|
||||||
@@ -87,6 +87,9 @@ Plug 'junegunn/rainbow_parentheses.vim'
|
|||||||
Plug 'unblevable/quick-scope'
|
Plug 'unblevable/quick-scope'
|
||||||
Plug 'ntpeters/vim-better-whitespace'
|
Plug 'ntpeters/vim-better-whitespace'
|
||||||
|
|
||||||
|
" heuristic whitepsace
|
||||||
|
Plug 'tpope/vim-sleuth'
|
||||||
|
|
||||||
" better motion
|
" better motion
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'justinmk/vim-sneak'
|
Plug 'justinmk/vim-sneak'
|
||||||
@@ -162,6 +165,10 @@ Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
|
|||||||
\ ]
|
\ ]
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
" elm
|
||||||
|
Plug 'andys8/vim-elm-syntax'
|
||||||
|
|
||||||
|
|
||||||
" debugger
|
" debugger
|
||||||
Plug 'puremourning/vimspector'
|
Plug 'puremourning/vimspector'
|
||||||
" {{{
|
" {{{
|
||||||
|
|||||||
@@ -2,5 +2,40 @@
|
|||||||
source "$(dirname $0)/utils.sh"
|
source "$(dirname $0)/utils.sh"
|
||||||
|
|
||||||
if not_installed "elm"; then
|
if not_installed "elm"; then
|
||||||
npm install -g elm
|
# Download the 0.19.1 binary for Linux.
|
||||||
|
#
|
||||||
|
# +-----------+----------------------+
|
||||||
|
# | FLAG | MEANING |
|
||||||
|
# +-----------+----------------------+
|
||||||
|
# | -L | follow redirects |
|
||||||
|
# | -o elm.gz | name the file elm.gz |
|
||||||
|
# +-----------+----------------------+
|
||||||
|
#
|
||||||
|
curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz
|
||||||
|
|
||||||
|
# There should now be a file named `elm.gz` on your Desktop.
|
||||||
|
#
|
||||||
|
# The downloaded file is compressed to make it faster to download.
|
||||||
|
# This next command decompresses it, replacing `elm.gz` with `elm`.
|
||||||
|
#
|
||||||
|
gunzip elm.gz
|
||||||
|
|
||||||
|
# There should now be a file named `elm` on your Desktop!
|
||||||
|
#
|
||||||
|
# Every file has "permissions" about whether it can be read, written, or executed.
|
||||||
|
# So before we use this file, we need to mark this file as executable:
|
||||||
|
#
|
||||||
|
chmod +x elm
|
||||||
|
|
||||||
|
# The `elm` file is now executable. That means running `~/Desktop/elm --help`
|
||||||
|
# should work. Saying `./elm --help` works the same.
|
||||||
|
#
|
||||||
|
# But we want to be able to say `elm --help` without specifying the full file
|
||||||
|
# path every time. We can do this by moving the `elm` binary to one of the
|
||||||
|
# directories listed in your `PATH` environment variable:
|
||||||
|
#
|
||||||
|
sudo mv elm /usr/local/bin/
|
||||||
|
rm {elm,elm.gz}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
npm install -g @elm-tooling/elm-language-server elm-format elm-test
|
||||||
|
|||||||
Reference in New Issue
Block a user