summaryrefslogtreecommitdiff
path: root/autoload
AgeCommit message (Collapse)Author
2022-04-30vscode-json-languageserver support (#4164)Dalius Dobravolskas
* vscode-json-languageserver-bin support VSCode JSON languageserver has schema support for linting and completions. I have enabled snippets support (`snippetSupport`) even if it is not fully supported. `label` that comes with completions response can be used as well. * Test fix. * vscode-json-languageserver instead of vscode-json-languageserver-bin vscode-json-languageserver is more up-to-date (about 1 year old), vscode-json-languageserver-bin is 4 years old. * Use git root. * Documentation update. * Trying to sort ordering issue. * One more attempt * One more attempt * Uppercase seems to win. * Clean-up * Clean-up 2 * Test removed.
2022-04-30Add ALEGoToImplementation (#4160)godbless
* Add go to implementation * Add test cases for GoToImplementation * Add documentation for GoToImplementation
2022-04-29Add CodeAction codeActionLiteralSupport Feature (#4163)godbless
* Advertise codeActionLiteralSupport to LSP server Without this, rust-analyzer doesn't return any code actions. With it, everything works properly. * linter fixes * test cases fixes * Fix underflow of column in position. Special values like for example -1 to denote the end of a line are not supported. [reference](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position) Co-authored-by: Brian Gernhardt <brian@gernhardtsoftware.com>
2022-04-06Add buf linter and fixer (#4128)Alex McKinney
* Add buf lint to linters * Add buf format to fixers * Fix test/linter/test_buf_lint.vader * Fix test/fixers/test_buf_format_fixer_callback.vader * Simplify test/test-files/proto/testfile.proto * Add buf-lint alias and rename linter
2022-04-06Handle ghc panic in haskell (#4145)lykmast
* Add primitive handling of ghc panic. * PascalCase in function. * Add simple test.
2022-04-06Add the buffer-local options 'b:ale_shell' and 'b:ale_shell_arguments'. (#4146)James Cherti
2022-04-06Fix 4141 - Stop press enter prompt on long diagnostic messages (#4144)Horacio Sanson
* Fix 4141 - Stop press enter prompt on long diagnostic messages * Fix 4139 - Check for array before join truncated_echo
2022-04-01Fix test for echoing messagesw0rp
The previous linter rule about stray echo lines has been restored, and now all problems for custom linting rules can be ignored by adding a comment above problem lines.
2022-04-01Use echon over echom for cursor echo (#3888)Amadeus Demarzi
* Problem messages no longer clutter `:messages` * Messages are truncated better
2022-04-01Set default value for insertTextFormat (#4124)João Costa
Co-authored-by: w0rp <devw0rp@gmail.com>
2022-04-01Add neovim 0.6 to run-tests (#3998)Horacio Sanson
* Update test scripts * Remove neovim 0.3 and 0.4 * Add neovim 0.6.1 Co-authored-by: Horacio Sanson <horacio@allm.inc> Co-authored-by: w0rp <devw0rp@gmail.com>
2022-04-01Fix end line number when it exceeds the file (#4130)Felix Maurer
If the end of the error exceeds the file, set it to the last line, similarly as it is done with the beginning of the error.
2022-03-20Fix :ALEImport column positionyoshi1123
Fix :ALEImport column position so it works with more language servers. Co-authored-by: w0rp <devw0rp@gmail.com>
2022-03-05Bump ALE to v3.2.0w0rp
2022-03-05Document default linter selections againw0rp
2022-03-04Fix an argument namew0rp
2022-03-04Enable autoimport by default (#4102)Horacio Sanson
2022-03-04Add eclipselsp jdt:// support for textDocument/definition (#4030)yoshi1123
This patch adds support for opening jdt:// links on "go to definition" requests returned by Java language servers. Co-authored-by: w0rp <devw0rp@gmail.com>
2022-03-02Fix #4098 - Clear LSP data when servers crashw0rp
2022-02-09Sometimes end_lnum and end_col are not present (#4062)Horacio Sanson
2022-02-08Dispatch textDocument/didChange after rename (2) (#4049)Jerko Steiner
* Dispatch textDocument/didChange after rename Previously whenever we renamed a symbol that was referenced from other files we'd just edit those files in the background, and the LSP wouldn't know about these changes. If we tried to rename the same symbol again, the renaming would fail. In some scenarios, the operation would just be wrong. Here is an attempt to fix this issue. I also noticed another bug when using Go with `gopls` LSP and the `gofmt` fixer. Whenever the file was saved, the `gofmt` would run and reformat the file. But it seems there was some kind of a race condition so I disabled saving for now, and all of the modified files will be unsaved, so the user should call `:wa` to save them. I personally like this even better because I can inspect exactly what changes happened, and I instantly see them in the other opened buffers, which was previously not the case. Fixes #3343, #3642, #3781. * Address PR comments * Remove mode tests in corner case tests * Address PR comments * Save after ALERename and ALEOrganizeImports Also provide options to disable automatic saving, as well as instructions to enable `set hidden` before doing that. * Fix broken test * Save only when !&hidden * Update doc * Update doc * Add silent
2022-02-05Allows to use quickfix for references. (#4033)Dalius Dobravolskas
* Allows to use quickfix for references. E.g. following mapping could be used to find references for item under cursor and put result into quickfix list: ``` nnoremap <leader>af :ALEFindReferences -quickfix<CR> ``` Fixes #1759 * Documentation update.
2022-02-04Treat ale_open_list integer values as thresholds (#4050)nospam2998
Only open list window if the number of warnings or errors equals to or exceeds the value of ale_open_list. No change when set to `1`. Co-authored-by: cos <cos>
2022-02-04Add ALEPopulateQuickfix and ALEPopulateLocList (#3761)David Briscoe
Closes #1810 Add ALEPopulateQuickfix and ALEPopulateLocList. They're not very useful with ale's default auto-populate behaviour, so their useful configuration is described in help.
2022-02-04Add `naga` linter for WGSL support (#4047)Linda_pp
* Add WGSL support using `naga` command * Add documents for wgsl * Add test for `naga` linter * Separate naga handler callback to hanlder/naga.vim
2022-01-05Fix 4004 - Disable eslint by default for json. (#4023)Horacio Sanson
* Fix 4004 - Disable eslint by default for json. This PR disables, or more correctly, excludes eslint from the list of default linters for json files. Also fixes elixir, go, json5, and jsonc files documentation and default linters to make them consistent. * Fix and improve tests
2022-01-04Add dprint fixer (#4024)Nathan
* Add dprint fixer * Fix windows tests * dd dprint documentation
2021-12-28Add auto-fixer for crystal (#4016)Alex Piechowski
2021-12-25Fix 3998 - add language option to uncrustify fixer (#4007)Horacio Sanson
2021-12-17ALEFileRename command added. (#4012)Dalius Dobravolskas
* ALEFileRename command added. This command renames file and uses tsserver `getEditsForFileRename` to fix import paths in Typescript files. * ale#util#Input fix * Even more fixes. * Linting error fix.
2021-12-09Fix check for did_save and includeText capabilities (#4008)Horacio Sanson
2021-12-09Initialize hl-groups correctly if virtual text is loaded first (#3960)Magnus Groß
If virtualtext.vim is autoloaded first, it will link ALEVirtualTextWarning to ALEWarning. But ALEWarning is not initialized yet, so it will create ALEWarning, but with no color definition set. Shortly after, highlight.vim is autoloaded, which would usually link ALEWarning to SpellCap, but only if ALEWarning is not already set. However since ALEWarning is already initialized due to the previous link, we skip this and never actually come around to properly initializing it. We fix this by initializing all highlight groups in highlight.vim, thus satisfying the dependency of ALEVirtualTextWarning being initialized after ALEWarning. Fixes #3585
2021-11-20Fix --file-filter option on cppcheck command (#3987)Dan George
* Add cppcheck handler match on misra msg * Fix cppcheck --file-filter setting This time, the tests and actually usage both work. Co-authored-by: Dan George <dgeorge@anduril.com>
2021-11-19Add cspell Linter (#3981)David Houston
* Add cspell linter Add cspell linter, with the languages it supports. Signed-off-by: David Houston <houstdav000@gmail.com> * Add cspell Global Variables Documentation Add documentation to /doc/ale.txt with cspell configuration options. Signed-off-by: David Houston <houstdav000@gmail.com> * Add cspell to docs, Minor Cleanup Add cspell for each supported language, adding some spaces and removing others when caught navigating the file. Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-18Cppcheck buffered file only (#3983)Dan George
* Add cppcheck handler match on misra msg * Use --file-filter cppcheck option Cppcheck recently added --file-filter so that cppcheck only checks the filtered files, even when using --project option, which checks all files in the project, by default. The --ccpcheck-build-dir option didn't help enough (at all?). * Added C test cases Also fixed and assumed typo: foo.c, instead of foo.cpp * Replace hard-coded full path filenames Attempt to fix the windows platform test execution. * Fix typo - foo.c, instead of foo.cpp * Reset buffer var between tests * Handle header files in cppcheck Cppcheck isn't designed to check header files, stand-alone. Daniel Marjamäki suggested using --suppress options to avoid FPs. * Fix Vint complaint in cppcheck handler. * Fix file path in cppcheck handler Co-authored-by: Dan George <dgeorge@anduril.com>
2021-11-18Rewrite Alex Integration to Use stdin (#3982)David Houston
Since having been added, the `alex` tool has added support for linting on stdin. Rewrite this integration to reduce the number of tools requiring disk-write access. Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-15Show errors and warnings for the 'smlnj' linter (#3957)Chuan Wei Foo
* Show errors and warnings for the 'smlnj' linter Fixes #3953 * Change smlnj stdIn regex
2021-11-15Add cppcheck handler match on misra msg (#3980)Dan George
Co-authored-by: Dan George <dgeorge@anduril.com>
2021-11-12Implement statix Linter and Fixer (#3969)David Houston
* Add Statix for Linting Add `statix check` as a linter. Provides a simple set of definition tests additionally. Variable names specify "check" to allow for later addition of `statix fix` as a formatter once stream support is added. Signed-off-by: David Houston <houstdav000@gmail.com> * Fixup Supported Tools List I didn't realise there were two separate lists of tools, so add statix to the other list. Also, remembered "S" comes after "R", and so re-ordered it. Signed-off-by: David Houston <houstdav000@gmail.com> * Fix statix Test File I refactored the variables for statix to allow for writing a fixer later, and forgot to update them in the test, so update them now. Also remove a stray "i", add missing space before checks Signed-off-by: David Houston <houstdav000@gmail.com> * Update Output Stream for v0.4.0 statix v0.4.0 provides a breaking change of output stream from stderr to stdout. Signed-off-by: David Houston <houstdav000@gmail.com> * Add statix fix Fixer Implement statix fix as a fixer for simple Nix antipatterns. Signed-off-by: David Houston <houstdav000@gmail.com> * Fix statix Fixer Tests Fix the statix fixer tests by removing the unnecessary 'read_temporary_file' value from the command, since it simply uses the default value. Signed-off-by: David Houston <houstdav000@gmail.com> * Add statix Handler Test Add a test for the statix handler per @hsanson's request. Signed-off-by: David Houston <houstdav000@gmail.com> * Fix to run only on stdin for linting Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-09Implement gofumpt Fixer (#3968)David Houston
* Implement gofumpt Fixer Add an implementation with test and documentation for the gofumpt go code formatter, a stricter formatter than your standard "go fmt". Signed-off-by: David Houston <houstdav000@gmail.com> * Add gofumpt to ale.txt TOC Forgot to add gofumpt to the ALE vim help Table of Contents, so do so. Signed-off-by: David Houston <houstdav000@gmail.com> * Fix Test Setup Method Capitalization I had put "Setup" instead of "SetUp" for "ale#assert#SetUpFixerTests". Fix such. Signed-off-by: David Houston <houstdav000@gmail.com> * Fix typos Add a missing space, remove an extra bracket by actually running tests locally first. Would've been smart to do that from the beginning... Signed-off-by: David Houston <houstdav000@gmail.com>
2021-10-24Replace line breaks in virtual text with whitespace (#3949)Magnus Groß
Before this patch multiline warnings would appear in a single line with '^@' as separator. Now we use whitespace as separator to improve the appearance. Also strip trailing whitespace, newlines, etc... Fixes #3939
2021-10-16Fix 3941 - add version check to isort fixer (#3942)Horacio Sanson
2021-10-15Fix 3207 - do not send didSave notification if not supported (#3930)Horacio Sanson
2021-10-11erblint as fixer (#3935)Roeland
* fixer erblint * erblint fixer test
2021-10-07Implement textDocument/didSave includeText optional argument (#3925)Wilson E. Alvarez
2021-10-07sml: use filenames (fix #1084) (#3860)D. Ben Knoble
2021-10-07codefix: Fix code actions that return Command[] directly instead of ↵Tomáš Janoušek
CodeAction[] (#3929) According to https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#textDocument_codeAction, the response to textDocument/codeAction is: (Command | CodeAction)[] | null and the code only handled the case where it was a CodeAction that either specified an edit or a command, but didn't handle a direct Command. Note that the specification also says that both can be specified and then the edit is applied first, then the command. Furthermore, there seems to be some hacky code handling arguments directly, which I suspect is non-standard and only works with a specific LSP server that happens to pass the edits in the arguments unmodified.
2021-10-02Implement virtual text support for vim (#3915)Magnus Groß
This requires the textprop and popupwin feature (vim 8.2). Fixes #3906
2021-09-23Fix: Failed to execute rubocop fixer on other machine (#3916)Yuto Ito
2021-09-21Add support for jsonnetfmt and jsonnet-lint (#3907)Trevor Whitney
* update to lates Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * fix up docs Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * fix docs Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * get tests passing Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * update regex Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com> * use ale#Pad and AssertFixer Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>