mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-28 19:40:06 +02:00
editorconfig: Add editorconfig plugin (#265)
This is temporary, until neovim 0.9 when we will have builtin editorconfig
This commit is contained in:
parent
ac2d771f55
commit
d531c836d4
3 changed files with 78 additions and 0 deletions
18
tests/test-sources/plugins/utils/editorconfig.nix
Normal file
18
tests/test-sources/plugins/utils/editorconfig.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
# TODO: convert to disable test in neovim 0.9
|
||||
empty = {
|
||||
plugins.editorconfig.enable = true;
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.editorconfig.enable = true;
|
||||
plugins.editorconfig.properties.foo = ''
|
||||
function(bufnr, val, opts)
|
||||
if opts.charset and opts.charset ~= "utf-8" then
|
||||
error("foo can only be set when charset is utf-8", 0)
|
||||
end
|
||||
vim.b[bufnr].foo = val
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue