summaryrefslogtreecommitdiff
path: root/autoload
AgeCommit message (Collapse)Author
2023-05-06Add support for npm-groovy-lint (#4495)lucas-str
* Add support for npm-groovy-lint * Add doc and tests for npm-groovy-lint * Use ale#util#FuzzyJSONDecode instead of json_decode
2023-04-22Add fourmolu fixer (#4501)Pat Brisbin
* Add fourmolu fixer Fourmolu is aversion of Ormolu that supports configuration. This fixer was modeled after the Ormolu one, but using the "stack executable" approach of the Brittany and Stylish Haskell fixers. * Sort supported-tools.md
2023-03-31Added column alignment for errors (#4473)David le Blanc
2023-03-26Add support for `rustywind` fixer (#4477)Guillermo R. Roig Carralero
2023-03-14Fix `ale#util#GetBufferContents` and propagate use (#4457)Wilson E. Alvarez
* Use newline characters instead in ale#util#GetBufferContents * Propagate use of ale#util#GetBufferContents * Add ale#util#GetContentBuffer test
2023-03-08Clear virtualtext no matter how enabled (#4475)Daniel Harding
When toggling ALE off, clear the virtualtext even when g:ale_virtualtext_cursor is 'all'.
2023-03-07#2172 - Expand PATH in the shell for automatic virtualenvw0rp
2023-03-07Add deadnix linter (#4443)Albert Peschar
2023-02-21Fix #3616, #3903 - Use proper floating window borders in neovim (#4417)Oskar Haarklou Veileborg
* Fix #3616, #3903 - Use proper floating window borders in neovim * Compatibility w. length 6/7 ale_floating_window_border values
2023-02-08Attempt to fix auto virtualenv on Windowsw0rp
2023-02-08#2172 Auto PATH with ale_python_auto_virtualenvw0rp
Automatically set `PATH` for some Python linters that seem to need it when g:ale_python_auto_virtualenv or b:ale_python_auto_virtualenv is `1`.
2023-02-08Add support for lua-language-serverw0rp
2023-02-07Add alejandra for nix (#4435)Nathan Henrie
- Fixes https://github.com/dense-analysis/ale/issues/4434
2023-01-29diagnostics: support sending ALE output to Neovim's diagnostics API (#4345)Ben Boeckel
Support replacing ALE's display of problems with sending problems to the Neovim diagnostics API. :help g:ale_use_neovim_diagnostics_api Co-authored-by: David Balatero <dbalatero@users.noreply.github.com> Co-authored-by: Georgi Angelchev <angelchev@live.co.uk> Co-authored-by: w0rp <devw0rp@gmail.com>
2023-01-28Add `gopls format` as a Go fixerSean Enck
2023-01-27add: pycln as a python linter and fixer (#4415)Yining
this commit adds pycln as a Python linter and fixer, together with some tests and documentation. It addresses #4340 pycln repo: https://github.com/hadialqattan/pycln
2023-01-06Fix #4413 - Avoid errors for invalid buffers in ale#virtualtext#Clearw0rp
2023-01-04Fix #4410 - Ignore prop_add errorsw0rp
2022-12-30Fix #4408 - Trigger floating preview autocommand on BufWinLeave and ↵Leon
WinScrolled (#4409)
2022-12-27Fix #4331 - Shift line 0 errors to line 1 for virtual-textw0rp
2022-12-27Close #4401 - Use subtle defaults for virtual-textw0rp
Default virtual-text to the Comment highlight group and prefix virtual-text messages with comment text for each language by default. Messages can now be formatted with `%type%` to print the error type. The Vim 9.0 version has been updated in the Docker image to add test coverage for virtual-text.
2022-12-27#4400 - Remove virtual-text defaults from highlight.vimw0rp
2022-12-27Fix #4400 - Separate virtual text highlight groups to avoid errorsw0rp
2022-12-26Fix #4399 - Manage virtual-text state betterw0rp
2022-12-25Update ALE to v3.3.0w0rp
2022-12-25Close #4397 - Add human-readable values for g:ale_virtualtext_cursorw0rp
2022-12-25Enable ruff for Python by defaultw0rp
2022-12-22fix: ruff not registered as fixer (#4393)Yining
this commit fixes the issue reported at: https://github.com/dense-analysis/ale/issues/4301#issuecomment-1359289391 it also had some code refactored and tests added for ruff as fixer (missed in PR #4347).
2022-11-25Added support for more file types for clang-format. (#4367)Matheus
2022-11-23Fix bug in sqlfluff implementation & implement fixer support (#4365)Carl Smedstad
* Account for no sqlfluff output Avoid crashes when there isn't any output from sqlfluff. * Add supplort for sqlfluff as a fixer
2022-11-07Add raco_fmt fixer for Racket files (#4354)Jeremy Cantrell
* Add raco_fmt fixer for Racket files * Fix command and add test * Fix quoting
2022-11-05omni: racket should complete at end of keywords (#4352)D. Ben Knoble
Consider a file like ``` #lang racket (require racket/gui) ``` Type `Go(eventspace-`. Pressing <C-x><C-o> to trigger omnicomplete should suggest ``` eventspace-handler-thread eventspace-shutdown? eventspace-event-evt ``` It does not (instead producing "top-level" completions, as if `(eventspace-` wasn't even there). Debugging, place the cursor on a space _after_. Now `ale#completion#OmniFunc(1, '')` correctly returns `1`, but when given `(0, 'eventspace-')` it returns either the empty list or generic completion results as described above. I'm not entirely sure of the mechanism, but it seems that `b:ale_completion_info.prefix` is the key, and that this is set by `ale#completion#GetPrefix`. Calling `ale#completion#GetPrefix('racket', line('.'), col('.'))` returned `''`! Now, it returns `eventspace-` and the completions work correctly again. Ref #4293, #4186, #3870
2022-10-31add: support for ruff as a Python linter and fixer (#4347)Yining
this commit adds ruff as both a Python linter and fixer, together with some tests and documentation. ruff repo: https://github.com/charliermarsh/ruff
2022-10-29codespell: fix spelling errors picked out by `codespell` (#4343)Ben Boeckel
2022-10-12cc: fix using '-x c*-header' for header files with GCC. (#4334)Nicolas Pauss
Gcc does not support `x c*-header` when using `-` as input filename, which is what ALE does. Rework the feature to only use `-x c*-header` flag when using Clang and not GCC. The feature is now also controlled with the variable `g:ale_c_cc_use_header_lang_flag` and `g:ale_cpp_cc_use_header_lang_flag`.
2022-09-30Add fixer "css-beautify". Adjust "html-beautify." (#4319)Matheus Gabriel Werny de Lima
* Add fixer "css-beautify". Adjust "html-beautify." * Error fixes. * Added chars.
2022-09-30Added file types for dprint. (#4320)Matheus Gabriel Werny de Lima
2022-09-30Add pyright config files to project root files list (#4321)Andreas Doll
Add configuration files for pyright (JSON and TOML) to list of files which identify a project root directory. Update documentation accordingly. Co-authored-by: Andreas Doll <andreas.doll@posteo.de>
2022-09-25cc: use '-x c*-header' for header files for C and C++ linters. (#4318)Nicolas Pauss
When linting an header file in C or C++, `-x c-header` or `-x c++-header` should be used instead of `-x c` or `-x c++`. Using `-x c` or `-x c++` for headers files can lead to unused variables and functions marked as static inlined as seen in #4096. Using `-x c-header` or `-x c++-header` solve these issues. The list of file extensions that are considered as header files can be configured with the variables `g:ale_c_cc_header_exts` and `g:ale_cpp_cc_header_exts`.
2022-09-11Deno: find project root using deno.json/deno.jsonc (#4306)Dirk Jonker
Deno LSP automatically detects config files named deno.json or deno.jsonc since version 1.18. For Deno 1.18+ this means that ALE no longer needs to resolve the project root. However, removing the project root logic from ALE means breaking changes for people that are still using an older version. Adding deno.json to the list of looking files to look for will keep the behavior consistent and compatible with the Deno config file naming convention. See also: https://deno.com/blog/v1.18#auto-discovery-of-the-config-file
2022-09-11Fix 4155 - Show error when project root not found (#4207)Horacio Sanson
2022-09-08omni: find last racket keyword for completion (#4293)D. Ben Knoble
Otherwise it finds the first keyword, which is usually not relevant to the cursor position, and incorrectly calculates the completion position.
2022-09-07Implement buffer-wide virtual text support (#4289)Magnus Groß
* Remove virtual text via types-filter This is more robust and has the additional sideeffect that it will make it easier to implement showing virtual text for all warnings simultaneously. We definitely do not want to do a call to prop_remove() for every virtual text as that will cause noticeable lag when many warnings are present, thus we can use this to remove all virtual text lines with one call in the future. Fixes #4294 refs: https://github.com/vim/vim/pull/10945 * Allow virtual text to appear for all warnings of the buffer This can be enabled with: let g:ale_virtualtext_cursor = 2 It is implemented both for neovim and vim 9.0.0297. Note that sometimes it may appear like some warnings are displayed multiple times. This is not a bug in the virtual text implementation, but a sideeffect of multiple linters returning similar results. For example for Rust, the 'cargo' and 'rls' linters appear to be activated at the same time, but they sometimes return identical errors. This causes the virtual text to show the same warning twice. In the future we can mitigate this problem by removing duplicate errors from our internal location list. However users can also achieve cleaner warnings simply by activating only one linter for each language (or multiple unambiguous linters). For example for Rust, the problem could be solved with: let g:ale_linters = {'rust': ['analyzer']} Fixes #2962 Fixes #3666
2022-09-06Fix virtual text for vim 8.2 (#4291)Magnus Groß
Regression was introduced in d93bc2baf7532818e83bf2fac61fcd591beb6151 The problem was that we did not handle the edge case where there is no last popup to close, which caused old vim versions to enter code by accident that was only supposed to be run by vim 9. We fix this by guarding the if condition for vim 9. Fixes #4290
2022-08-23Allow callbacks for floating preview popups (#4247)Shaun Duncan
* Add extra config options for virtualtext * Undo virtualtext changes and move to floating preview * revert changes to pass hightlight group to floating preview * rename var * Document changes * Add updates based on feedback * Check for string type and attempt to call the function * Fix lint errors Co-authored-by: Shaun Duncan <shaun@speedscale.com>
2022-08-23Use native virtual-text for vim9 (#4281)Magnus Groß
Our current virtual text implementation for vim emulates it by abusing the textprop and popupwin feature from vim 8.2 (for more details see commit 708e810414d124b17b0c42e872b387a7a6c2ea85). This implementation sometimes is janky, for example the popups may leak into other vim windows next to the current window. Luckily, vim just got native virtual-text support as a proper subtype to the prop_add() function. By using the 'text' option, the text property automatically becomes virtual text that is appended to the current line if col is zero. Note that the prop_add() method now returns negative IDs for virtual text properties. This feature was added in vim 9.0.0067, but it got a lot of bugfixes which is why we only use this new API if vim has at least version 9.0.0214. However, there are still some minor bugs with vim's native virtual text, so we might have to bump the version check again in the future. Also see #3906. Now with proper virtual text support for both vim and neovim available, we can tackle #2962 in the future by simply tracking multiple virt-texts instead of just the last one. In the future we might also want to disable our virtual text emulation support for vim, as it is a total hack, but for now we should keep it for backwards compatibility.
2022-08-18fix #4276: honor b:ale_enabled for hover at cursor (#4277)Hongbo Liu
* fix #4276: honor b:ale_enabled for hover at cursor * fix indention
2022-08-09Add support for syntax_tree fixer (#4268)Mo Lawson
This is the library that now powers prettier/plugin-ruby but is also stands on its own: https://github.com/ruby-syntax-tree/syntax_tree
2022-08-07Add openscad and sca2d support (#4205)Nathan Henrie
2022-07-26Prevent buffering of job output and excessive polling (#4259)Tomáš Janoušek
When 'close_cb' is set for job_start(), but out_cb or err_cb isn't, vim buffers data instead of dropping it (in case someone wanted to read and process it in close_cb), and additionally polls for new data every 10 milliseconds, causing excessive wakeups and CPU usage. Since we don't read the data anywhere outside of out_cb/err_cb, any LSP that prints an error to stderr triggers this and vim keeps spinning until :ALEStopAllLSPs. Fix this by always setting both callbacks, thus dropping any data we're not interested in. See https://github.com/vim/vim/issues/10758 for an upstream report of the excessive polling. It's possible this is intentional, I dunno. Fixes: b42153eb1786 ("Fix #4098 - Clear LSP data when servers crash")