mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/ts-comments-nvim: init
This commit is contained in:
parent
add9aca76e
commit
4f01fd981a
2 changed files with 170 additions and 0 deletions
89
plugins/by-name/ts-comments/default.nix
Normal file
89
plugins/by-name/ts-comments/default.nix
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||||
|
name = "ts-comments";
|
||||||
|
originalName = "ts-comments.nvim";
|
||||||
|
package = "ts-comments-nvim";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.khaneliman ];
|
||||||
|
|
||||||
|
settingsOptions = {
|
||||||
|
lang =
|
||||||
|
lib.nixvim.defaultNullOpts.mkAttrsOf lib.types.anything
|
||||||
|
{
|
||||||
|
astro = "";
|
||||||
|
axaml = "";
|
||||||
|
blueprint = "// %s";
|
||||||
|
c = "// %s";
|
||||||
|
c_sharp = "// %s";
|
||||||
|
clojure = [
|
||||||
|
";; %s"
|
||||||
|
"; %s"
|
||||||
|
];
|
||||||
|
cpp = "// %s";
|
||||||
|
cs_project = "";
|
||||||
|
cue = "// %s";
|
||||||
|
fsharp = "// %s";
|
||||||
|
fsharp_project = "";
|
||||||
|
gleam = "// %s";
|
||||||
|
glimmer = "{{! %s }}";
|
||||||
|
graphql = "# %s";
|
||||||
|
handlebars = "{{! %s }}";
|
||||||
|
hcl = "# %s";
|
||||||
|
html = "";
|
||||||
|
hyprlang = "# %s";
|
||||||
|
ini = "; %s";
|
||||||
|
ipynb = "# %s";
|
||||||
|
javascript = {
|
||||||
|
__unkeyed-1 = "// %s";
|
||||||
|
__unkeyed-2 = "/* %s */";
|
||||||
|
call_expression = "// %s";
|
||||||
|
jsx_attribute = "// %s";
|
||||||
|
jsx_element = "{/* %s */}";
|
||||||
|
jsx_fragment = "{/* %s */}";
|
||||||
|
spread_element = "// %s";
|
||||||
|
statement_block = "// %s";
|
||||||
|
};
|
||||||
|
kdl = "// %s";
|
||||||
|
php = "// %s";
|
||||||
|
rego = "# %s";
|
||||||
|
rescript = "// %s";
|
||||||
|
rust = [
|
||||||
|
"// %s"
|
||||||
|
"/* %s */"
|
||||||
|
];
|
||||||
|
sql = "-- %s";
|
||||||
|
styled = "/* %s */";
|
||||||
|
svelte = "";
|
||||||
|
templ = {
|
||||||
|
__default = "// %s";
|
||||||
|
component_block = "";
|
||||||
|
};
|
||||||
|
terraform = "# %s";
|
||||||
|
tsx = {
|
||||||
|
__default = "// %s";
|
||||||
|
"/* %s */" = null;
|
||||||
|
call_expression = "// %s";
|
||||||
|
jsx_attribute = "// %s";
|
||||||
|
jsx_element = "{/* %s */}";
|
||||||
|
jsx_fragment = "{/* %s */}";
|
||||||
|
spread_element = "// %s";
|
||||||
|
statement_block = "// %s";
|
||||||
|
};
|
||||||
|
twig = "{# %s #}";
|
||||||
|
typescript = [
|
||||||
|
"// %s"
|
||||||
|
"/* %s */"
|
||||||
|
];
|
||||||
|
vue = "";
|
||||||
|
xaml = "";
|
||||||
|
}
|
||||||
|
''
|
||||||
|
Configure comment string for each language.
|
||||||
|
|
||||||
|
`ts-comments.nvim` uses the default Neovim `commentstring` as a fallback, so there's no need to configure every language.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
81
tests/test-sources/plugins/by-name/ts-comments/default.nix
Normal file
81
tests/test-sources/plugins/by-name/ts-comments/default.nix
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.ts-comments.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
default = {
|
||||||
|
plugins.ts-comments = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
lang = {
|
||||||
|
astro = "";
|
||||||
|
axaml = "";
|
||||||
|
blueprint = "// %s";
|
||||||
|
c = "// %s";
|
||||||
|
c_sharp = "// %s";
|
||||||
|
clojure = [
|
||||||
|
";; %s"
|
||||||
|
"; %s"
|
||||||
|
];
|
||||||
|
cpp = "// %s";
|
||||||
|
cs_project = "";
|
||||||
|
cue = "// %s";
|
||||||
|
fsharp = "// %s";
|
||||||
|
fsharp_project = "";
|
||||||
|
gleam = "// %s";
|
||||||
|
glimmer = "{{! %s }}";
|
||||||
|
graphql = "# %s";
|
||||||
|
handlebars = "{{! %s }}";
|
||||||
|
hcl = "# %s";
|
||||||
|
html = "";
|
||||||
|
hyprlang = "# %s";
|
||||||
|
ini = "; %s";
|
||||||
|
ipynb = "# %s";
|
||||||
|
javascript = {
|
||||||
|
__default = "// %s";
|
||||||
|
"/* %s */" = null;
|
||||||
|
call_expression = "// %s";
|
||||||
|
jsx_attribute = "// %s";
|
||||||
|
jsx_element = "{/* %s */}";
|
||||||
|
jsx_fragment = "{/* %s */}";
|
||||||
|
spread_element = "// %s";
|
||||||
|
statement_block = "// %s";
|
||||||
|
};
|
||||||
|
kdl = "// %s";
|
||||||
|
php = "// %s";
|
||||||
|
rego = "# %s";
|
||||||
|
rescript = "// %s";
|
||||||
|
rust = [
|
||||||
|
"// %s"
|
||||||
|
"/* %s */"
|
||||||
|
];
|
||||||
|
sql = "-- %s";
|
||||||
|
styled = "/* %s */";
|
||||||
|
svelte = "";
|
||||||
|
templ = {
|
||||||
|
__default = "// %s";
|
||||||
|
component_block = "";
|
||||||
|
};
|
||||||
|
terraform = "# %s";
|
||||||
|
tsx = {
|
||||||
|
__unkeyed-1 = "// %s";
|
||||||
|
__unkeyed-2 = "/* %s */";
|
||||||
|
call_expression = "// %s";
|
||||||
|
jsx_attribute = "// %s";
|
||||||
|
jsx_element = "{/* %s */}";
|
||||||
|
jsx_fragment = "{/* %s */}";
|
||||||
|
spread_element = "// %s";
|
||||||
|
statement_block = "// %s";
|
||||||
|
};
|
||||||
|
twig = "{# %s #}";
|
||||||
|
typescript = [
|
||||||
|
"// %s"
|
||||||
|
"/* %s */"
|
||||||
|
];
|
||||||
|
vue = "";
|
||||||
|
xaml = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue