summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md22
-rw-r--r--ale_linters/elm/elm_ls.vim37
-rw-r--r--ale_linters/elm/elm_lsp.vim22
-rw-r--r--autoload/ale/sign.vim28
-rw-r--r--doc/ale-elm.txt38
-rw-r--r--doc/ale.txt58
-rw-r--r--test/command_callback/test_elm_ls_command_callbacks.vader (renamed from test/command_callback/test_elm_lsp_command_callbacks.vader)12
7 files changed, 169 insertions, 48 deletions
diff --git a/README.md b/README.md
index fc7ac874..81c372c3 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Asynchronous Lint Engine [![Travis CI Build Status](https://travis-ci.com/w0rp/ale.svg?branch=master)](https://travis-ci.com/w0rp/ale) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/r0ef1xu8xjmik58d/branch/master?svg=true)](https://ci.appveyor.com/project/w0rp/ale) [![Join the chat at https://gitter.im/vim-ale/Lobby](https://badges.gitter.im/vim-ale/Lobby.svg)](https://gitter.im/vim-ale/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+# Asynchronous Lint Engine [![Travis CI Build Status](https://travis-ci.com/dense-analysis/ale.svg?branch=master)](https://travis-ci.com/dense-analysis/ale) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/r0ef1xu8xjmik58d/branch/master?svg=true)](https://ci.appveyor.com/project/dense-analysis/ale) [![Join the chat at https://gitter.im/vim-ale/Lobby](https://badges.gitter.im/vim-ale/Lobby.svg)](https://gitter.im/vim-ale/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![ALE Logo by Mark Grealish - https://www.bhalash.com/](https://user-images.githubusercontent.com/3518142/59195920-2c339500-8b85-11e9-9c22-f6b7f69637b8.jpg)
@@ -258,14 +258,14 @@ any other tools. Simply clone the plugin into your `pack` directory.
```bash
mkdir -p ~/.vim/pack/git-plugins/start
-git clone --depth 1 https://github.com/w0rp/ale.git ~/.vim/pack/git-plugins/start/ale
+git clone --depth 1 https://github.com/dense-analysis/ale.git ~/.vim/pack/git-plugins/start/ale
```
#### NeoVim on Unix
```bash
mkdir -p ~/.local/share/nvim/site/pack/git-plugins/start
-git clone --depth 1 https://github.com/w0rp/ale.git ~/.local/share/nvim/site/pack/git-plugins/start/ale
+git clone --depth 1 https://github.com/dense-analysis/ale.git ~/.local/share/nvim/site/pack/git-plugins/start/ale
```
#### Vim 8 on Windows
@@ -273,7 +273,7 @@ git clone --depth 1 https://github.com/w0rp/ale.git ~/.local/share/nvim/site/pac
```bash
# Run these commands in the "Git for Windows" Bash terminal
mkdir -p ~/vimfiles/pack/git-plugins/start
-git clone --depth 1 https://github.com/w0rp/ale.git ~/vimfiles/pack/git-plugins/start/ale
+git clone --depth 1 https://github.com/dense-analysis/ale.git ~/vimfiles/pack/git-plugins/start/ale
```
#### Generating Vim help files
@@ -304,7 +304,7 @@ You can run the following commands in your terminal to do so:
```bash
cd ~/.vim/bundle
-git clone https://github.com/w0rp/ale.git
+git clone https://github.com/dense-analysis/ale.git
```
<a name="installation-with-vundle"></a>
@@ -315,7 +315,7 @@ You can install this plugin using [Vundle](https://github.com/VundleVim/Vundle.v
by using the path on GitHub for this repository.
```vim
-Plugin 'w0rp/ale'
+Plugin 'dense-analysis/ale'
```
See the Vundle documentation for more information.
@@ -329,7 +329,7 @@ by adding the GitHub path for this repository to your `~/.vimrc`
and running `:PlugInstall`.
```vim
-Plug 'w0rp/ale'
+Plug 'dense-analysis/ale'
```
<a name="contributing"></a>
@@ -337,14 +337,14 @@ Plug 'w0rp/ale'
## 4. Contributing
If you would like to see support for more languages and tools, please
-[create an issue](https://github.com/w0rp/ale/issues)
-or [create a pull request](https://github.com/w0rp/ale/pulls).
+[create an issue](https://github.com/dense-analysis/ale/issues)
+or [create a pull request](https://github.com/dense-analysis/ale/pulls).
If your tool can read from stdin or you have code to suggest which is good,
support can be happily added for it.
If you are interested in the general direction of the project, check out the
-[wiki home page](https://github.com/w0rp/ale/wiki). The wiki includes a
-Roadmap for the future, and more.
+[wiki home page](https://github.com/dense-analysis/ale/wiki). The wiki includes
+a Roadmap for the future, and more.
If you'd liked to discuss the project more directly, check out the `#vim-ale` channel
on Freenode. Web chat is available [here](https://webchat.freenode.net/?channels=vim-ale).
diff --git a/ale_linters/elm/elm_ls.vim b/ale_linters/elm/elm_ls.vim
new file mode 100644
index 00000000..374ef8de
--- /dev/null
+++ b/ale_linters/elm/elm_ls.vim
@@ -0,0 +1,37 @@
+" Author: antew - https://github.com/antew
+" Description: elm-language-server integration for elm (diagnostics, formatting, and more)
+
+call ale#Set('elm_ls_executable', 'elm-language-server')
+call ale#Set('elm_ls_use_global', get(g:, 'ale_use_global_executables', 1))
+call ale#Set('elm_ls_elm_path', 'elm')
+call ale#Set('elm_ls_elm_format_path', 'elm-format')
+call ale#Set('elm_ls_elm_test_path', 'elm-test')
+
+function! elm_ls#GetRootDir(buffer) abort
+ let l:elm_json = ale#path#FindNearestFile(a:buffer, 'elm.json')
+
+ return !empty(l:elm_json) ? fnamemodify(l:elm_json, ':p:h') : ''
+endfunction
+
+function! elm_ls#GetOptions(buffer) abort
+ return {
+ \ 'runtime': 'node',
+ \ 'elmPath': ale#Var(a:buffer, 'elm_ls_elm_path'),
+ \ 'elmFormatPath': ale#Var(a:buffer, 'elm_ls_elm_format_path'),
+ \ 'elmTestPath': ale#Var(a:buffer, 'elm_ls_elm_test_path'),
+ \}
+endfunction
+
+call ale#linter#Define('elm', {
+\ 'name': 'elm_ls',
+\ 'lsp': 'stdio',
+\ 'executable': {b -> ale#node#FindExecutable(b, 'elm_ls', [
+\ 'node_modules/.bin/elm-language-server',
+\ 'node_modules/.bin/elm-lsp',
+\ 'elm-lsp'
+\ ])},
+\ 'command': '%e --stdio',
+\ 'project_root': function('elm_ls#GetRootDir'),
+\ 'language': 'elm',
+\ 'initialization_options': function('elm_ls#GetOptions')
+\})
diff --git a/ale_linters/elm/elm_lsp.vim b/ale_linters/elm/elm_lsp.vim
deleted file mode 100644
index 2259286f..00000000
--- a/ale_linters/elm/elm_lsp.vim
+++ /dev/null
@@ -1,22 +0,0 @@
-" Author: antew - https://github.com/antew
-" Description: LSP integration for elm, currently supports diagnostics (linting)
-
-call ale#Set('elm_lsp_executable', 'elm-lsp')
-call ale#Set('elm_lsp_use_global', get(g:, 'ale_use_global_executables', 0))
-
-function! elm_lsp#GetRootDir(buffer) abort
- let l:elm_json = ale#path#FindNearestFile(a:buffer, 'elm.json')
-
- return !empty(l:elm_json) ? fnamemodify(l:elm_json, ':p:h') : ''
-endfunction
-
-call ale#linter#Define('elm', {
-\ 'name': 'elm_lsp',
-\ 'lsp': 'stdio',
-\ 'executable': {b -> ale#node#FindExecutable(b, 'elm_lsp', [
-\ 'node_modules/.bin/elm-lsp',
-\ ])},
-\ 'command': '%e --stdio',
-\ 'project_root': function('elm_lsp#GetRootDir'),
-\ 'language': 'elm'
-\})
diff --git a/autoload/ale/sign.vim b/autoload/ale/sign.vim
index 7395b0e2..eb0dd1cd 100644
--- a/autoload/ale/sign.vim
+++ b/autoload/ale/sign.vim
@@ -82,6 +82,34 @@ execute 'sign define ALEInfoSign text=' . s:EscapeSignText(g:ale_sign_info)
\ . ' texthl=ALEInfoSign linehl=ALEInfoLine'
sign define ALEDummySign
+if has('nvim-0.3.2')
+ if !hlexists('ALEErrorSignLineNr')
+ highlight link ALEErrorSignLineNr CursorLineNr
+ endif
+
+ if !hlexists('ALEStyleErrorSignLineNr')
+ highlight link ALEStyleErrorSignLineNr CursorLineNr
+ endif
+
+ if !hlexists('ALEWarningSignLineNr')
+ highlight link ALEWarningSignLineNr CursorLineNr
+ endif
+
+ if !hlexists('ALEStyleWarningSignLineNr')
+ highlight link ALEStyleWarningSignLineNr CursorLineNr
+ endif
+
+ if !hlexists('ALEInfoSignLineNr')
+ highlight link ALEInfoSignLineNr CursorLineNr
+ endif
+
+ sign define ALEErrorSign numhl=ALEErrorSignLineNr
+ sign define ALEStyleErrorSign numhl=ALEStyleErrorSignLineNr
+ sign define ALEWarningSign numhl=ALEWarningSignLineNr
+ sign define ALEStyleWarningSign numhl=ALEStyleWarningSignLineNr
+ sign define ALEInfoSign numhl=ALEInfoSignLineNr
+endif
+
function! ale#sign#GetSignName(sublist) abort
let l:priority = g:ale#util#style_warning_priority
diff --git a/doc/ale-elm.txt b/doc/ale-elm.txt
index bb7a6132..823b53e1 100644
--- a/doc/ale-elm.txt
+++ b/doc/ale-elm.txt
@@ -29,20 +29,44 @@ g:ale_elm_format_options *g:ale_elm_format_options*
This variable can be set to pass additional options to elm-format.
===============================================================================
-elm-lsp *ale-elm-elm-lsp*
+elm-ls *ale-elm-elm-ls*
-g:ale_elm_lsp_executable *g:ale_elm_lsp_executable*
- *b:ale_elm_lsp_executable*
+g:ale_elm_ls_executable *g:ale_elm_ls_executable*
+ *b:ale_elm_ls_executable*
Type: |String|
- Default: `'elm-lsp'`
+ Default: `'elm-language-server'`
See |ale-integrations-local-executables|
-g:ale_elm_lsp_use_global *g:ale_elm_lsp_use_global*
- *b:ale_elm_lsp_use_global*
+g:ale_elm_ls_use_global *g:ale_elm_ls_use_global*
+ *b:ale_elm_ls_use_global*
Type: |Number|
- Default: `get(g:, 'ale_use_global_executables', 0)`
+ Default: `get(g:, 'ale_use_global_executables', 1)`
+
+ See |ale-integrations-local-executables|
+
+
+g:ale_elm_ls_elm_path *g:ale_elm_ls_elm_path*
+ *b:ale_elm_ls_elm_path*
+ Type: |String|
+ Default: `'elm'`
+
+ See |ale-integrations-local-executables|
+
+
+g:ale_elm_ls_elm_format_path *g:ale_elm_ls_elm_format_path*
+ *b:ale_elm_ls_elm_format_path*
+ Type: |String|
+ Default: `'elm-format'`
+
+ See |ale-integrations-local-executables|
+
+
+g:ale_elm_ls_elm_test_path *g:ale_elm_ls_elm_test_path*
+ *b:ale_elm_ls_elm_test_path*
+ Type: |String|
+ Default: `'elm-test'`
See |ale-integrations-local-executables|
diff --git a/doc/ale.txt b/doc/ale.txt
index 8e32c911..5541236f 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -1426,6 +1426,15 @@ g:ale_set_signs *g:ale_set_signs*
|ALEWarningLine| - All items with `'type': 'W'`
|ALEInfoLine| - All items with `'type': 'I'`
+ With Neovim 0.3.2 or higher, ALE uses `numhl` option to highlight 'number'
+ column. It uses the following highlight groups.
+
+ |ALEErrorSignLineNr| - Items with `'type': 'E'`
+ |ALEWarningSignLineNr| - Items with `'type': 'W'`
+ |ALEInfoSignLineNr| - Items with `'type': 'I'`
+ |ALEStyleErrorSignLineNr| - Items with `'type': 'E'` and `'sub_type': 'style'`
+ |ALEStyleWarningSignLineNr| - Items with `'type': 'W'` and `'sub_type': 'style'`
+
The markers for the highlights can be customized with the following options:
|g:ale_sign_error|
@@ -1710,6 +1719,15 @@ ALEErrorSign *ALEErrorSign*
The highlight for error signs. See |g:ale_set_signs|.
+ALEErrorSignLineNr *ALEErrorSignLineNr*
+
+ Default: `highlight link ALEErrorSignLineNr CursorLineNr`
+
+ The highlight for error signs. See |g:ale_set_signs|.
+
+ NOTE: This highlight is only available on Neovim 0.3.2 or higher.
+
+
ALEInfo *ALEInfo.*
*ALEInfo-highlight*
Default: `highlight link ALEInfo ALEWarning`
@@ -1734,6 +1752,15 @@ ALEInfoLine *ALEInfoLine*
See |g:ale_set_signs| and |g:ale_set_highlights|.
+ALEInfoSignLineNr *ALEInfoSignLineNr*
+
+ Default: `highlight link ALEInfoSignLineNr CursorLineNr`
+
+ The highlight for error signs. See |g:ale_set_signs|.
+
+ NOTE: This highlight is only available on Neovim 0.3.2 or higher.
+
+
ALEStyleError *ALEStyleError*
Default: `highlight link ALEStyleError ALEError`
@@ -1748,6 +1775,15 @@ ALEStyleErrorSign *ALEStyleErrorSign*
The highlight for style error signs. See |g:ale_set_signs|.
+ALEStyleErrorSignLineNr *ALEStyleErrorSignLineNr*
+
+ Default: `highlight link ALEStyleErrorSignLineNr CursorLineNr`
+
+ The highlight for error signs. See |g:ale_set_signs|.
+
+ NOTE: This highlight is only available on Neovim 0.3.2 or higher.
+
+
ALEStyleWarning *ALEStyleWarning*
Default: `highlight link ALEStyleWarning ALEError`
@@ -1762,6 +1798,15 @@ ALEStyleWarningSign *ALEStyleWarningSign*
The highlight for style warning signs. See |g:ale_set_signs|.
+ALEStyleWarningSignLineNr *ALEStyleWarningSignLineNr*
+
+ Default: `highlight link ALEStyleWarningSignLineNr CursorLineNr`
+
+ The highlight for error signs. See |g:ale_set_signs|.
+
+ NOTE: This highlight is only available on Neovim 0.3.2 or higher.
+
+
ALEVirtualTextError *ALEVirtualTextError*
Default: `highlight link ALEVirtualTextError ALEError`
@@ -1821,6 +1866,15 @@ ALEWarningSign *ALEWarningSign*
The highlight for warning signs. See |g:ale_set_signs|.
+ALEWarningSignLineNr *ALEWarningSignLineNr*
+
+ Default: `highlight link ALEWarningSignLineNr CursorLineNr`
+
+ The highlight for error signs. See |g:ale_set_signs|.
+
+ NOTE: This highlight is only available on Neovim 0.3.2 or higher.
+
+
===============================================================================
7. Linter/Fixer Options *ale-integration-options*
@@ -2003,7 +2057,7 @@ documented in additional help files.
credo.................................|ale-elixir-credo|
elm.....................................|ale-elm-options|
elm-format............................|ale-elm-elm-format|
- elm-lsp...............................|ale-elm-elm-lsp|
+ elm-ls................................|ale-elm-elm-ls|
elm-make..............................|ale-elm-elm-make|
erlang..................................|ale-erlang-options|
dialyzer..............................|ale-erlang-dialyzer|
@@ -3371,7 +3425,7 @@ snazzy looking ale glass logo. Cheers, Mark!
11. Contact *ale-contact*
If you like this plugin, and wish to get in touch, check out the GitHub
-page for issues and more at https://github.com/w0rp/ale
+page for issues and more at https://github.com/dense-analysis/ale
If you wish to contact the author of this plugin directly, please feel
free to send an email to devw0rp@gmail.com.
diff --git a/test/command_callback/test_elm_lsp_command_callbacks.vader b/test/command_callback/test_elm_ls_command_callbacks.vader
index d06ef134..3e1d5fbf 100644
--- a/test/command_callback/test_elm_lsp_command_callbacks.vader
+++ b/test/command_callback/test_elm_ls_command_callbacks.vader
@@ -1,5 +1,5 @@
Before:
- call ale#assert#SetUpLinterTest('elm', 'elm_lsp')
+ call ale#assert#SetUpLinterTest('elm', 'elm_ls')
After:
call ale#assert#TearDownLinterTest()
@@ -7,7 +7,7 @@ After:
Execute(The default executable path should be correct):
call ale#test#SetFilename('../elm-test-files/newapp/src/Main.elm')
- AssertLinter 'elm-lsp', ale#Escape('elm-lsp') . ' --stdio'
+ AssertLinter 'elm-language-server', ale#Escape('elm-language-server') . ' --stdio'
Execute(The project root should be detected correctly):
AssertLSPProject ''
@@ -19,11 +19,11 @@ Execute(The project root should be detected correctly):
Execute(Should let users configure a global executable and override local paths):
call ale#test#SetFilename('../elm-test-files/newapp/src/Main.elm')
- let g:ale_elm_lsp_executable = '/path/to/custom/elm-lsp'
- let g:ale_elm_lsp_use_global = 1
+ let g:ale_elm_ls_executable = '/path/to/custom/elm-language-server'
+ let g:ale_elm_ls_use_global = 1
- AssertLinter '/path/to/custom/elm-lsp',
- \ ale#Escape('/path/to/custom/elm-lsp') . ' --stdio'
+ AssertLinter '/path/to/custom/elm-language-server',
+ \ ale#Escape('/path/to/custom/elm-language-server') . ' --stdio'
Execute(The language should be correct):
AssertLSPLanguage 'elm'