Commit Graph

1551 Commits

Author SHA1 Message Date
Leo 542ba5a04a Make apkbuild_lint and secfixes_check default for apkbuild filetype 2021-01-22 14:04:26 -03:00
Leo 99a809c814 Add handler for the output of atools
atools is a collection of tools written in ash shell and Lua that
provide linting for Alpine Linux's APKBUILD.

APKBUILDs are build recipes used by Alpine Linux's build system, abuild,
an equivalent would be Arch Linux's PKGBUILD and Gentoo's ebuild.
2021-01-22 14:04:26 -03:00
Horacio Sanson 53ff5f2d88 Fix 3546 - check empty executable string.
At some point VIM/NVIM started throwing errors if the input string is
empty for some functions such as execute() and fnamemodify(). This
commit checks if the executable string is empty before passing it to the
executable() function.

Resources:
  - https://github.com/vim/vim/issues/7465
  - https://github.com/vim/vim/releases/tag/v8.2.2117
2021-01-23 01:34:13 +09:00
Charles B Johnson 451e99341e
xo: refactor to function 2021-01-22 09:23:54 -06:00
Charles B Johnson 4edfac4db6
xo: inline filetype handling 2021-01-22 09:23:54 -06:00
Charles B Johnson 23ff19a162
fixers/xo: remove unnecessary directory crawl 2021-01-22 09:23:54 -06:00
Charles B Johnson f17beadb49
fixers/xo: support monorepos 2021-01-22 09:23:54 -06:00
Charles B Johnson 8ffde14039
fixers/xo: support stdin relative to the fixed file 2021-01-22 09:23:53 -06:00
Charles B Johnson e75ac9f497
fixers/xo: support typescript options 2021-01-22 09:23:53 -06:00
Charles B Johnson 289f808ccd
fixers/xo: refactor to handlers 2021-01-22 09:23:53 -06:00
Charles B Johnson 4a6136c27e
fixers/xo: add tests 2021-01-22 09:23:53 -06:00
Charles B Johnson 6bfcb9cdff
linters/xo: consolidate xo linters 2021-01-22 09:23:53 -06:00
Horacio Sanson 014b00d4d7 Add yamllint and prettier to openapi.
This commit enables yamllint and prettier on openapi files.
2021-01-22 23:17:38 +09:00
Horacio Sanson 7fe61cdf0e Fix 3498 - Change standardrb fixer to read from stdin.
Seems standardrb fails to properly use the --config option when using
temporary files but works fine when reading from stdin. This commit
changes the fixer so it uses stdin instead of temporary files.
2021-01-22 23:17:01 +09:00
Horacio Sanson 7e3d2930d8
Merge pull request #3261 from toastal/dhall
Enhanced Dhall fixer support
2021-01-20 21:06:03 +09:00
Horacio Sanson 8de0e7b9ba
Merge pull request #3430 from mbrunnen/mbn/fix-macros-include-c-flag
Add -imacros to C flags
2021-01-20 20:42:18 +09:00
Horacio Sanson 783cf4ab82
Merge pull request #3362 from daliusd/tsserver_hints
Show tsserver hints/suggestions in Ale.
2021-01-20 20:40:44 +09:00
Horacio Sanson bbac230008
Merge pull request #3234 from hsanson/3233-enable-ktlint-fixer-for-kotlin-files
Enable ktlint fixer for kotlin files.
2021-01-15 22:26:56 +09:00
w0rp 6fbdec8587
Merge pull request #3535 from dense-analysis/revert-3358-master
Revert "Improves fixer performance for large buffers"
2021-01-14 20:41:55 +00:00
Kevin Clark 39f393ef07
Add nvim floating window support (replaces #3314) (#3470)
* Add nvim floating window hover support
* Add configuration for float to replace preview
* preview#ShowFloating: qualify local variables
* Configure floating preview usecases individually

Also:
  * Extract floating preview to its own file.
  * Ignore 'stay_here' option. Moving into the floating preview window
    seems confusing at best.
  * Re-use existing floating preview window if it's still up.
  * Flush out floating preview documentation.

* Watch cursor position changes per window

Floating previews open a new window, so when that window is written to,
it moves briefly there at a different position than the original window.
This makes repeated positions detected when positions are tracked at a
s: level. Instead, we change the variable to window scoped, which only
fires a message if the cursor has changed from the last position in
*that window*.

* g:ale_floating_preview cleanup
* floating_preview: add ALEDetail tests
* Fix fecs test missing runtime call
* Add ALEHover floating preview tests

Co-authored-by: Jan-Grimo Sobez <jan-grimo.sobez@phys.chem.ethz.ch>
2021-01-14 18:06:20 +00:00
Horacio Sanson 97ce2423b0
Merge pull request #3494 from YorickPeterse/master
Add linter for Inko
2021-01-13 23:54:06 +09:00
Horacio Sanson 7b187af10a
Merge pull request #3482 from liskin/lsp-popup-menu-fix
codefix: Fix LSP MenuCallback invocation (E119, not enough args)
2021-01-13 23:41:34 +09:00
Horacio Sanson aabca5b0ac
Merge pull request #3398 from ecly/update-python-find-root
Update `ale#python#FindProjectRootIni` with poetry.lock and pyproject.toml
2021-01-13 22:07:02 +09:00
Horacio Sanson 12d28ca34f
Merge pull request #3399 from StephenWithPH/suggest-scalafmt-for-sbt
suggest scalafmt for sbt
2021-01-13 14:00:10 +09:00
Horacio Sanson 49f8aa4703
Revert "Improves fixer performance for large buffers" 2021-01-12 17:49:30 +09:00
Horacio Sanson 54dd731cf1
Merge pull request #3386 from ivorpeles/master
Make isort fixer recognize auto_pipenv flag
2021-01-08 10:43:34 +09:00
Yorick Peterse 8375ee2766
Add linter for Inko
This adds a linter for Inko (https://inko-lang.org/). The linter makes
use of Inko's own compiler, and a newly introduced --check flag to only
check for errors; instead of also compiling source code.
2020-12-23 16:50:45 +01:00
toastal 9c7e1fe4dd
merging master 2020-12-21 10:26:09 +07:00
Tomas Janousek 6d7cff9c00 codefix: Fix LSP MenuCallback invocation (E119, not enough args) 2020-12-05 15:29:25 +00:00
Horacio Sanson 03b6978a27
Merge pull request #3381 from andreypopp/gofmt-stding-stdout
Use stdin/stdout to communicate with gofmt
2020-11-29 18:59:48 +09:00
Lyz 12eb8d1523
fix: correct suggested filetype for yamlfix 2020-11-26 12:42:50 +01:00
Ivor Peles ce3d891bed Use better string comparison operators in isort fixer 2020-11-25 17:57:40 -05:00
Ivor Peles 340e966055 Fix comparison operator 2020-11-25 17:34:03 -05:00
Lyz c69d696e1b
feat: add yamlfix fixer 2020-11-25 01:21:53 +01:00
Ivor Peles d27a3f453c Ignore executable check when executable is pipenv 2020-11-21 19:24:20 -05:00
Ivor Peles ae86d10e48 Set default value for python_isort_auto_pipenv 2020-11-21 19:24:20 -05:00
Ivor Peles 373ffa0f31 Use pipenv isort executable when python_auto_pipenv = 1 2020-11-21 19:24:19 -05:00
Horacio Sanson 5458a1b291
Fix 3103 - add shellcheck shell directive detection. (#3216)
* Fix 3103 - add shellcheck shell directive detection.

Searches for shellcheck shell directive to detect dialects for scripts
that do not have shebang.

* Change order of detection of shellcheck dialect

In a situation where the filetype can be wrong (example: something.sh
which is written in bash dialect) and has no hash-bang (since it is
meant to be sourced) then the override specified within the script will
be ignored.

It probably is the most right thing to do if the script author has added
a specific directive; it should trump everything else.

Co-authored-by: Horacio Sanson <horacio@allm.inc>
Co-authored-by: Dino Korah <dino.korah@redmatter.com>
2020-11-21 20:49:31 +00:00
w0rp b4550f361b
Merge pull request #3409 from lyz-code/feat/add-autoimport-support
feat: add autoimport fixer
2020-11-21 20:45:51 +00:00
w0rp 96428425fe
Merge pull request #2903 from davidtwco/ormolu-fixer
Add ormolu fixer.
2020-11-21 20:25:13 +00:00
Dale Jung 2873be2d6a
Add php phpcbf options (#3383)
* Taken from phpcs. add add_php_phpcbf_options #3382
* Updated docs for php_phpcbf_options #3382
* Added tests #3382
2020-11-21 20:19:02 +00:00
w0rp a139599d39
Close #2727 - Add a hover-only setting for balloons 2020-11-21 20:12:09 +00:00
w0rp 06e7f2195e
Fix #3332 - Modify everything for rename/actions
ALE now just modifies every open buffer for rename and actions, and sets
up a one-time use BufEnter event to reload buffers that are changed so
you don't have to think about what to do with changed buffers.
2020-11-21 19:00:53 +00:00
w0rp b8aaff2cf7
Merge pull request #3358 from lukaswozniak/master
Improves fixer performance for large buffers
2020-11-21 16:40:29 +00:00
w0rp edd96f4414
Merge pull request #3354 from rphln/collapse-whitespaces
Collapse spaces and lines in the completion menu.
2020-11-21 16:16:08 +00:00
w0rp c10e807492
Fix handling of ranges at file end. (#3344) 2020-11-21 16:03:39 +00:00
zandr e5d16caebe
Add luafmt fixer (#3289) 2020-11-21 15:59:50 +00:00
w0rp 9f2215d69b
Merge pull request #3435 from myobie/yarn-berry
For linters/tserver and handlers/eslint: look for node packages in .yarn/sdks as well
2020-11-21 15:33:55 +00:00
Dalius Dobravolskas 81d16823a7
Settings to control suggestions. 2020-11-21 15:49:42 +02:00
Dalius Dobravolskas 2ab46d4b8e
Show tsserver hints/suggestions in Ale. 2020-11-21 15:49:41 +02:00
Dalius Dobravolskas d0b5909fd8
#3442 Fix code fix clangd issue 2020-11-21 01:27:27 +00:00
w0rp 7c04ee5c20
Close #1466 - Add GVIM refactor menu support
Code actions and ALERename now appear in the right click context menu
for GVim by default.
2020-11-21 01:18:27 +00:00
Nathan Herald b74827de99
Look for node packages in .yarn/sdks as well 2020-11-17 17:12:04 +01:00
w0rp e9140c740b
cmp forwards, and reverse the code actions 2020-11-14 10:17:02 +00:00
Dalius Dobravolskas 01800a23ad
Support for LSP/tsserver Code Actions (#3437)
* Added tsserver and LSP code action support.
* tsserver refactors support added.
* Handling special case when new text is added after new line symbol.
* ale#code_action#ApplyChanges simplified.
* Initial attempt on LSP Code Actions.
* workspace/executeCommand added.
* Some null checks added.
* Add last column to LSP Code Action message.
* Pass diagnostics to LSP code action.

Previously ApplyChanges code was applied from top-to-bottom that required 
extra parameters to track progress and there was bug. I have changed code
to bottom-to-top approach as that does not require those extra parameters
and solved the bug.

Tested with typescript-language-server and it is working.
2020-11-14 10:15:17 +00:00
toastal 42e4b14861
Merge branch 'master' of github.com:dense-analysis/ale into dhall 2020-11-14 15:03:26 +07:00
Manoel Brunnen 96d8415946 Add -imacros to C flags 2020-11-03 23:10:15 +01:00
Jason Franklin 31b7a2de41
Move the test for buffer-local variables
The "ale#handlers#sh#GetShellType()" function currently falls back
to the file type without checking for buffer-local variables first.
This causes the function to return "sh" even when a script is known
by Vim to be a script of a more specific type (e.g., "bash").

The "ale#handlers#shellcheck#GetDialectArgument()" function then
erroneously uses this type even though a more fitting type should be
used instead.  Files without a "#!" line will be of type "sh" even
though they may have a ".bash" suffix.

This commit fixes the problem by checking for buffer-local shell
type variables (set by Vim) before falling back to the file type.
2020-11-02 10:59:16 -05:00
Jason Franklin 73632312c2
Use the proper term for the "#!" line 2020-11-02 10:46:56 -05:00
Jason Franklin 6c22936303
Remove a noise comment 2020-11-02 10:46:28 -05:00
cyy a49f664aea chang fishindent to fish_indent 2020-10-31 14:01:08 +08:00
cyy 9d1a71a5cb add doc and test 2020-10-31 14:01:08 +08:00
cyy 983c7e8805 add fish_indent fixer 2020-10-31 14:01:08 +08:00
Lyz 513e6ee972
feat: add autoimport fixer 2020-10-23 18:53:38 +02:00
David Wood b496c4b164
Add ormolu fixer.
This commit adds a fixer for the Haskell language, ormolu
(https://github.com/tweag/ormolu).

Signed-off-by: David Wood <david@davidtw.co>
2020-10-23 11:48:21 +01:00
StephenWithPH af5a8e1abf
add sbt as a suggested filetype for scalafmt fixer 2020-10-19 09:47:54 -07:00
w0rp 477eb89793
#3332 Implement :ALERename! for ignoring errors
:ALERename! now ignores errors for files that cannot be modified, and
modifies all other files.
2020-10-15 21:56:21 +01:00
ecly f125c11faa Update FindProjectRootIni with poetry.lock and pyproject.toml 2020-10-15 13:35:47 +02:00
Andrey Popp 96ec33e6d6 Use stdin/stdout to communicate with gofmt 2020-10-03 18:44:19 +03:00
fenuks 7186b0437f Add maven helper file; use maven wrapper if available instead of global 'mvn' executable 2020-09-30 00:11:57 +02:00
toastal 48cbf1cb36
dhall alias 2020-09-25 08:26:17 +07:00
Łukasz Woźniak 6bebdcfa30 Improves fixer performance for large buffers 2020-09-18 12:59:27 +02:00
Raphael Nepomuceno 9769565f88 Collapse spaces and lines in the completion menu. 2020-09-14 12:11:16 -03:00
toastal ed47008710
addressing missing docs + cleaning up older Dhall files 2020-09-14 10:13:11 +07:00
toastal b32954a46c
Merge branch 'master' into dhall 2020-09-14 08:54:07 +07:00
w0rp 08295ce174
Bump the ALE version to 3.0.0 2020-09-09 22:06:38 +01:00
w0rp 4ddf742643
Close #2522 - Check pylint on the fly
Newer versions of pylint will now check your code as you type. Older
versions will still only check the file on disk.

Co-authored-by: Oliver Wiegers <oliver.wiegers@gmail.com>
2020-09-09 21:45:15 +01:00
Christian Keil d1f48e5ede Remove unnecessary length check. 2020-09-09 17:49:21 +02:00
Christian Keil d3932c0242 Fix format linting error. 2020-09-09 17:44:09 +02:00
Christian Keil 20f6bebdf2 Fix handling of ranges at file end. 2020-09-09 17:30:41 +02:00
w0rp 6a367e44aa
Close #3003 - Show ignored linters in :ALEInfo 2020-09-08 22:19:13 +01:00
w0rp 7d90ff56d9
Close #3333 - Add an ALECompletePost event
Add an `ALECompletePost` event along with everything needed to make it
useful for its primary purpose: fixing code after inserting completions.

* `ALEFix` can now be called with a bang (`!`) to suppress errors.
* A new `ALELintStop` command lets you stop linting, and start it later.
2020-09-08 21:40:10 +01:00
toastal f07ecbc579
merge master -- apparently someone else added dhall? 2020-09-08 10:08:00 +07:00
w0rp b4b75126f9
Fix a completion error 2020-09-07 10:01:18 +01:00
w0rp c36053d4cc
Close #3268 - Implement :ALEImport
A new command, `:ALEImport`, has been added, which lets you import words
at your cursor if a completion provider can provide a completion for
that word which includes some additional text changes.
2020-09-06 22:37:37 +01:00
w0rp 5bc49d2047
Fix #3183 - Escape filename characters from LSP/tsserver 2020-09-05 21:46:39 +01:00
w0rp 844febb9fb
Fix #3322 - Apply rename changes correctly 2020-09-04 09:37:33 +01:00
w0rp 4a91f92f28
Merge pull request #3078 from jgehrig/jg-issue2958
Issue 2958: Addtional ^M characters on Windows
2020-08-31 08:31:44 +01:00
w0rp 25b572b3bf
Close #3205 - Avoid inserting completions by default 2020-08-29 17:36:25 +01:00
w0rp 6e2e51b154
Fix #2971 - Disable automatic completion while 'paste' is active 2020-08-29 17:27:53 +01:00
w0rp 7e0cdb53ec
Fix #3247 - Use --always-make for make -n by default 2020-08-29 16:05:49 +01:00
w0rp bc3a843e10
Add a missing `augroup END` line 2020-08-29 14:23:58 +01:00
Kimplul d9a7d6bc23 Improved macro handling in gcc 2020-08-29 15:17:20 +03:00
w0rp dd9ad9b5be
#3319 - Try to modify buffers later for ALEFix 2020-08-29 12:33:17 +01:00
w0rp 7d4ce4e6aa
Close #3325 - Apply new formatting where possible 2020-08-28 19:50:36 +01:00
w0rp 3d5a2690ce
#3325 - ale#path#BufferCdString now generates %s:h 2020-08-28 17:46:43 +01:00
w0rp 34e409ea21
Close #3285 - lint_file is now dynamic
`lint_file` can now be computed dynamically with a callback function,
which can return a deferred result, as per `ale#command#Run`. This
allows linters to dynamically switch between checking files on disk,
or checking code on the fly.

Some tests have been fixed on Windows.
2020-08-28 14:02:05 +01:00
w0rp b8c0ac2e61
Close #3309 - Add b:ale_lint_delay 2020-08-28 09:54:43 +01:00
w0rp 6874120405
Fix #3323 - Set default for g:ale_filename_mappings 2020-08-28 09:33:09 +01:00
w0rp 369e3876f0
#3324 - Enable rls by default 2020-08-28 08:23:10 +01:00
Sorin Iclanzan 80bd2e18d6
Set prettier working directory to where .prettierignore is (#3101)
Prettier does not use `.prettierignore` unless the current directory is the root where the `.prettierignore` file resides.

* Update Prettier tests
* Look for prettierignore to determine project root
2020-08-28 08:14:50 +01:00
w0rp ecd7abecc0
Fix #3319 - Force modifications to buffers 2020-08-27 21:29:13 +01:00
w0rp 7545b18ba1
Fix #3318 - Escape macros when parsing C flags 2020-08-27 21:17:24 +01:00
w0rp 6d843715f3
Fix C flag parsing and tests on Windows 2020-08-27 20:18:13 +01:00
w0rp af177d7825
#3318 Refactor C flag parsing to set up for quoting arguments 2020-08-27 19:33:43 +01:00
w0rp 719f3c62b0
#3266 - Catch echo visual selection errors 2020-08-27 13:57:20 +01:00
w0rp 5d3d33626c
Merge pull request #3310 from pbrisbin/master
Add dhall-format as a Fixer
2020-08-27 13:39:30 +01:00
w0rp 17605777d6
Fix #3317 - Parse -include from C flags 2020-08-27 13:05:50 +01:00
w0rp 66ff00c420
Fix #3316 - Repeat -relative for ALERepeatSelection 2020-08-27 12:41:07 +01:00
w0rp f5aa0e8457
Fix #3307 - Handle compile_commands paths better
ALE now converts paths from compile_commands.json files into absolute
paths and prefers matching against absolute file and directory names for
determining which flags to use for files. As a result, parsing
compile_commands.json to determine flags should work for a lot more C
and C++ projects.
2020-08-27 11:44:35 +01:00
w0rp a955f5dfa8
#3312 - Just check if additionalTextEdits is non-empty 2020-08-27 08:57:12 +01:00
w0rp 396fba7cca
Fix #3312 - Fix a false positive for auto imports
ALE was incorrectly detecting completion results from servers such as
rust-analyzer as wanting to add import lines when additionalTextEdits
was present, but empty.

Now ALE only filters out completion results if the autoimport setting is
off, and one of the additionalTextEdits starts on some line other than
the current line. If any additionalTextEdits happen to be identical to
the change from completion anyway, ALE will skip them.
2020-08-27 08:44:43 +01:00
patrick brisbin 447aea4af0
Add dhall-format as a Fixer
https://github.com/dhall-lang/dhall-lang
2020-08-25 09:34:34 -04:00
w0rp 3e2abe3f25
#2556 - Support modifiers for formatted filenames 2020-08-24 09:33:07 +01:00
Horacio Sanson 1a7366067a
Merge pull request #3302 from khaveesh/master
latexindent: Run fixer from stdin instead of a temporary file
2020-08-24 09:16:35 +09:00
w0rp ba3dd0d027
Close #2556 - Support filename mapping
ALE now supports mapping files between different systems for running
linters and fixers with Docker, in virtual machines, in servers, etc.
2020-08-23 19:55:42 +01:00
Khaveesh N 4bece27bd4
refactor(Fixer): Change latexindent to read from stdin instead of temporary file
This is a better strategy as it avoids creating temporary files and the delay that follows
2020-08-21 17:19:22 +05:30
awang 4d42ebc160
Keep -iframework if present in parsed C/C++ flags (#3057)
* Keep -iframework if present in parsed C/C++ flags
* Add test to make sure -iframework is parsed

Co-authored-by: Alex Wang <ts826848@gmail.com>
2020-08-20 00:09:02 +01:00
w0rp 90abb7e7ef
Try to fix Windows tests again 2020-08-19 01:22:43 +01:00
w0rp de7b0567b1
Try to fix tests on Windows 2020-08-19 01:10:33 +01:00
w0rp 361027eac6
Fix #3200 - Do not use -fstack-usage from parsed flags 2020-08-19 01:04:08 +01:00
w0rp e27d4377b5
Merge pull request #3178 from sudobash1/expand_at
Fixes #3092 - Implement loading `@file` c arguments
2020-08-19 00:15:34 +01:00
w0rp 5eda1df0a9
Remove features deprecated in previous versions 2020-08-18 23:03:43 +01:00
w0rp 4df352eee5
Fix #3294 - Fix hover off by 1, handle LSP server crashes 2020-08-18 01:48:07 +01:00
w0rp ac56574b55
Merge pull request #3046 from hsanson/2816-fix-standard-fix-doesnt-work
Fix 2816 - Standard fix does not work.
2020-08-17 21:44:19 +01:00
w0rp eb864730e2
Merge pull request #2906 from elebow/shelldetect-fall-back-to-filetype-if-no-hashbang
ShellDetect falls back to filetype if no hashbang (fixes #2886)
2020-08-17 21:29:16 +01:00
blyoa d5c1d84230
Add remark-lint for a markdown fixer (#2836) 2020-08-17 10:14:38 +01:00
w0rp 5a4fad6172
Fix #2899 - Handle tsserver default import completion 2020-08-14 01:55:54 +01:00
w0rp 2b2403a20d
Merge pull request #3144 from jamescdavis/dont_append_newline_when_noeol
don't append a newline to temp file when buffer is noeol and nofixeol is set
2020-08-14 00:32:28 +01:00
w0rp 8151e3e8fa
Merge pull request #2920 from ConradIrwin/prettier-standard-stdin
Fix prettier_standard to respect the configuration file
2020-08-14 00:27:41 +01:00
toastal f1080a2bbe
Dhall language support (fixes #2820) 2020-08-14 00:31:47 +07:00
w0rp 0b77766337
Merge pull request #3010 from kevinoid/ps1-powershell
Alias ps1 filetype to powershell
2020-08-13 13:45:49 +01:00
Horacio Sanson 8e6c7bff9a
Fix 1695 - Change rubocop fixer to use stdin (#3230)
* Fix 1695 - Change rubocop fixer to use stdin
* Update test_rubocop_fixer_callback.vader

Co-authored-by: Horacio Sanson <horacio@allm.inc>
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2020-08-13 11:25:07 +01:00
w0rp 64d4c951ae
Fix #3281 - Stop CursorHold flickering 2020-08-13 02:22:21 +01:00
w0rp 7c4b1d8444
Close #3274 - Handle basic LSP markdown formatting 2020-08-12 22:11:45 +01:00
Nihad Abbasov d5912b53dd
Restore old behavior of ALEFix command for Rubocop (#3237)
* Restore old behavior of ALEFix command for Rubocop

Since RuboCop 0.60 ALEFix command stopped to fix all found offenses. This change restores the 
previous behavior by allowing rubocop to fix all detected offenses.

* Fix tests
* Allow to configure auto-correct option for Rubocop
2020-08-12 14:04:54 +01:00
w0rp 2237f9b462
#2919 Use compile_commands.json for headers 2020-08-10 02:14:23 +01:00
w0rp 05210846e4
Fix #3278 - Handle UTF-8 in URI encoding/decoding 2020-08-10 02:03:41 +01:00
w0rp 9e1f511003
#3276 - Disable make -n by default again 2020-08-09 20:08:42 +01:00
w0rp affeed7a87
Enable C flag parsing by default
The options for parsing `make -n` and `compile_commands.json` flags
are now enabled by default, so people can start getting better flags
for their files by default.

`compile_commands.json` flags are now preferred over `make -n` results,
to make the options work better by default.
2020-08-09 04:23:32 +01:00
w0rp 6d502233d8
Close #3267 - Add a general autoimport setting 2020-08-09 02:32:47 +01:00
w0rp 8bfb5c6407
Merge pull request #2849 from DonnieWest/excludeTsserverWarnings
Allow the user to remove warnings from completions
2020-08-09 01:32:27 +01:00
w0rp 2d174db5b2
Merge pull request #3107 from daliusd/tslintfix
Fix tslint fixer not working issue (temporary file not found)
2020-08-07 19:52:18 +01:00
w0rp f741245f11
Fix #3273 - Handle missing keys in hover information 2020-08-07 12:34:45 +01:00
w0rp 19229e8e27
Close #2472 - Add support for pyright 2020-08-07 12:16:13 +01:00
w0rp 9bdabce8df
Fix #2907 - Handle dictionaries for capabilities 2020-08-07 10:54:38 +01:00
w0rp 667618b399
Merge pull request #3191 from mostfunkyduck/master
Fixes govet linter for go 1.13+, with tests
2020-08-07 08:54:17 +01:00
tsjordan-eng f17b74679f
fix cppcheck for 1.89+, and add column support (#3030)
* fix cppcheck for 1.89+, and add column support

In cppcheck 1.89 the output changed to be more like GCC. This commit
forces any version of cppcheck to output in that same format. This also
allows for ALE to pick up the linter's column information

* Add parameters to tests. Vader passes.

* Fix c cppcheck for v1.89
2020-08-06 20:50:44 +01:00
Andre Souto 5b3da60cea
Adds hdl_checker LSP support (#2804)
* Added hdl_checker support
* Added hdl_checker tests

HDL Checker searches for files when no config file is found, which could lead to very long searches when the user is not really on a project setting
2020-08-06 13:20:54 +01:00
w0rp 711c90c523
Merge pull request #3123 from liskin/ccls-build-dir
ccls: Detect build dir and set compilationDatabaseDirectory
2020-08-06 13:12:56 +01:00
w0rp cdd8d38e2f
Fix #3266 Part 2: Fix Harder 2020-08-06 09:36:00 +01:00
w0rp fa3a927ca3
Fix #3266 - Truncate hover messages for LSP too 2020-08-05 13:46:08 +01:00
w0rp 1bd7b3e4ad
Merge pull request #3196 from jeremija/autoimport-langserver-pr
Add autoimport and rename support for langservers
2020-08-05 13:35:48 +01:00
w0rp acf892c4d1
#1532 - Display hover information on CursorHold 2020-08-04 20:11:49 +01:00
Horacio Sanson 316c7c7372
Merge pull request #3259 from sblask/support-markdownlint-rules-with-multiple-slashes
Support markdownlint rules with multiple slashes
2020-08-01 13:22:22 +09:00
Sebastian Blask fbfeae0587 Support markdownlint rules with multiple slashes 2020-07-31 11:15:13 +12:00
jhlink 84a413350c fix: Replace hardcoded quotes with ale#Escape 2020-07-30 10:07:53 -04:00
jhlink d49b06e030 fix: Find proj_options in same dir for astyle 2020-07-30 09:29:33 -04:00
Sebastian Blask 7cada95683 Support markdownlint 0.19.0 and 0.22.0
Fixes #2965
2020-07-30 09:57:46 +12:00
Horacio Sanson 5338dbf680
Merge pull request #3231 from jhlink/add-astyle-for-c-formatting
Add astyle for C/C++ formatting
2020-07-29 22:08:46 +09:00
jhlink cef64424ce style: Resolve lint issue 2020-07-29 01:52:36 -04:00
jhlink 428c5f94da fix: Use ALE to reliably find project options 2020-07-29 01:36:45 -04:00
jhlink 5377272d20 fix: Change _options to _project_options 2020-07-28 19:48:27 -04:00
jhlink 0e6578cf65 fix: Remove explicit calls to file path in astyle 2020-07-26 22:05:14 -04:00
jhlink 75723e4522 doc: Add C++ desc in astyle entry in registry 2020-07-26 22:05:10 -04:00
jhlink 78295024e1 feat: Add project option file support for astyle 2020-07-26 21:11:37 -04:00
jhlink b25bb64a4d feat: Use stdin/redirection for astyle 2020-07-26 20:51:41 -04:00
jhlink 488df0fa41 feat: Add cpp to registry.vim 2020-07-25 20:22:10 -04:00
jhlink 076f9efbd9 feat: Add cpp support to astyle fixer 2020-07-25 20:20:47 -04:00
w0rp 70ab831001
Merge pull request #3119 from hsanson/2269-ktlint-stdin-support
Fix 2269 - use ktlint stdin.
2020-07-21 12:45:26 +01:00
Horacio Sanson ddf4e7e9ba Enable ktlint fixer for kotlin files. 2020-07-12 20:49:04 +09:00
jhlink d0b7a6e71f doc: Remove c++ from astyle 2020-07-10 19:06:22 -04:00
jhlink 6c58164094 feat: Add astyle to fix/register.vim 2020-07-10 17:47:01 -04:00
jhlink 7f881f66a8 feat: Add ALE fixer for astyle 2020-07-10 17:46:01 -04:00
Kevin Locke 106c27644b
eslint: Use cwd from executable location to fix nested projects (#3222)
* Split FindNearestExecutable from FindExecutable

The path searching in ale#node#FindExecutable() will be useful for
eslint.  Refactor it into a separate function so it can be used without
regard for the state of the _use_global and _executable variables.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* eslint: Set project root from local executable

Using the nearest directory with node_modules does not work correctly
for nested projects where the eslint dependencies are in the outer
project.  For example:
https://github.com/dense-analysis/ale/issues/3143#issuecomment-652452362

Adopt the behavior of SublimeLinter, which runs from project_root
determined by the presence of the eslint executable in node_modules/.bin
(or eslint in dependencies/devDependencies of package.json, which we can
add later as necessary).  See [NodeLinter#find_local_executable].

[NodeLinter#find_local_executable]: https://github.com/SublimeLinter/SublimeLinter/blob/056e6f6/lint/base_linter/node_linter.py#L109

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-07-08 14:42:01 +01:00
Kevin Locke b3c6db173a
Run ESLint fixer from project root, where possible (#3096)
* Split eslint#GetCdString from eslint#GetCommand

Move the code for finding the project root and building the cd string
into a separate function so that it can be reused in the eslint fixer.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* Run ESLint fixer from project root dir

To match the ESLint linter, as changed in 9ee57d43 (which I forgot to
apply to the fixer, whoops).

Fixes: #3094
Closes: #3095

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-07-01 17:00:21 +01:00
w0rp 1428c7b29e
Update the internal ALE version to 2.7.0 2020-06-11 19:21:17 +01:00
Jerko Steiner b29e9867e8 Add test for LSP autoimport 2020-05-31 11:46:10 +02:00
Jerko Steiner b339a8bfa0 Add support for rename (documentChanges) 2020-05-31 11:00:53 +02:00
Jerko Steiner 4062b05669 Fix completion with langserver (autoimport in go) 2020-05-31 11:00:53 +02:00
mostfunkyduck 35c7c297b6 Fixes govet linter for go 1.13+, with tests 2020-05-25 11:46:16 -04:00
Stephen Robinson b209315714 Fixes #3092 - Implement loading `@file` c arguments 2020-05-20 18:15:52 -07:00
Ian2020 ca97f32258 Use a function to define shellcheck linters and vars needed, fixes tests 2020-05-08 12:55:54 +01:00
James C. Davis 15d590ee5e
fix: don't append newline when buffer is noeol and nofixeol 2020-04-30 15:00:10 -04:00
Ian2020 716f9a9bbb Fix linting issue - indentation incorrect 2020-04-28 20:53:42 +01:00
Ian2020 d4e1c57026 Moved common code to ale handlers, updated bats doc 2020-04-28 17:46:15 +01:00
Tomas Janousek 4fbfcc9dec ccls: Detect build dir and set compilationDatabaseDirectory
Fixes #2621
2020-04-18 13:57:57 +02:00
Yuto 93a13d7353
Broken message in pycodestyle (or any other Linters whose name include 'code') (#3114)
* Swap substitution order for echoed message

This prevents 'code' string in liter_name to be substituted by accident.
Linters including pycodestyle have been affected by this problem.

* Add test for linter whose name contains 'code'

Test for c525db8cb4088d02448c5ddcf4a80ffa028c3181
2020-04-18 11:59:26 +01:00
Horacio Sanson 5035281cb9 Fix 2269 - use ktlint stdin.
Use stdin flag instead of temporary files. This allows ktlint to work
with .editorconfig files.
2020-04-18 15:27:11 +09:00
w0rp dc054f30c8
Merge pull request #2823 from jeremija/do-not-save-on-autoimport
Do not save after ALERename and ALEOrganizeImports
2020-04-17 17:32:36 +01:00
Horacio Sanson 16cd59805b
Merge pull request #3050 from StarryLeo/fix-vim-sign-priority-patch-check
Fix vim sign priority patch check
2020-04-17 22:22:03 +09:00
w0rp 82f734a7c2
Closes #3019 - Implement default navigation
Default navigation for commands that jump to new locations has been
implemented with the `ale_default_navigation` variable, and all commands
that jump to locations now support `-tab`, `-split`, or `-vsplit`
arguments for overriding the default navigation behavior.
2020-04-15 16:50:13 +01:00
Dalius Dobravolskas 891852de71
Fix tslint fixer not working issue (temporary file not found) 2020-04-15 17:30:19 +03:00
John Gehrig 1c6b9354a8 Issue 2598: Addtional ^M characters on Windows
Windows may insert carriage return line endings, which ALE does not handle
well. These characters should not be displayed.

Adds a line to remove these characters for all messages.
2020-03-26 09:25:18 -04:00
StarryLeo 302ce71931 Fix vim sign priority patch check
With Vim 8.2 released, the previous check method is not accurate enough.
2020-03-15 14:58:38 +08:00
Horacio Sanson c207d6a550 Fix 2816 - Standard fix does not work.
The standard linter --fix fails if the file being input is not relative
to the project root (https://github.com/standard/standard/issues/1384).

This MR attempts to fix this by changing the command so the input file
is relative to the project root and the output is to a temporary file.

Preliminary tests with toy javascript projects seem to indicate this
works fine.
2020-03-12 16:29:46 +09:00
w0rp bbe5153fcb
Fixes #2982 - Implement g:ale_exclude_highlights
Particular highlights can now be excluded by providing Lists of regular
expressions.
2020-03-11 12:52:41 -04:00
w0rp 8f7ccdc5e9
Refactor the "s:LoadArgCount()" function (#3025)
* Refactor the "s:LoadArgCount()" function

Previously, this function would always set "v:errmsg" on the first
call with a given function.  This is because autoloaded functions
are not defined on the first call.

A number of improvements have been made:
 - a useless local function ("l:Function") is removed
 - the "execute()" builtin captures the output, instead of ":redir"
 - a ":try" block handles the case where a function is not defined
 - a useless ":if" is removed since ":redir" always defines the var
 - confusing quoting is re-written (remove double "'" chars)

Fixes: #3021
2020-03-04 20:56:22 +00:00
Kevin Locke 8c0b0f085f Alias ps1 filetype to powershell
Rather than requiring users to alias ps1 to powershell themselves,
include it in s:default_ale_linter_aliases.  Since [vim-ps1] is a
popular (the only?) PowerShell ftplugin and there do not appear to be
any other uses of ft=ps1 on vim.org, this seems like a safe and
reasonable default.

[vim-ps1]: http://www.vim.org/scripts/script.php?script_id=1327

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-02-16 14:03:41 -07:00
Andrew Lee 07ee4d39c5
misc: change email address for @ndrewtl
This is kind of a peculiar reason for a PR, but I no longer control the email listed. I want to change it to avoid people getting the wrong email for me. Also, I still control the domain, but if at any point I don't, I want to put down in writing that if you get an email from this, it's not from me.
2020-01-28 10:47:37 -08:00