diff --git a/configuration.nix b/configuration.nix index cc314288..a0d53997 100644 --- a/configuration.nix +++ b/configuration.nix @@ -94,6 +94,7 @@ isMaximal: { tailwind.enable = false; svelte.enable = false; + tera.enable = false; # Nim LSP is broken on Darwin and therefore # should be disabled by default. Users may still enable diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 8c06cfcf..a0070412 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -23,4 +23,12 @@ [ccc.nvim]: https://github.com/uga-rosa/ccc.nvim - Added [ccc.nvim] option {option}`vim.utility.ccc.setupOpts` with the existing - hard-coded options as default values. + hard-coded options as default values + +[Snoweuph](https://github.com/snoweuph): + +- Added [tera](https://keats.github.io/tera/) language support (syntax highlighting only). +- Added neovim theme `grubber-darker` . +- Added neovim builtin theme `habamax`. + + diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index fd45758f..4681366b 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -19,6 +19,7 @@ in { ./helm.nix ./kotlin.nix ./html.nix + ./tera.nix ./haskell.nix ./java.nix ./json.nix diff --git a/modules/plugins/languages/tera.nix b/modules/plugins/languages/tera.nix new file mode 100644 index 00000000..7e1d5573 --- /dev/null +++ b/modules/plugins/languages/tera.nix @@ -0,0 +1,28 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.options) mkEnableOption; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.nvim.types) mkGrammarOption; + + cfg = config.vim.languages.tera; +in { + options.vim.languages.tera = { + enable = mkEnableOption "Tera templating language support"; + + treesitter = { + enable = mkEnableOption "Tera treesitter" // {default = config.vim.languages.enableTreesitter;}; + package = mkGrammarOption pkgs "tera"; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + (mkIf cfg.treesitter.enable { + vim.treesitter.enable = true; + vim.treesitter.grammars = [cfg.treesitter.package]; + }) + ]); +} diff --git a/modules/plugins/theme/supported-themes.nix b/modules/plugins/theme/supported-themes.nix index c2a5e1ca..ca51a5ce 100644 --- a/modules/plugins/theme/supported-themes.nix +++ b/modules/plugins/theme/supported-themes.nix @@ -8,6 +8,14 @@ inherit (lib.trivial) boolToString warnIf; inherit (lib.nvim.lua) toLuaObject; in { + habamax = { + builtin = true; + setup = _: + /* + lua + */ + "vim.cmd('colorscheme habamax')"; + }; base16 = { setup = {base16-colors, ...}: '' -- Base16 theme @@ -37,6 +45,33 @@ in { ''; styles = ["dark" "darker" "cool" "deep" "warm" "warmer"]; }; + gruber-darker = { + setup = _: + /* + lua + */ + '' + require('gruber-darker').setup({ + -- defaults + bold = true, + invert = { + signs = false, + tabline = false, + visual = false, + }, + italic = { + strings = true, + comments = true, + operators = false, + folds = true, + }, + undercurl = true, + underline = true, + }) + vim.cmd('colorscheme gruber-darker') + ''; + styles = ["dark"]; + }; tokyonight = { setup = { diff --git a/modules/plugins/theme/theme.nix b/modules/plugins/theme/theme.nix index b3147c00..44a243f1 100644 --- a/modules/plugins/theme/theme.nix +++ b/modules/plugins/theme/theme.nix @@ -65,7 +65,10 @@ in { config = mkIf cfg.enable { vim = { - startPlugins = [cfg.name]; + startPlugins = + if (supportedThemes.${cfg.name} ? builtin) && supportedThemes.${cfg.name}.builtin + then [] + else [cfg.name]; luaConfigRC.theme = entryBefore ["pluginConfigs" "lazyConfigs"] '' ${cfg.extraConfig} ${supportedThemes.${cfg.name}.setup {inherit (cfg) style transparent base16-colors;}} diff --git a/npins/sources.json b/npins/sources.json index a9df47b7..e9257bc5 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -643,6 +643,19 @@ "url": "https://github.com/ellisonleao/glow.nvim/archive/5d5954b2f22e109d4a6eba8b2618c5b96e4ee7a2.tar.gz", "hash": "11rlis4riy1w4clnkiza8x6fs8xjwsrsgfzlz2k8z041ancmrw0a" }, + "gruber-darker": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "blazkowolf", + "repo": "gruber-darker.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "98a2e141981cbd5a194a97eae024bf55af854579", + "url": "https://github.com/blazkowolf/gruber-darker.nvim/archive/98a2e141981cbd5a194a97eae024bf55af854579.tar.gz", + "hash": "0bxv33isymnbdzf71w79pfxkwi8ylhjiq3ir9ws2as1d73nnl6lv" + }, "gruvbox": { "type": "Git", "repository": {