init
This commit is contained in:
commit
1e2ca5a6fc
71 changed files with 3330 additions and 0 deletions
27
config/json-foldable.nix
Normal file
27
config/json-foldable.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
autoGroups = {
|
||||
json-foldable = {
|
||||
clear = true;
|
||||
};
|
||||
};
|
||||
autoCmd = [
|
||||
{
|
||||
pattern = [ "*.json" ];
|
||||
event = [
|
||||
"BufRead"
|
||||
"BufNewFile"
|
||||
];
|
||||
desc = "Available to make json files foldable";
|
||||
group = "json-foldable";
|
||||
# https://vi.stackexchange.com/questions/10562/how-to-fold-text-in-a-json-file
|
||||
callback.__raw = ''
|
||||
function()
|
||||
vim.o.foldmethod = "expr"
|
||||
vim.o.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
-- vim.o.foldlevelstart not working for unknown reason
|
||||
vim.o.foldlevel = 99
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue