* Updates `ale#lsp#response#ReadDiagnostics` to always store the full, unaltered diagnostic message from the LSP in question. The current process is to replace all newline characters with whitespace (' '), which then leads to broken formatting when viewing complex output from an LSP with `:ALEDetail` and other commands.
* Updates `ale#cursor#TruncatedEcho` to replace newline characters with a space ' ' instead of an empty string '' to retain the previous style of formatting for echoed messages.
Fixes: #2356Fixes: #3068Fixes: #2301
* Sets module search path to file directory for slang/verilog linter
Similar to iverilog behaviour.
See 699c0dbe80
Reasonable default behaviour, can be changed by adding '-y%s:h' to
`b:ale_verilog_slang_options` buffer variable.
* Adds filename to slang/verilog linter output
slang can parse other files based on the modules instances names find in
the current file and returns warning/error messages related to those
files that have the same pattern.
Adding the file name to the outputs avoid polluting the active buffer
with those messages.
* Absolute paths in slang/verilog linter messages
Otherwise temp files are not correctly detected
Adds the origin file directory as a module search path.
This is the default behaviour, this commit makes it explicit.
Note from the doc:
'-I' -> include search path
'-y' -> module search path
The space after '-y' seems mandatory, at least when I tested it with
vresion 5.032-46-g447ab12ce
* Add initialization_options to Sorbet LSP linter
Using a predefined object will ensure that Sorbet always receives an
object instead of an array. LSP defines the initializationOptions as
anything. Unfortunately Sorbet is too strict and raises an error when
anything other than an object is passed which causes the linter to fail
* Document empty objects will prevent Sorbet from properly initializing
* Some abs paths are not recognized for win32
Paths like "c:/abc/def.cpp" were not recognized as absolute on Windows.
* Fix test for mypy_handler
mypy handler not just simplifies path, but tries to convert path to
absolute.
This breaks detecting the project root when editing tests with a nested
pytest.ini file where other project files are available. The other files
are so common we can just removes this entirely and test that we
ignore it in one case.
https://github.com/facebook/pyrefly
The pyre project has evolved to pyrefly. This replaces the pyre linter
with a pyrefly one and removes the test files that were added for
finding the project root in the old pyre world.
Co-authored-by: Oliver Ruben Albertini <oliverruben@gmail.com>
File local variables in Emacs are used in a way similar to Vim
modelines. For example, at the end of the file you might find something
like the following:
%% Local Variables:
%% erlang-indent-level: 2
%% something-weird: t
%% End:
The `erlang-indent-level' variable in this list instructs the Erlang
mode to use two columns per indentation level. But since the
`something-weird' variable is likely unknown, both may be ignored.
By default, Emacs in batch mode ignores all variable/value pairs if it
encounters at least one that is not known to be safe. Setting
`enable-local-variables' to `:safe' tells Emacs to use only safe values
and ignore the rest.
Version 2 of golangci-lint introduces several breaking changes to the
command line arguments and the configuration file.
Thi PR updates ale integration to support both version 1.6x.x and 2.x.x
of golangci-lint.
The code is already passed with the code key of location list entry.
Before this change, when using the default message format, it appeared
twice in the description of each location list entry and twice in each
echo message.
Implement the diagnostics pull model with the LSP Neovim client. We
must handle messages a little different and tweak client capabilities
for pull diagnostics to work through the Neovim client.
Implement pull diagnostics in the VimL implementation so ALE is able
to track when servers are busy checking files. Only servers that
support this feature will return diagnostics these ways.
Ensure that basic ALE functions `ale.var`, `ale.escape`, and `ale.env`
are available in Lua. Cover all Lua code so far with busted tests,
fixing bugs where ALE variables can be set with Boolean values instead
of numbers. Document all functionality so far.
1. Add ale.setup and ale.setup.buffer for pure Lua configuration.
2. Update many global settings to use Booleans instead of numbers to
make types easiert to work with in Lua.
3. Radically reformat documentation and fix errors to make
documentation more usable for Neovim users.
Support TCP connections to language servers through Neovim's built in
client. In all but what is currently the nightly builds of Neovim
connections via a hostname will fail, but connections via an IP address
should function. We will still enable the built in Neovim client by
default anyway, as LSP clients very rarely connect over TCP.
Change logic so ALE's LSP implementation and the Neovim LSP client
retrieve the language_id for language clients at roughly the same time
via the same means. This makes ALE inform the language server what the
language for the language is for clients.
* feat: Add Zig zlint linter and handler for ALE
* docs: Add zlint documentation to ALE Zig integration guide
* docs: Updating docs for zlint support
* tests: Adding tests for checking zlint executable and command
* refactor: Move zlint configuration test to separate test file
* Refactor djlint linter code
This patch moves the code to the `autoload` directory, so it's available
when it's needed by a specific linter. This avoids redundant code when
another format supported by djlint is added.
* Add linting support for all formats supported by djlint
So far, the `djlint` linter in ALE only supported `html`, which is only
one of several file types supported by `djlint`.
This patch adds support for the following file types:
* gohtmltmpl
* handlebars
* htmlangular
* htmldjango
* jinja
* nunjucks
* Add djlint fixer for various HTML template formats
* Supported formats:
- html
- htmlangular
- htmldjango
- jinja
- handlebars
- nunjucks
- gohtmltmpl
* Add doc entries
* Add vader tests
---------
Co-authored-by: Adrian Vollmer <computerfluesterer@protonmail.com>
This adds Yara support to ALE using Avast's language server for Yara:
https://avast.github.io/yls/
A ".git" folder is used to determine the project_root so this means the
Yara rules must be in a git repo for the integration to work.
The server only have 1 optional argument (-v, --verbose). Since this is
the case, no additional configuration options are available.
---------
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
`ModeChanged` looks like a more reliable way to detect an "exit insert mode" event and is a lot simpler (doesn't need a timer). Also, it can detect some other transitions like `\<C-o\>` in insert mode.
The `ModeChanged` event is available in:
* [Vim 8.2.3430](f1e8876fa2)
* [NeoVim 0.7.0](69bd1e4e36)
---------
Co-authored-by: Dmitry Zolotukhin <zlogic@gmail.com>
* Add support for the [djlinter](https://www.djlint.com/)
* Add documentation and tests.
* Fix the name of the variable for the executable name.
* Correct the name of the handler in the test.
* Correct the test adding the value of vcol.
* Format djlint.vim according to formatting rules.
* Fixed the issue with Black ignoring files is being processed. (#3406)
Add test for stdin-filename on test/fixers/test_ruff_format_fixer_callback.vader
* Fixed the issue with Black ignoring files is being processed. (#3406)
Fixed the problem on Windows's tests.
* Fixed the issue with Black ignoring config file to tell it which file is being processed. Trailing whitespace removed