Commit graph

749 commits

Author SHA1 Message Date
Martino Pilia
7053d468cc
Add API for custom LSP requests
Implement a function `ale#lsp_linter#SendRequest` that allows to send
custom LSP requests to an enabled LSP linter.

Resolves #2474
2019-05-31 17:58:27 +02:00
w0rp
4f02edc3f8
Merge pull request #2529 from maxwell-k/terraform_linter
Add a terraform linter
2019-05-29 23:28:50 +01:00
Sajjad Hashemian
8d8b295ef5 add pgformatter 2019-05-27 09:00:11 +04:30
Keith Maxwell
88fa0b9294 Add a terraform linter
This linter uses the check functionality built into terraform. ALE
already has a fixer using `terraform fmt` but this doesn't provide error
messages. ALE already has a linter using `tflint` but this requires an
extra application to be installed.

For example this linter will give a warning that ! is an illegal
character in the line below:

    variable "example" !{}

This linter runs the buffer through the command below and parses the
output:

    terraform fmt -no-color -check=true -

This commit includes a basic implementation, documentation and tests.
The only option is to control which executable is run.

Tested with:

    $ terraform -version
    Terraform v0.11.13
2019-05-23 15:49:02 +01:00
w0rp
3e3801e81e
Revert "Fix #2492 - Remove all Deoplete support for now"
This reverts commit 975cc7af8f.
2019-05-21 13:53:09 +01:00
Antoine Gagné
3b7c86e401 Add support for Erlang dialyzer (#2509)
* Add support for Erlang dialyzer
* Add an option to specify rebar3 profile

In doing so, the use of the `**` wildcard becomes unnecessary.
2019-05-19 21:16:17 +01:00
w0rp
e5ea809094
Close #2285 - Add a function for use with omnifunc 2019-05-17 00:57:52 +01:00
w0rp
975cc7af8f
Fix #2492 - Remove all Deoplete support for now 2019-05-16 20:11:42 +01:00
rliang
ab7e5b264f [linter] Add LSP support for LaTeX via texlab 2019-05-13 15:50:03 -03:00
w0rp
df90725c85
Support b:ale_completion_enabled for disabling it for some buffers 2019-05-11 17:19:45 +01:00
w0rp
edd3114394
Make it less likely people will do the wrong thing
Make it very clear in every single place that the setting for ALE's own
completion implementation is mentioned that you should not enable it if
you want to use ALE as a completion source for other plugins like
Deoplete.
2019-05-11 17:06:32 +01:00
w0rp
79e42fed14
#2403 - Make ale_disable_lsp apply consistently, and document it better 2019-05-10 13:42:41 +01:00
Sh3Rm4n
77c5802fc7 Fix typos in documentation 2019-05-09 13:49:44 +02:00
Kanenobu Mitsuru
c10da0e390 Add fixer for OCaml ocp-indent (#2436) 2019-05-07 18:50:26 +01:00
w0rp
5d65f93033
Merge pull request #2437 from robertjlooby/add-floskell
Add floskell for Haskell formatting
2019-05-01 22:43:44 +01:00
w0rp
2f3bce5a1d
Merge pull request #2448 from reedriley/master
Add support for Vim's tagstack to ALEGoToDefinition
2019-04-29 20:55:45 +01:00
Caleb Maclennan
69b7ec1c4c
Include plugin description in local help line
The recommended format for _vim's internal help files_ is "<tag> <for vim version> <last change>", (see `:help help-writing` but this format is not parsed the same way for plugins. For plugins the recommended format includes a description of the plugin such as "<tag> <description>". See `:help write-local-help` for the different template.
2019-04-29 09:48:48 +03:00
w0rp
01331266a8
Close #1753 - Implement minimum viable integration with Deoplete 2019-04-23 21:26:25 +01:00
Thibault Vatter
ce0b14979e Add a fixer for r based on the styler package (#2401)
* Add styler as a new fixer for R files
* Add to the list of supported tools
* Add documentation
2019-04-23 19:44:26 +01:00
Reed Riley
c36f3e78e4 Add support for Vim's tagstack to ALEGoToDefinition
fixes 1236
2019-04-19 23:10:55 -04:00
w0rp
59f8c35a2f
Fix #1930 - Finish ale_fix_on_save_ignore
* Implementation had a bug
* Documentation added
* Tests added
2019-04-16 13:44:43 +01:00
Rob Looby
99361b2ca9
Add floskell for Haskell formatting 2019-04-14 11:27:48 -05:00
Riley Martine
495bce32e9 Add support for latexindent (#2387) 2019-04-13 13:21:59 +01:00
w0rp
f0f0cc3c18
Merge pull request #2121 from hsanson/1996-add-support-for-eclipse-jdt-ls
WIP Fix 1996 - Add eclipse LSP support.
2019-04-13 12:48:20 +01:00
w0rp
784d1a9a62
Merge pull request #2394 from harttle/master
feat: fecs support for js/html/css lint and format
2019-04-13 12:35:52 +01:00
Jesse Harris
2ed53108c4 Linter for powershell syntax errors (#2413)
* Linter for powershell syntax errors
2019-04-13 12:24:56 +01:00
harttle
c820089c44 feat: fecs support for js/html/css lint and format
`fecs` is a lint tool for HTML/CSS/JavaScript,
see http://fecs.baidu.com for more options.
2019-04-11 16:24:58 +08:00
Horacio Sanson
f02e2ec54c Fix 1996 - Add eclipse LSP support. 2019-04-11 08:50:04 +09:00
Masashi Iizuka
4813165614 Add a linter for clojure using clj-kondo (#2377) 2019-04-10 20:59:58 +01:00
w0rp
2e8c8085a6
Close #2179 - Add support for gopls 2019-04-10 19:23:16 +01:00
Raphael Hoegger
81423701b0 Adding new linter "cookstyle" for chef recipes (Issue #1187) (#2362) 2019-04-10 18:52:52 +01:00
Dan Loman
abcefe7a6e [doc] Add swift support documentation (#2426)
* [doc] Add swift support documentation
* [doc] Add swift bullets in main help file
* [doc] Add to supported languages and tools txt file as well
* Ensure same name styling for help/readme files
2019-04-08 18:22:59 +01:00
w0rp
02af53b8b0
Document ale#Has 2019-04-07 16:29:55 +01:00
w0rp
cfffdab856
Sort the documented options 2019-04-02 09:31:00 +01:00
rhysd
6a29641872 Add g:ale_disable_lsp and b:ale_disable_lsp to disable linters powered by LSP 2019-03-30 15:29:17 +09:00
w0rp
e1e8f0dae1
Fix the table of contents 2019-03-29 15:36:11 +00:00
Jesse Harris
000c37e775 PSScriptAnalyzer (#2370)
* Added psscriptanalyzer
* Added exclusions and documentation
* Added PSScriptAnalyzer handler test
2019-03-29 15:25:55 +00:00
w0rp
442d672d8a
#2397 - disable elixir-ls by default, which can be CPU hungry 2019-03-29 14:19:13 +00:00
Antew
8ec9615400 Add support for elm-lsp 2019-03-21 02:55:49 -04:00
Adam Trepanier
a22ab78dd7 make options for credo configurable (#2337)
* Add credo --strict option

If a user sets 'let g:ale_elixir_credo_strict=1' it will run credo with
--strict instead of suggest.  The default (0) is to run as suggest.

* Added credo docs
2019-03-11 09:12:32 +00:00
w0rp
c6a6a37931
Update documentation for languagetool 2019-03-09 14:12:31 +00:00
w0rp
fd31987f23
Merge pull request #2327 from akshit-sharma/master
clang-format supported with nvcc (cuda files)
2019-03-08 21:36:43 +00:00
w0rp
413529f603
Fix #2326 - ALEComplete no longer replaces completeopt 2019-03-08 21:32:05 +00:00
w0rp
cf883aa5a8
#2132 - Document ale#command#Run 2019-03-05 14:07:38 +00:00
akshit-sharma
32dbf5942e fixed mismatched ToC and heading 2019-03-02 22:19:28 -07:00
akshit-sharma
163f0ab06e clang-format supported with nvcc (cuda files) 2019-03-02 21:39:44 -07:00
w0rp
89e5491862
Revert "#2132 Change (buffer, lines) fixer functions to (buffer, done, lines)"
This reverts commit f1ed654ca5.
2019-02-22 20:48:06 +00:00
w0rp
883978ece9
#2132 - Replace all uses of foo_callback with foo 2019-02-22 18:05:04 +00:00
w0rp
f53b25d256
#2132 - Implement project_root as a replacement for project_root_callback 2019-02-22 15:24:34 +00:00
w0rp
f8aeb5c5a4
#2132 - Make most foo_callback options work as foo 2019-02-22 00:35:53 +00:00
w0rp
ffa45fa3fb
#2132 - Implement deferred command handling for linters 2019-02-21 21:24:41 +00:00
mandreyel
90457fdb6b Fix typo in ale.txt 2019-02-18 09:33:03 +01:00
w0rp
3140abcd0c
Fix #2293 - Update linter option documentation
* The README now points to a valid helptag for linter options.
* The now very, very large part of the table of contents for linter and
  fixer options has been moved into a section so the initial table is
  smaller.
* Special linter or fixer options now lie beneath the general linter
  or fixer options.
2019-02-13 21:22:02 +00:00
w0rp
926ad47a49
#2132 - Implement deferred executable string handling for linters 2019-02-12 18:05:33 +00:00
w0rp
df9bee88f6
Rewrite the supported tools lists in new files 2019-02-11 22:07:52 +00:00
w0rp
6ebe24b5ff
Merge pull request #2268 from m-pilia/alex
Add settings for the Alex linter
2019-02-10 23:43:43 +00:00
Théo Cavignac
d072d2654c Supporting filtered jump (#2279)
* Support filtered jump based on loclist item type (E or W for now)
* Use flags to customize the behavior of ALENext and ALEPrevious
* Update <plug> bindings with flags
* Update documentation about ALENext and ALEPrevious
* Use ale#args#Parse in JumpWrap
2019-02-10 11:11:29 +00:00
Kevin Locke
a24f0b4d5f Support pylama for python (#2266)
* Add pylama for python
* Consolidate python traceback handling
2019-02-08 21:44:34 +00:00
Alvin Chan
1fb0de2a8e Add -relative option to ALESymbolSearch (#2255)
* Add `-relative` option to ALESymbolSearch
* Document the `-relative` option for ALEFindReferences and ALESymbolSearch
2019-02-08 19:43:04 +00:00
Francisco Lopes
b47a0c9519 Make Cypher linter dynamic 2019-02-06 20:29:58 -02:00
w0rp
c0c634c5ec
Merge pull request #2270 from oblitum/add-cypher-lint
linter/cypher: add cypher-lint
2019-02-06 22:04:47 +00:00
w0rp
81c73da3b9
#2132 - lint and fix with ale#command#Run
A new function is added here which will later be modified for public use
in linter and fixer callbacks. All linting and fixing now goes through
this new function, to prove that it works in all cases.
2019-02-06 22:00:11 +00:00
Francisco Lopes
626572a539 linter/cypher: add cypher-lint 2019-02-03 03:09:51 -02:00
Martino Pilia
771581a945
Add settings for the Alex linter
The executable for the Alex linter is currently hard-coded as 'alex',
which is an issue given the fact that it conflicts with the Haskell
lexer generator, whose executable is also called 'alex', has been around
a dozen years before the linter, and is packaged in the official
repositories of the major Linux distributions.

This commit adds options to use a local executable for the alex linter
(which is a node package), and an option to set a custom executable.

As side changes:
* The pattern in the alex handler is made more readable by turnig it
  into a very-magic regex.
* Alex handles plain text, markdown, and HTML. Specific flags for HTML
  and markdown are provided when instantiating the linters for the
  respective filetypes, while before those formats were treated as plain
  text.
2019-02-02 16:20:14 +01:00
Harrison Bachrach
17a2f554e3 Add initial ameba (crystal linter) support (#2174)
* Add initial ameba (crystal linter) support

Note that this depends on saved file as `ameba` does not have STDIN
support

* Fix formatting of crystal linter documentation
* Add tests for ameba executable customization
2019-01-27 16:01:42 +00:00
petpetpetpet
3c38fdb1bb Extend statusline interface (#2240)
* Extended statusline.vim to provide an efficient way to access the first errors,warnings,stylerrors,stylewarnings,etc from the loclist.
* Added documentation and help for the new API function.
2019-01-27 12:44:49 +00:00
TANIGUCHI Masaya
03b25dd39b Add textlint for tex (#2234) 2019-01-27 12:14:34 +00:00
Attila Maczak
d7ced31fe2 add cmake-format fixer support (#2244) 2019-01-27 11:45:57 +00:00
Niclas Åhdén
e46c17e8ef SugarSS support from PR 1967 (#2219)
* sugarss support + bonus naming Sass correctly
* cleanup + alphabetic ordering
2019-01-27 11:42:11 +00:00
w0rp
dd995d9aa9
Merge pull request #2235 from erydo/stack-ghc-options
Add g:haskell_stack_ghc_options like …_cabal_ghc_…
2019-01-27 10:20:46 +00:00
John Gentile
b8bf7b220d Add VHDL Support & Newer Verilog Linters (#2229)
* Added VHDL file support with ghdl compiler
* Update ghdl.vim
* Create vcom.vim
* Create xvhdl.vim
* Update xvlog.vim
* Added documentation for VHDL & Verilog linters
* Added tests to VHDL & Verilog linters
2019-01-27 09:46:33 +00:00
w0rp
91c1fc3bb3
Sort documentation entries alphabetically better 2019-01-27 09:32:39 +00:00
w0rp
6543d0e902
#2248 Mention tsserver as a JavaScript tool too 2019-01-26 22:02:21 +00:00
w0rp
a47deeae40
Merge pull request #2250 from m-pilia/bandit
Add bandit linter for Python
2019-01-26 21:41:40 +00:00
w0rp
452460b8cd
Merge pull request #2241 from bk2204/lsp-detect-hook
Add a hook to detect LSP project root
2019-01-26 19:40:45 +00:00
w0rp
cf14d0aa53
#2132 Unify temporary file management in command.vim 2019-01-26 19:33:52 +00:00
Martino Pilia
0a5de2b42b
Add bandit linter for Python 2019-01-26 11:48:03 +01:00
brian m. carlson
6fc016ad05
Add additional ways to detect LSP project root
Currently, we detect the linter root based on a variety of techniques.
However, these techniques are not foolproof. For example, clangd works
fine for many things without a compile_commands.json file, and Go
projects may be built outside of the GOPATH to take advantage of Go
1.11's automatic module support.

Add global and buffer-specific variables to allow the user to specify
the root, either as a string or a funcref. Make the funcrefs accept the
buffer number as an argument to make sure that they can function easily
in an asynchronous environment.

We define the global variable in the main plugin, since the LSP linter
code is not loaded unless required, and we want the variable to be able
to be read correctly by :ALEInfo regardless.
2019-01-26 04:46:41 +00:00
Robert Estelle
e273f678ff Add haskell_stack_ghc_options like …_cabal_ghc_…
Adds new option `g:haskell_stack_ghc_options` which passes options to
`stack ghc`. This is implemented similiarly to
`g:haskell_cabal_ghc_options`.
2019-01-22 09:46:08 -05:00
Andrey Popp
d0284f22ea Add textDocument/typeDefinition for LSP (#2226)
* Add textDocument/typeDefinition for LSP

Doc to spec https://microsoft.github.io/language-server-protocol/specification#textDocument_typeDefinition

This works like textDocument/definition but resolves a location of a
type of an expression under the cursor.

I'm not sure what to do with tsserver though.

* Fix passing column to LSP
* test_go_to_definition: wording
* Add tests for textDocument/typeDefinition
* Add docs for textDocument/typeDefinition
2019-01-21 23:06:28 +00:00
w0rp
a50e049e74
Mention raco in the list of supported tools 2019-01-14 20:35:23 +00:00
hokorobi
7f176390fc Support textlint for reStructuredText (#1978)
* Support textlint for reStructuredText
* Add linter test for textlint rst
2019-01-12 14:40:03 +00:00
TANIGUCHI Masaya
fabebb3a47 Add textlint for Asciidoc and add it to Fixers (#2193)
* Add textlint for asciidoc
* Add textlint --fix
2019-01-10 18:53:45 +00:00
Jerko Steiner
0fcd5e79a9 Add ability to manually trigger completion menu (#2177)
* Add ability to manually trigger completion menu
* Mention :ALEComplete in completion docs
* Add test for ALEComplete
2019-01-07 17:55:55 +00:00
Jerko Steiner
5bbe77101d Add support for bingo (#2165)
* Add support for https://github.com/saibing/bingo
* Add docs for ale-go-bingo
* Use go.mod when found
* Add test for bingo FindProjectRoot
* Simplify ale_linters#go#bingo#GetCommand
2019-01-05 19:12:55 +00:00
w0rp
08606b88d0
Clean up the new g:ale_shell code. Use it for Windows 2019-01-03 21:23:09 +00:00
w0rp
7919db0db5
Merge pull request #2167 from stegmanh/master
Add support for ale option to override default shell used by ale
2019-01-03 21:01:13 +00:00
Holden
5f613a5fd6 change ale to use value of g:ale_shell regardless of what it is 2019-01-02 19:05:51 -05:00
Holden
3ec20a730d address PR feedback by fixing docs and hardcoding bash to use -c on fish and pwsh environments 2018-12-28 12:35:57 -05:00
Holden
c499825a0b add tests for ale_shell option 2018-12-28 11:58:55 -05:00
w0rp
5345a5dd81
Merge pull request #2141 from benjaminjkraft/master
Add versions of ALEGoToDefinition that open in splits
2018-12-20 16:15:57 +00:00
Ben Kraft
73a204dd00 Add versions of ALEGoToDefinition that open in splits
This is just like `:ALEGoToDefinitionInTab`, only a (v)split instead of
a tab.  Fixes #2140.
2018-12-19 18:35:56 -05:00
w0rp
f1ed654ca5
#2132 Change (buffer, lines) fixer functions to (buffer, done, lines) 2018-12-18 11:13:28 +00:00
Justin Searls
2cfa09e02d Adds standardrb linter (#2133)
See: https://github.com/testdouble/standard

StandardRB is to RuboCop what StandardJS is to ESLint. This commit 
naively copies the RuboCop linter and fixer to point at the standardrb
executable. Any other adjustments are very minor (the only I can think 
of is that standardrb takes a `--fix` option instead of 
`--auto-correct`).

This raises a confusing point to me as both developer and a user: since
ale enables all linters by default, won't this run both RuboCop and 
StandardRB (the results of which will almost always be in conflict with
one another)? How does ale already solve for this for the similar case
of StandardJS and ESLint?
2018-12-10 14:02:32 -07:00
w0rp
39c892eff4
#1520 - Add an :ALEDocumentation for tsserver 2018-12-10 20:08:28 +00:00
Holden
57a04701c3 Merge branch 'master' of github.com:stegmanh/ale 2018-12-07 18:05:20 -05:00
Holden
cbc029b2b8 Add initial support for settings to overwrite ale shell 2018-12-07 18:04:28 -05:00
w0rp
3db564f774
Merge pull request #2061 from hsanson/1910-add-support-for-bibclean-fixer
Add bibclean fixer support
2018-12-06 20:26:04 +00:00
pmacosta
fdd37acc1f Add support for pydocstyle linter (#2085)
The linter can correctly parse pydocstyle output with any of the following
command-line options enabled: --explain, --source, --debug, and/or
--verbose
2018-12-06 11:27:03 -07:00
Oskar Grunning
2760cf7018 refactor sasslint linter (#2077)
Previous implementation required one to have sass-lint globally. This
allows you to have it locally, override the executable and add options.
2018-12-06 11:23:31 -07:00