mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-10 01:04:34 +02:00
plugins/femaco: init
This commit is contained in:
parent
b3d857573b
commit
a54b752259
3 changed files with 225 additions and 0 deletions
82
tests/test-sources/plugins/by-name/femaco/default.nix
Normal file
82
tests/test-sources/plugins/by-name/femaco/default.nix
Normal file
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.femaco.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.femaco = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
prepare_buffer.__raw = ''
|
||||
function(opts)
|
||||
local buf = vim.api.nvim_create_buf(false, false)
|
||||
return vim.api.nvim_open_win(buf, true, opts)
|
||||
end
|
||||
'';
|
||||
float_opts.__raw = ''
|
||||
function(code_block)
|
||||
return {
|
||||
relative = 'cursor',
|
||||
width = require('femaco.utils').clip_val(5, 120, vim.api.nvim_win_get_width(0) - 10),
|
||||
height = require('femaco.utils').clip_val(5, #code_block.lines, vim.api.nvim_win_get_height(0) - 6),
|
||||
anchor = 'NW',
|
||||
row = 0,
|
||||
col = 0,
|
||||
style = 'minimal',
|
||||
border = 'rounded',
|
||||
zindex = 1,
|
||||
}
|
||||
end
|
||||
'';
|
||||
ft_from_lang.__raw = ''
|
||||
function(lang)
|
||||
return lang
|
||||
end
|
||||
'';
|
||||
post_open_float.__raw = ''
|
||||
function(winnr)
|
||||
vim.wo.signcolumn = 'no'
|
||||
end
|
||||
'';
|
||||
create_tmp_filepath.__raw = ''
|
||||
function(filetype)
|
||||
return os.tmpname()
|
||||
end
|
||||
'';
|
||||
ensure_newline.__raw = ''
|
||||
function(base_filetype)
|
||||
return false
|
||||
end
|
||||
'';
|
||||
normalize_indent.__raw = ''
|
||||
function (base_filetype)
|
||||
return false
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.femaco = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
ft_from_lang.__raw = ''
|
||||
function(lang)
|
||||
if mapped_filetype[lang] then
|
||||
return mapped_filetype[lang]
|
||||
end
|
||||
return lang
|
||||
end
|
||||
'';
|
||||
ensure_newline.__raw = ''
|
||||
function(base_filetype)
|
||||
return true
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue