| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
This prepares the editorconfig plugin for upcoming changes in
vis version 0.9. See the following two commits:
https://github.com/martanne/vis/commit/450dc2df6a3b6443e372dc86cbefc8fede71b54d
https://github.com/martanne/vis/commit/de315f878fba5b6abf2810a05995ae1f5b00d45d
Thanks to Florian Fischer for bringing the issue to my attention.
|
| |
|
|
|
|
|
|
|
|
|
| |
This hook was intended to be used to re-parse editorconfig
files after writing changes to disk. The idea was that, if the
file being written to disk should be an editorconfig file,
the changes to that file might be applied directly. Since
this does not seem to work properly at the moment, removing
this hook should at least make the code more straightforward.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define the plugin specific variables that are accessed multiple times
from within the plugin as members in the module table.
Return the module table to allow the user of the plugin to modify
those values.
To enable the hooks the user can write
```lua
local edconf = require('plugins/vis-editorconfig')
edconf.hooks_enabled = true
```
in their visrc.lua file.
|
|
|
|
|
| |
edconf_hooks_enabled can not be made local because it is referenced
before its declaration.
|
|
|
|
|
|
| |
Lua uses the global scope per default.
To not clutter the global namespace define function-local variables as
local.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Discussion on the editorconfig standard seems to converge
on calling the property 'spelling_language' rather than
'spell_language' (see [1]). This commit adjusts both the
value that is expected to be found in .editorconfig files
as well as the internal variable that stores this property.
Note to editorconfig users: This commit changes the plugin's
behaviour in a non backwards compatible way. All editorconfig
files that contain the 'spell_language' property need to be
updated.
Note to spellchecker plugin developers: Since this commit
also updates the internal variable name, plugins need to
update this name as well.
[1] https://github.com/editorconfig/specification/pull/41
|
|
|
|
|
|
|
|
|
|
| |
When saving an empty file in a directory containing an editorconfig
using the insert_final_newline option the content lookup 'file.size-1'
fails.
Fix this by only adding a final newline if the file contains any data.
Signed-off-by: Florian Fischer <florian.fischer@muhq.space>
|
|
|
|
| |
Signed-off-by: Tai Chi Minh Ralph Eastwood <tcmreastwood@gmail.com>
|
|
|
|
|
|
|
|
| |
This reverts commit 556370f35d4486ad01d549a7f6ff24618a547908.
It looks like nobody is interested in using 'vis_*' keys.
If that changes, drop me a note to revert the revert. Until
then, not having this feature seems to be the cleaner way.
|
|
|
|
|
| |
This is not part of the editorconfig specs, but has been proposed
(cf. https://github.com/editorconfig/editorconfig/issues/315).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the editorconfig specification,
insert_final_newline = false
is supposed to mean stripping final newlines, if present. See
https://editorconfig-specification.readthedocs.io/#supported-pairs
> insert_final_newline Set to true ensure file ends with a
> newline when saving and false to ensure it doesn’t.
To my understanding, ensuring that a file doesn't end with a
newline means stripping all trailing newlines.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Editorconfig tends to complain that the path should be a full
path. Adjusting the call to the one specified for the FILE_OPEN
hook solves that for me. I'm not sure if this also occurs with
editorconfig-core-lua < 0.3.0, though.
|
| |
|
| |
|
|
The lua module has been renamed to editorconfig in v0.3.0.[1] The
rename could trigger a naming conflict with the `editorconfig.lua`
module in vis. This commit includes a rename of the script to
`edconf.lua` to prevent the naming conflict.
[1]: https://github.com/editorconfig/editorconfig-core-lua/commit/3393dcf59cdc9e86102a56b2cd4b7aca60f45cee
|