Age | Commit message (Collapse) | Author |
|
|
|
* 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
|
|
* 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.
|
|
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>
|
|
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.
|
|
* Add WGSL support using `naga` command
* Add documents for wgsl
* Add test for `naga` linter
* Separate naga handler callback to hanlder/naga.vim
|
|
* 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
|
|
* Add dprint fixer
* Fix windows tests
* dd dprint documentation
|
|
|
|
|
|
* 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.
|
|
|
|
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
|
|
* 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>
|
|
* 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>
|
|
* 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>
|
|
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>
|
|
* Show errors and warnings for the 'smlnj' linter
Fixes #3953
* Change smlnj stdIn regex
|
|
Co-authored-by: Dan George <dgeorge@anduril.com>
|
|
* 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>
|
|
* 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>
|
|
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
|
|
|
|
|
|
* fixer erblint
* erblint fixer test
|
|
|
|
|
|
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.
|
|
This requires the textprop and popupwin feature (vim 8.2).
Fixes #3906
|
|
|
|
* 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>
|
|
It is easier to explain this fix with an example:
* tsserver and LSPs ask for error information when you want to fix
error. tsserver `ts@getCodeFixes` command needs tsserver error code.
* now let's imagine that user has eslint and tsserver in use. Sometimes
both can report same error in different way.
* Now there is no guarantee which error will come first and if eslint
error comes first then tsserver will not return code fixes as we are
passing wrong error code to it.
This fix will return proper error code based on linter.
|
|
Without this, we have one `pyre` process running across different pyre
projects. With this change, files in different projects can be linted
with pyre at the same time.
Co-authored-by: Oliver Ruben Albertini <ora@fb.com>
|
|
Co-authored-by: Horacio Sanson <horacio@allm.inc>
|
|
Co-authored-by: Horacio Sanson <horacio@allm.inc>
|
|
* Fix truncated echo
In typescript, when putting the cursor on a `>` character of an arrow
function, the displayString body comes back as an empty string, and
means the split operation has 0 items, causing a failure when attempting
to call TruncatedEcho.
Even if there's a better fix, I'd assume this is a good safety since we
are injesting external data.
* Convert to use `empty()`
|
|
This User autocommand is trigged immediately after an LSP process is
successfully initialized. This provides a way to perform any additional
initialization work, such as setting up buffer-level mappings.
|
|
* Add support for cppcheck 1.34
* Add cppcheck 1.34 tests, correct pattern
Co-authored-by: Tyler S. Jordan <tsjorda@sandia.gov>
|
|
The .NET ecosystem has an official tool for formatting its files: `dotnet format`
This adds support for that tool to ALE.
|
|
* purs-tidy
* Dhall fixes: use stdin, docs errors
|
|
* purs-tidy
* Fixup for purs-tidy
|
|
* Adds fixer for golines
* Repositions golines docs to be in alphabetical order
* Fixes golines doc tag
* Fixes formatting for golines docs
|
|
* purs-tidy
* update email address for toastal
|
|
For some reason CI tests started failing with these errors:
> ale_linters/eruby/erb.vim:1:1: Use scriptencoding when multibyte char exists (see :help :scriptencoding)
> ale_linters/mail/languagetool.vim:1:1: Use scriptencoding when multibyte char exists (see :help :scriptencoding)
Not sure at which point or what changed for this to happen but this MR
fixes it by removing the multibyte chars present on the problem files.
Co-authored-by: Horacio Sanson <horacio@allm.inc>
|
|
* feat(deno): move init options to handlers
* feat(deno): add deno lsp support for js files
* feat(deno): use default map option
* feat(docs): add deno import map option
* feat(deno): add tests for importMap option
* fix(deno): use full path in importMap
* feat(deno): remove deno as linter for js, separate PR
* fix(deno): test for executable
* fix(deno-test): include filename to simplify function
|
|
* Add poetry support to python linters and black fixer.
* Update python.vim to detect poetry project.
* Update ale.vim, add an option for poetry `g:ale_python_auto_poetry`.
* Update ale-python.txt, add poetry support.
* Add and update poetry related tests.
Co-authored-by: unc0 <unc0@users.noreply.github.com>
|
|
* implement vim popups for preview
Details on implementation
-------------------------
- we make use of the |popupwin| api
- we split implementations (Nvim* vs. Vim* prefix) and call the right
one based on has('nvim')
- we follow a similar structure in each function, using the relevant API
- popup_list, win_execute, popup_settext in VimShow
- popup_create in VimCreate
- popup_close in VimClose
Some differences
----------------
- we DON'T have VimPrepareWindowContent because we use arguments to
popup_create for borders, padding, etc., and it also takes care of
buffer creation.
- we follow the protocol of setting and using w:preview for information,
but we only need the ID
- InsertEnter is the only autocommand required, because of
popup_create's moved argument. Any cursor movement with 'any' will
close the popup. This in turns means VimClose is only called from
InsertMode, so no mode-restoration necessary
- we don't tweak too much in the buffer because vim's popup buffers
already have most relevant settings and aren't editable without
calling popup functions.
- I enabled scrollbars, close buttons, dragging, and resizing
- vim popups get as big as they need to by default, so no worrying about
truncating/hiding/size
Note: we might want to consider changing w:preview to w:ale_preview to
avoid clashes if someone else tries to use the same variable
* floating window: document that vim supports it
* lint: fix indent/cont. lines
|
|
* Fix 3801 - Add ALEDummySign some width.
Due to changes in NeoVim 0.5 the g:ale_sign_column_always configuration
stopped working.
This PR sets the ALEDummySign to a blank space so when g:
ale_sign_column_always is set we have a sign with 1 width allowing the
configuration to work as before.
https://github.com/neovim/neovim/issues/13635
* Fix visual artifact on dummy sign
* Fix visual artifact on dummy sign (attempt 2)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
|
|
* Correct typo in a config file filename.
.tool_versions should be .tool-versions
* Correct typo in config file names.
.tool_versions should be .tool-versions
|
|
* racket: support racket-langserver lsp
* racket-langserver: find highest dir with init.rkt
* autoload/ale/racket: re-indent to 4 spaces
* racket: lint: sort supported tools
* racket: lint: function!
This is _not_ needed anymore, but the lint wants it. See :help E127
* racket-langserver: do not use new dict format
* racket: lint: use snake_case
* add tests for racket-langserver
* racket-langserver tests: correct result values
|