Commit graph

1126 commits

Author SHA1 Message Date
w0rp
b32fdfe816
#2132 Implement deferred objects for ale#command#Run 2019-02-08 08:41:38 +00:00
w0rp
19cc724807
Add a function for parsing command args 2019-02-07 18:10:34 +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
w0rp
3e11cbd18d
Update syntax checking
* Line continuation characters should be on the same lines.
* .vim file line indentation should be a multiple of 4.
2019-02-06 18:05:13 +00:00
Alvin Chan
70b95f16c3 Replace normal with normal! 2019-02-05 16:37:26 -08:00
Alvin Chan
9f63bec12c Remove the redraw since it's implicit with the zz 2019-02-05 16:31:02 -08:00
Alvin Chan
7ce481c8f6 Center the line within the viewport after a jump 2019-02-05 16:27:13 -08:00
Alvin Chan
a4ed9a1c35 Force Vim to redraw after ale#util#Open 2019-02-05 16:13:58 -08:00
Tadeas Uhlir
37daedafed Fix error when parsing compile_commands for c langs
This little error caused that when parsing compile_commands json, the
filename was used to fetch entries in directory dictionary, hence, when
adding new json commands, it never found anything in dir_lookup and
instead rewrote the previous entry. Hence, the dir_lookup always
contained list of only one compile_command per directory instead of all
compile_commands for given directory.
2019-02-04 16:50:46 -05: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
Aiden Scandella
de29ff26ff
Respect python black fixer configuration file
Similar to other linters/fixers, by default change to the directory of
the file being fixed before invoking `black`, which allows the tool to
read project-specific configuration (pyproject.toml)

Fixes #2218
2019-01-30 14:44:38 -08:00
w0rp
08d3523962
Merge pull request #2228 from Nomad145/ktlint
Add ktlint Fixer Support
2019-01-27 15:55:13 +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
w0rp
79135dfe13
Fix #2192 - Handle more ignore-pattern messages for ESLint 2019-01-27 12:08:39 +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
3ac12b6939
Fix #2216 - Tolerate versions without path numbers 2019-01-27 10:56:08 +00:00
Alvin Chan
6288c8b08e Use relative paths when previewing file locations (#2238)
* Use relative paths when previewing file locations

Example: ALEFindReferences -relative
2019-01-27 10:18:20 +00:00
w0rp
20b9dfdb4a
Fix #2195 - Handle the command key being missing 2019-01-27 09:12:59 +00:00
w0rp
6e9040da75
Merge pull request #2131 from 0mco/master
Parse more C/C++ compiler options
2019-01-26 22:10:48 +00:00
w0rp
0a9dc7b4ba
Merge pull request #2245 from andrewimeson/adi/add-ksh-support
Add better ksh support
2019-01-26 22:04:29 +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
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
Andrew Imeson
a6de3f3727
Add better detection for KornShell/ksh 2019-01-24 14:14:49 -05:00
Louis Xu
8037f472ef Parse more C/C++ compiler options 2019-01-24 09:44:52 +08:00
Alvin Chan
f12d312aa4 Add babylon as default Prettier parser (#2220)
* Mimic Prettier's default parser by setting it to `babylon`
* Add tests to check default Prettier `parser`
* Set Prettier default parser based on version
* Update the comment to explain the reason for an explicit default
2019-01-22 10:24:15 +00: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
a4932679b5
Merge pull request #2224 from andreypopp/andreypopp/lsp-hover-fix-column
Adjust column to be 0-based for LSP messages
2019-01-21 21:11:02 +00:00
Andrey Popp
bcf63eea96 Request LSP completion for the next col after the cursor 2019-01-21 23:19:47 +03:00
Andrey Popp
2e85eed756 Fix ale#lsp#message#* to convert column to 0-based
This is what LSP specifies.
2019-01-21 17:40:33 +03:00
Michael Phillips
bd1e639681 Add ktlint fixer support. 2019-01-20 19:39:47 -06:00
Andrey Popp
d6d6fcf928 End position in LSP range is exclusive
From LSP spec:

> A range in a text document expressed as (zero-based) start and end
> positions. A range is comparable to a selection in an editor. Therefore
> the end position is exclusive.
2019-01-19 18:50:21 +03:00
Jason Kim
8b0879212f Improve location list behavior on split windows of same buffer. 2019-01-16 17:15:47 -08:00
w0rp
c0b2090fbb
#2132 Move CreateTemporaryFileForJob calls into FormatCommand 2019-01-12 18:34:26 +00:00
w0rp
6644563949
#2132 Remove the need for the hidden add_newline option by tweaking the flow command 2019-01-12 13:14:29 +00:00
w0rp
d8a53cc7a5
Merge pull request #2191 from davidvandebunte/fixCompDbDir
bugfix: c.vim: Pull build directory from compilation database
2019-01-10 18:59:13 +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
François-Xavier Carton
4bbb10b46a Cflags parser: fix special chars matching algorithm 2019-01-09 16:53:36 +01:00
David VandeBunte
4f72023e16 bugfix: c.vim: Pull build directory from compilation database
The LLVM compiler database JSON already includes a directory where the
build was performed:
https://clang.llvm.org/docs/JSONCompilationDatabase.html

Prefer this directory for fixing relative paths in compiler include
arguments in ale#c#ParseCFlags.

Without this change, users cannot create a symlink to their compilation
database as suggested in the LLVM tooling setup instructions:
https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html
2019-01-08 19:09:02 -06:00
w0rp
84475ff6f1
Merge pull request #2189 from jeremija/jeremija/manual-autocomplete-wo-prefix
Manually trigger autocomplete even when prefix is ""
2019-01-08 14:27:04 +00:00
Jerko Steiner
b1b05e6e66 Optimize ale#completion#Filter when prefix is "" 2019-01-08 15:10:03 +01:00
Jerko Steiner
9bcf8a2336 Manually trigger autocomplete even when prefix is "" 2019-01-08 12:57:17 +01:00
w0rp
1d7acad891
Merge pull request #2161 from guill/compile_database_perf
Improve perf for compile dbs in large projects
2019-01-08 09:29:07 +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
Jacob Segal
cb0a5c7a36 Improve perf for compile dbs in large projects
When using a compilation database (compile_commands.json) in very large
projects, significant delays would occur when changing files --
particularly those that happened to be far down the db. Rather than
iterating over the whole list every time, we now build up a lookup table
based on the tail of the filename (and tail of the directory for
widening searches) and iterate over the much smaller list of compile
commands for files with the given name.

Test metrics (from compile_database_perf/test.sh) show a 90% performance
improvement -- from 25 seconds to 2.5 seconds per run.
2019-01-06 00:41:57 -08: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
w0rp
1b264b8662
Merge pull request #2168 from fx-carton/master
Fix CFLAGS & Makefile issues
2019-01-03 20:37:16 +00:00
w0rp
a1654cfb58
Merge pull request #1988 from mdtusz/pipenv-black
Add support for black usage with pipenv
2019-01-03 20:32:36 +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
Alvin Chan
f534db1ef9 Replace trim with substitute for compatibility (Vim <8.0.1630) 2018-12-31 14:54:36 -07:00
Alvin Chan
24fda01a0e Add associated line text on ALEFindReferences results for TypeScript 2018-12-31 14:29:42 -07:00
François-Xavier Carton
f7c4c403eb Fix CFLAGS parsing
Split by space instead of dash.
This prevents incorrect parsing where space-separated arguments are
merged (in particular, .c or .o files were appended to -I or -D
arguments).

Handle shell escape: quotes and escaped quotes \" and shell
substitutions are recognised. This is done by verifying that no special
character (" ' ` ()) has not a matching character.

Fixes #2049
2018-12-29 12:16:22 +01: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
Miklós Tusz
48057407ec Fixup tests for auto-pipenv 2018-12-21 20:28:17 -08:00
Miklós Tusz
4bf260e953 Remove unnecessary exe check for black 2018-12-21 20:07:14 -08:00
Miklós Tusz
6619e1ac53 Add auto_pipenv config for black
Added ability to set `python_black_auto_pipenv` to allow for usage
of a local pipenv black executable.
2018-12-21 20:07:14 -08: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
w0rp
9a3be907ea
Close #2152 - Use ale_javascript_standard_options for fixing files too 2018-12-18 09:28:55 +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
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
Horacio Sanson
9e97a6914e Add bibclen fixer support
Closes #1910
2018-12-01 15:05:18 +09:00
Ryan
1d4f985538
Merge pull request #2110 from w0rp/lazy-clipboard
Optimize :ALEIntoToClipboard to only copy to clipboard once
2018-11-30 09:39:57 -06:00
Bjorn Neergaard
d2b0ae8108 Merge branch 'master' into sridhars 2018-11-29 14:57:35 -07:00
Bjorn Neergaard
fcd5e18a99 Use single quotes to satisfy vint 2018-11-29 14:35:54 -07:00
Bjorn Neergaard
121ecf9262 Only set the unnamed register at the end of :ALEInfoToClipboard
This fixes performance problems in Neovim, where every character results
in spawning a new clipboard-tool process.

Behaviour is not similarly pathological in Vim, but it still results in
an unnecessary amount of register churn.
2018-11-29 13:48:17 -07:00
w0rp
6746cb3333
Fixing linter problems 2018-11-25 13:57:13 +00:00
Björn Linse
d18511f322 Don't hardcode the namespace id for virtual text
This makes collisions with other plugins less likely.
2018-11-25 11:06:55 +01:00
w0rp
a05a16b109
Merge pull request #2070 from meain/fixer-prettier-yaml
add yaml to registry for prettier
2018-11-19 20:22:35 +00:00
w0rp
e74d43fb25
Fix #2084 - Disable mix by default, as it causes too many problems 2018-11-19 20:14:30 +00:00
Jacob Segal
1b3fa9828c Fix bug where last c flag was ignored
There is currently a check that tries to prevent c-flags that contain
'-' in them from being unintentionally split and included in the list of
commands. For example, we wouldn't want "-fno-exceptions " to appear as
"-fno" and "-exceptions ". The way this check was done was by making sure
the last character of the split string was a space.

This meant that the very last option to appear in the compile command
was ignored (as it doesn't end with a space). This fix explicitly skips
the ends-with-space check on the last option in the command-line.

This isn't the best fix. Really we should be using the same
argument-processing rules as a shell would rather than just splitting on
'-'. That's a much larger and more complicated change though.
2018-11-17 04:04:39 -08:00
w0rp
dd7b2188ab
Add style highlights for virtualtext and document all of them 2018-11-14 16:44:53 +00:00
jamestthompson3
f64f9aba16 Add specific highlight groups for virtualtext (#2071) 2018-11-14 16:21:35 +00:00
Abin Simon
d045de2618 add yaml to registry for prettier 2018-11-12 12:43:08 +05:30
w0rp
7dd460303d
Merge pull request #2060 from meain/fixer-pretty-html
Add prettier to html formatters
2018-11-11 09:57:48 +00:00
w0rp
b96105bebb
Merge pull request #2056 from luan/virtualtext
Add support for nvim's virtualtext on cursor
2018-11-11 09:17:53 +00:00
w0rp
90f2875f29
Merge pull request #2053 from andreypopp/fix-ocamlformat-stdin-stdout
Make ocamlformat work without temporary files
2018-11-10 10:57:11 +00:00
w0rp
f8d3ffb60e
Fix #1960 - Do not fix files on :wq 2018-11-10 10:06:56 +00:00
w0rp
e4faf82cab
Enable ESLint for Vue files by default 2018-11-08 09:19:02 +00:00
Luan Santos
ba9b056a57
Fix info text
Removed ale_virualtext_prefix from debugging since it's not requried for
the functionality to work.
Sorted debugging info to make the list easier to navigate/diff.
2018-11-06 22:38:47 -08:00
Luan Santos
f58a5cba05
Move virtualtext handling to own file
This allows cursor and virtualtext to be independently autoloaded.
2018-11-06 22:31:35 -08:00
Abin Simon
ed8104b6ab Add prettier to html formatters 2018-11-07 12:00:59 +05:30
w0rp
25068de91d
Fix incorrect warning match
Co-Authored-By: luan <github@luan.sh>
2018-11-06 11:31:17 -08:00
Luan Santos
c41dbe2ba9
Add support for nvim's virtualtext on cursor
- Add g:ale_virtualtext_cursor boolean to enable/disable it
- Add g:ale_virtualtext_prefix to configure what prefix to use (default:
'> ')
- Requires neovim 0.3.2's unreleased API `nvim_buf_set_virtual_text`
2018-11-05 22:45:40 -08:00
Andrey Popp
b9fb62a4cd Make ocamlformat work without temporary files
Problem: ocamlformat is configured to format files in-place and thus go
via creating a temporary file for that. Because temporary file resides
in a different directory ocamlformat can't find `.ocamlformat`
configuration files in an original location of source files.

Solution: ocamlformat since version 0.8 can read sources on stdin and
spur result on stdout. We reconfigure ocamlformat to use a simpler
interface.
2018-11-04 20:32:56 +03:00
Jon Parise
b25794e81b elixir-ls now recognizes umbrella projects
Previously, elixir-ls would treat each sub-project within an umbrella as
standalone, which isn't desirable from a language server perspective.

Added ale#handlers#elixir#FindMixUmbrellaRoot, which locates the current
project's root and then continues searching upwards for a potential
umbrella project root. This literally looks just two levels up to keep
things simple while keeping in line with Elixir project conventions.

Use this new function to determine elixir-ls's LSP project root.
2018-11-04 06:40:25 -08:00
w0rp
5f206d900e
Merge pull request #2035 from jparise/lsp_config_callback
Add a `lsp_config_callback` linter option
2018-10-31 16:24:11 +00:00
w0rp
4ef2c81e95
Implement LSP symbol search 2018-10-31 16:13:31 +00:00
Jon Parise
2ac9e2a29e Only send LSP config updates when the dict changes
Each LSP connection now stores its configuration dictionary. It is
initially empty (`{}`) and is updated each time the LSP connection is
started. When a change is detected, the workspace/didChangeConfiguration
message is sent to the LSP servers with the updated configuration.
2018-10-31 08:42:42 -07:00
Jon Parise
b5a7593577 Add a lsp_config_callback linter option
This is the callback-based variant of the existing `lsp_config` linter
option. It serves the same purpose but can be used when more complicated
processing is needed.

`lsp_config` and `lsp_config_callback` are mutually exclusive options;
if both an given, a linter preprocessing error will be raised.

The runtime logic has been wrapped in `ale#lsp_linter#GetConfig` for
convenience, similar to `ale#lsp_linter#GetOptions`.

This also adds documentation and an `AssertLSPConfig` test function for
completeness.
2018-10-31 08:42:42 -07:00
Max Hung
be02ba4ed7 Use correct exclusion flag in rubocop fixer 2018-10-31 11:18:07 +13:00
w0rp
caac5c93d6
#2017 Add support for display results from other sources 2018-10-29 18:28:28 +00:00
w0rp
2846e86217
#2017 Simplify lint cycles for supporting other sources later 2018-10-29 11:29:21 +00:00
Justin Powell
90048ac933 fix missing (s) on rubocop exclusion flag 2018-10-26 11:47:28 -05:00
Justin Powell
b7e0321890 closes #1580 add force exclusion to rubocop fixer 2018-10-26 10:40:02 -05:00
Dan Aloni
aa0203320b Rust checker: allow secondary spans to be ignored (#1696)
* Rust checker: allow secondary spans to be ignored
* test/handler/test_rust_handler.vader: Add tests for g:ale_rust_ignore_secondary_spans
2018-10-26 09:38:20 +01:00
w0rp
77aacf0c91
#927 Allow b:ale_linter_aliases to be set to a String 2018-10-26 09:22:52 +01:00
w0rp
320c74ce1a
Merge pull request #1958 from Garland-g/perl6
Add Perl6 support via 'perl6 -c'
2018-10-25 15:38:33 +01:00
w0rp
3e65e85178
Merge pull request #2016 from terryding77/master
fix: change google_java_format_* to java_google_java_format_*
2018-10-25 15:34:31 +01:00
Anthony Poon
02c0d5bcb9 Only run stack if a stack.yaml config is found (#1752)
* Only run stack if a stack.yaml config is found

It is necessary to check for a stack.yaml file to distinguish between
cabal-only projects or stack projects (which are also cabal projects
since stack is built on top of cabal).

* Test that stack is called if stack.yaml exists
2018-10-25 15:30:49 +01:00
w0rp
b3829d043d
Merge pull request #2012 from paihu/fix-cdstring-win32-change-drive
Fix #2011 MS Windows, lint error when current drive and target file drive is different.
2018-10-25 14:24:56 +01:00
Terry Ding
3ba9cad878 fix: change google_java_format_* to java_google_java_format_* for inject global variables according to doc/ale-java.txt 2018-10-24 20:10:31 +08:00
Derek P Sifford
e94a594e2e add terraform fmt fixer for terraform and hcl filetypes
See #1718
2018-10-23 20:44:31 -04:00
paihu
bc3ccd6e04 fix indent 2018-10-22 23:42:50 +09:00
Daniel Welch
2000436dfd LSP configuration via didChangeConfiguration (#1852)
* adding LSP configuration via workspace/didChangeConfiguration
2018-10-22 13:24:46 +01:00
paihu
eae3f70e75 fix CdString for MS Windows 2018-10-22 21:17:57 +09:00
Auri
be21aa5cda New linter: dls (#1992)
* New linter: dls
2018-10-17 16:11:41 +01:00
Aliou Diallo
b7ec11c93d Allow custom filters for the jq fixer (#1980)
* Allow the jq filters to receive custom filters.
* Update documentation.
2018-10-12 09:15:32 +01:00
Linda_pp
87986520d6 Fix E523 on asynchronous truncated echo (#1987) 2018-10-11 15:01:27 +01:00
Matteo Centenaro
bf1ac8e822 FIX: use mix from the project root directory (#1954)
* FIX: use mix from the project root directory
* Move find root project function to autoloaded handlers
* add tests for #ale#handlers#elixr#FindMixProjectRoot
2018-10-10 17:19:47 +01:00
Travis Gibson
2b2e766dc6 Add Perl6 support via 'perl6 -c' 2018-09-28 16:18:40 -07:00
Evan Borden
a8915d885b Add better support for Haskell stack compiler tools (#1851)
* Add better support for Haskell stack compiler tools

This commit adds support for `stack` as the executable of a tool. This
follows a pattern that has been implemented for `bundler`'s tool chain.

* Move hlint command to linter file
* Add vader test for stack exec handling
* Update ghc-mod to support stack execution

`ghc-mod` was previously broken into 2 linters.

1. ghc_mod
2. stack_ghc_mod

This additional linter is not necessary with proper support for
executable variables and `stack exec` handling.

* Support stack exec in hfmt
* Support stack in hdevtools
2018-09-28 09:05:01 +01:00
Ye Jingchen
8891b7c349 Move ccls functions to autoload/ale/handler
Tests are kept as-is.
2018-09-28 03:26:57 +08:00
Bert JW Regeer
8e7e810db6 Bugfix: python add blank lines (#1944)
* Don't add newlines when not a control statement for Python
* Add test for accidental newline fix
* Add docstring detection to avoid adding unnecessarily newlines
* Add tests for docstring detection
2018-09-25 10:02:01 +01:00
w0rp
aa5c82b171
Merge pull request #1932 from rhysd/shfmt-default-indent
shfmt: Use Vim's indent config as default indent width
2018-09-20 09:30:59 +01:00
w0rp
169a6e26b2
Merge pull request #1719 from elebow/auto-pipenv-option-for-python-linters
Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
2018-09-19 19:46:13 +01:00
Martin Tournoij
e82bcdb8a6 Add fixer for Go modules (#1873)
* Add fixer for Go modules
2018-09-19 19:33:23 +01:00
w0rp
a6c6e24d61
#1872 Remove extra carriage returns when fixing files on Windows 2018-09-19 19:28:57 +01:00
w0rp
6bbbb9456c
Merge pull request #1926 from gnustomp/master
c#ParseCFlags: don't index empty list
2018-09-19 13:22:43 +01:00
w0rp
993f02ad80
Merge pull request #1928 from felipesere/master
To avoid blocking build tools, suspend ALE when suspending vim
2018-09-18 17:46:45 +01:00
w0rp
213a901ccd
Stop tsserver from causing errors to be rendered redundantly 2018-09-18 17:43:17 +01:00
rhysd
532686102e shfmt: Use Vim's indent config as default indent width 2018-09-18 17:51:00 +09:00
w0rp
ddb3e6d57a
Handle failing to connect to eslint_d 2018-09-17 17:32:57 +01:00
w0rp
f9e99d81a4
#1794 - Handle LSP documentation content as a Dictionary 2018-09-17 11:16:46 +01:00
Felipe Sere
fba4cfeae9 To avoid blocking build tools, suspend ALE when suspending vim 2018-09-16 15:57:13 +01:00
James Ye
87743faf2a c#ParseCFlags: don't index empty list 2018-09-16 22:57:43 +10:00
Eddie Lebow
dbe9352935 Add python_auto_pipenv config var for all python linters.
This allows a user to set one variable instead of eight.
2018-09-15 22:10:46 -04:00
Eddie Lebow
56e67c5811 Add python_[linter]_auto_pipenv options for python linters (fixes #1656)
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.

Defaults to false.

I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:

diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction

" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
-    return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+    let l:cd_string = ale#path#BufferCdString(a:buffer)
+    let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+    " `pipenv --where` returns the path to the dir containing the Pipfile
+    " if in a pipenv, or some error text otherwise.
+    return strpart(l:output, 0, 18) !=# "No Pipfile present"
 endfunction

Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-09-15 22:10:46 -04:00
w0rp
0868cb769d
Merge pull request #1906 from ngavalas/autocomplete-trigger-prefix
fix non-. prefix triggers overfiltering results
2018-09-14 13:32:25 +01:00
w0rp
7f1c411b5e
Merge pull request #1850 from rrosenblum/ruby_linters
Update all Ruby linters to work consistently with bundler
2018-09-14 13:27:07 +01:00
w0rp
5c86ffd321
Return only the unescaped executables from executable callbacks 2018-09-14 13:24:59 +01:00
w0rp
43d7e8fde9
#1889 Add support for automatically previewing messages based on the cursor position 2018-09-14 12:42:26 +01:00
Ryan Rosenblum
9e09b7ca35 Update all Ruby linters to work consistently with bundler 2018-09-12 16:53:28 -04:00
Nick Gavalas
b4513fc4b0 fix non-. prefix triggers overfiltering results 2018-09-12 15:47:57 -04:00
Nick Gavalas
44070d8a45 fix tsserver className parsing 2018-09-11 10:56:58 -04:00
w0rp
99e9417ef9
Add support for Julia Language Server (#1894) 2018-09-10 17:24:04 +01:00
w0rp
0948dcc435
Merge pull request #1897 from LEI/add-sqlfmt-fixer
Add support for sqlfmt
2018-09-09 11:55:42 +01:00
w0rp
395aba19c3
Merge pull request #1885 from dsifford/dsifford-fixer-uncrustify
add uncrustify fixer for several languages
2018-09-09 11:30:30 +01:00
Bartolomeo Stellato
b3adf241c3 Fix other warnings 2018-09-08 16:05:34 -04:00
Bartolomeo Stellato
91bb948b90 Try to fix CI 2018-09-08 14:11:11 -04:00
LEI
a97ef49c51
Add support for sqlfmt 2018-09-08 01:34:10 +02:00
w0rp
0ae4ea23c8
#1888 Support names with minuses in Clojure and Lisp 2018-09-07 19:27:42 +01:00
Bartolomeo Stellato
68ac4d1095 Fix julia escaping + minor edits 2018-09-07 14:13:44 -04:00
Bartolomeo Stellato
f64f0bb48c Added tests 2018-09-07 13:16:22 -04:00
Bartolomeo Stellato
df72c5f1c1 Added various files to integrate julia. Still not working. 2018-09-07 11:11:29 -04:00
w0rp
e0fe97e0a8
Merge pull request #1883 from hsanson/add-solargraph-yml-to-root-path-search
Add solargraph.yml file as root path search file.
2018-09-06 20:34:34 +01:00
w0rp
580bd36773
Fix #1800 - Enable non-blocking writes where available 2018-09-06 20:04:35 +01:00
Horacio Sanson
a9333c2866 Fix #1822 - support go-langserver lsp. 2018-09-06 13:46:59 +09:00
Derek P Sifford
0ed4a5bbcc add uncrustify fixer for several languages 2018-09-04 20:39:32 -04:00
Horacio Sanson
044c762c85 Add solargraph.yml file as root path search file.
Solargraph allows to set configuration options by creating a
.solargraph.yml file at the root of the project using it. Therfore this
file is a good canditate for finding ruby projects root paths.

Initial discussion:
  https://github.com/w0rp/ale/issues/1874#issuecomment-418316168
2018-09-05 07:12:04 +09:00
w0rp
d476578a40
Improve ALE project style checking
* The project style linter now runs while you type.
* Now the scripts for checking the project require blank lines.
* Many style issues have been found and fixed.
2018-09-04 16:51:18 +01:00
w0rp
8f2e1c393f
Merge pull request #1871 from Ophirr33/master
added sbtserver linter
2018-09-04 11:22:57 +01:00
w0rp
fddbfdef12
#1875 Do not lint and so on when an operator is pending 2018-09-03 13:59:56 +01:00
w0rp
a746ea2bfc
#1875 - Do not echo cursor messages when keys are pending 2018-09-03 11:41:54 +01:00
Ty Coghlan
3d016f1697 Changed sbtserver to just work off of the address variable 2018-09-01 21:03:29 -04:00
Ty Coghlan
8e3bf10592 added sbtserver linter 2018-08-30 22:10:38 -04:00
Bartolomeo Stellato
8bf5d144ed Started adding julia languageserver 2018-08-30 15:40:04 -04:00
w0rp
ee3142b601
Merge pull request #1866 from Steap/feature/xmllint-fixer
Add support for xmllint as a fixer.
2018-08-28 23:36:00 +01:00
w0rp
79f02fce69
Merge pull request #1856 from sbl/ocamlformat
add ocamlformat support
2018-08-28 23:28:30 +01:00
w0rp
d4ce201cc2
Merge pull request #1849 from hsanson/1848-add-support-for-java-lsp
Add vscode-java-language-server linter
2018-08-28 22:53:11 +01:00
Cyril Roelandt
cc5ad6491f Add support for xmllint as a fixer. 2018-08-28 23:43:52 +02:00
w0rp
09e43ab16b
Merge pull request #1847 from hsanson/1846-support-solargraph-lsp
1846 support solargraph lsp
2018-08-28 21:52:18 +01:00
w0rp
339930ad68
Fix #1859 - Make the connection ID available on the connection object 2018-08-28 10:18:37 +01:00
w0rp
b6112aedc3
Merge pull request #1861 from dimbleby/goto-definition-column
Fix out-by-one error in column on goto-definition
2018-08-28 10:11:44 +01:00
David Hotham
aef11cc0d2 Fix out-by-one error in column on goto-definition
Fixes #1860
2018-08-27 13:53:40 +01:00
Horacio Sanson
1980245b94 Add solargraph LSP linter. 2018-08-27 10:58:17 +09:00
sbl
aa015ec4db add ocamlformat support 2018-08-26 13:47:56 +02:00
w0rp
c4eca7c417
Use one LSP connection per project 2018-08-24 13:16:58 +01:00
fenuks
9d7c48038c
Add clazy as cpp linter 2018-08-24 10:52:33 +01:00
w0rp
1f26fc4013
Merge pull request #1841 from dabbeg/fix-importjs-fixer
importjs fixer not reading correct executable variable name
2018-08-24 10:31:18 +01:00
Davíð Guðni
f526fc68d1 importjs fixer not reading correct executable variable name 2018-08-24 09:04:17 +00:00
Horacio Sanson
3afff5a24c Add vscode-java-language-server linter 2018-08-24 16:28:15 +09:00
Evan Borden
707b539969 Add hlint refactoring as a fixer (#1836) 2018-08-23 23:23:54 +01:00
Evan Borden
2600524274 Add stylish-haskell as a fixer (#1837)
* Add stylish-haskell as a fixer

`stylish-haskell` is a common formatting tool for the haskell toolchain.
It is not as advanced as `brittany` or `hindent`, but it is commonly
used for formatting of imports and data declarations. This adds it as a
fixer in ALE.
2018-08-23 23:14:59 +01:00
w0rp
a366d325a7
Merge pull request #1815 from fredemmott/lsp-related-information
If present, use new-ish LSP 'relatedInformation' field for :ALEDetail
2018-08-20 16:59:21 +01:00
w0rp
61a0716837
Use &l:equalprg so local options do not override global ones 2018-08-17 10:10:49 +01:00
w0rp
ad8b260519
Fix #1816 - Fix a type error in the initialize message handler 2018-08-16 14:19:12 +01:00
Fred Emmott
4923d48d53
Correct related information line numbers from 0-based to 1-based 2018-08-15 14:46:57 -07:00
Fred Emmott
c467db3ed9
Better formatting 2018-08-15 14:31:30 -07:00
Fred Emmott
484a70f0c0
Use new-ish LSP 'relatedInformation' field for :ALEDetail 2018-08-15 14:19:32 -07:00
w0rp
9cdd8b67b2
Stop creating closure function in global scope by using partials instead 2018-08-15 00:20:47 +01:00
w0rp
6167f75628
Merge pull request #1802 from flybayer/fix-prettier-d
Don't use error output from prettier_d for fixing files
2018-08-10 18:28:38 +01:00
w0rp
e9086dd55c
Revert "#1459 Always run ESLint in the directory of the file being checked"
This reverts commit 634bf73f52.
2018-08-10 11:49:17 +01:00
Brandon Bayer
63c66dc5d2 fix: Don't use error output from prettier_d for fixing files 2018-08-09 12:56:53 -04:00
w0rp
634bf73f52
#1459 Always run ESLint in the directory of the file being checked 2018-08-09 08:51:27 +01:00
w0rp
fc94fd4deb
Use lambdas for LSP message callbacks, which are easier to manage 2018-08-08 20:08:51 +01:00
Bradford Larsen
023ade872e Adjust the jumplist with line numbers too when opening a new file
This further addresses Issue #1758.
2018-08-07 16:10:36 -04:00
w0rp
217284360d
Simplify the code for most linters and tests with closures 2018-08-02 23:44:12 +01:00
w0rp
9ef266d050
Merge pull request #1770 from fredemmott/hack
Split Hack out from PHP, modernize
2018-08-02 21:58:57 +01:00
Fred Emmott
a728f074f7
Disable HHAST by default
it executes $PROJECT/vendor/bin/hhast, so that's not a good idea.
2018-08-02 13:50:56 -07:00
w0rp
94270402cb
Fall back on flags for other C/C++ files in the same directory 2018-08-02 21:48:56 +01:00
w0rp
ccbdfcd76f
Include the error in the detailed error message in the GCC handler 2018-08-02 21:45:16 +01:00