mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-06 02:49:33 +00:00
languages/gettext: init
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate documentation builds-1 (push) Has been cancelled
Treewide Checks / Validate documentation builds-2 (push) Has been cancelled
Treewide Checks / Validate documentation builds-3 (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate documentation builds-1 (push) Has been cancelled
Treewide Checks / Validate documentation builds-2 (push) Has been cancelled
Treewide Checks / Validate documentation builds-3 (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
This commit is contained in:
parent
7957115983
commit
d847d401be
4 changed files with 39 additions and 0 deletions
|
|
@ -107,6 +107,7 @@ isMaximal: {
|
||||||
svelte.enable = false;
|
svelte.enable = false;
|
||||||
tera.enable = false;
|
tera.enable = false;
|
||||||
twig.enable = false;
|
twig.enable = false;
|
||||||
|
gettext.enable = false;
|
||||||
fluent.enable = false;
|
fluent.enable = false;
|
||||||
|
|
||||||
# Nim LSP is broken on Darwin and therefore
|
# Nim LSP is broken on Darwin and therefore
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,8 @@
|
||||||
- Add `languages.fluent` using the official plugin. This only provides
|
- Add `languages.fluent` using the official plugin. This only provides
|
||||||
highlighting.
|
highlighting.
|
||||||
|
|
||||||
|
- Add `languages.gettext`. This only provides highlighting.
|
||||||
|
|
||||||
- Add `languages.openscad` using
|
- Add `languages.openscad` using
|
||||||
[`openscad-lsp`](https://github.com/Leathong/openscad-LSP). This currently
|
[`openscad-lsp`](https://github.com/Leathong/openscad-LSP). This currently
|
||||||
relies on neovim builtin syntax for highlighting, and the lsp for formatting
|
relies on neovim builtin syntax for highlighting, and the lsp for formatting
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ in {
|
||||||
./just.nix
|
./just.nix
|
||||||
./make.nix
|
./make.nix
|
||||||
./xml.nix
|
./xml.nix
|
||||||
|
./gettext.nix
|
||||||
./fluent.nix
|
./fluent.nix
|
||||||
./openscad.nix
|
./openscad.nix
|
||||||
|
|
||||||
|
|
|
||||||
35
modules/plugins/languages/gettext.nix
Normal file
35
modules/plugins/languages/gettext.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
|
inherit (lib.nvim.types) mkGrammarOption;
|
||||||
|
inherit (lib.options) mkEnableOption literalExpression;
|
||||||
|
|
||||||
|
cfg = config.vim.languages.gettext;
|
||||||
|
# TODO: package `msgfmt --check` into nvim-lint
|
||||||
|
# TODO: package `msgcat` into conform.nvim
|
||||||
|
in {
|
||||||
|
options.vim.languages.gettext = {
|
||||||
|
enable = mkEnableOption "gettext portable object language support";
|
||||||
|
|
||||||
|
treesitter = {
|
||||||
|
enable =
|
||||||
|
mkEnableOption "gettext portable object language treesitter"
|
||||||
|
// {
|
||||||
|
default = config.vim.languages.enableTreesitter;
|
||||||
|
defaultText = literalExpression "config.vim.languages.enableTreesitter";
|
||||||
|
};
|
||||||
|
package = mkGrammarOption pkgs "po";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
(mkIf cfg.treesitter.enable {
|
||||||
|
vim.treesitter.enable = true;
|
||||||
|
vim.treesitter.grammars = [cfg.treesitter.package];
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue