-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from tsandrini/updates
feat(nixvim): add otter, spectre, render-markdown
- Loading branch information
Showing
14 changed files
with
327 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
flake-parts/modules/nixvim/plugins/editor/render-markdown.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# --- flake-parts/modules/nixvim/plugins/editor/render-markdown.nix | ||
# | ||
# Author: tsandrini <[email protected]> | ||
# URL: https://github.com/tsandrini/tensorfiles | ||
# License: MIT | ||
# | ||
# 888 .d888 d8b 888 | ||
# 888 d88P" Y8P 888 | ||
# 888 888 888 | ||
# 888888 .d88b. 88888b. .d8888b .d88b. 888d888 888888 888 888 .d88b. .d8888b | ||
# 888 d8P Y8b 888 "88b 88K d88""88b 888P" 888 888 888 d8P Y8b 88K | ||
# 888 88888888 888 888 "Y8888b. 888 888 888 888 888 888 88888888 "Y8888b. | ||
# Y88b. Y8b. 888 888 X88 Y88..88P 888 888 888 888 Y8b. X88 | ||
# "Y888 "Y8888 888 888 88888P' "Y88P" 888 888 888 888 "Y8888 88888P' | ||
{ localFlake }: | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
let | ||
inherit (lib) | ||
mkIf | ||
mkMerge | ||
mkEnableOption | ||
; | ||
# inherit (localFlake.lib.modules) mkOverrideAtNixvimModuleLevel; | ||
|
||
cfg = config.tensorfiles.nixvim.plugins.editor.render-markdown; | ||
# _ = mkOverrideAtNixvimModuleLevel; | ||
|
||
in | ||
{ | ||
options.tensorfiles.nixvim.plugins.editor.render-markdown = { | ||
enable = mkEnableOption '' | ||
TODO | ||
''; | ||
}; | ||
|
||
config = mkIf cfg.enable (mkMerge [ | ||
# |----------------------------------------------------------------------| # | ||
{ | ||
extraPlugins = with pkgs.vimPlugins; [ | ||
render-markdown | ||
]; | ||
|
||
extraConfigLua = '' | ||
require('render-markdown').setup() | ||
''; | ||
} | ||
# |----------------------------------------------------------------------| # | ||
]); | ||
|
||
meta.maintainers = with localFlake.lib.maintainers; [ tsandrini ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# --- flake-parts/modules/nixvim/plugins/editor/spectre.nix | ||
# | ||
# Author: tsandrini <[email protected]> | ||
# URL: https://github.com/tsandrini/tensorfiles | ||
# License: MIT | ||
# | ||
# 888 .d888 d8b 888 | ||
# 888 d88P" Y8P 888 | ||
# 888 888 888 | ||
# 888888 .d88b. 88888b. .d8888b .d88b. 888d888 888888 888 888 .d88b. .d8888b | ||
# 888 d8P Y8b 888 "88b 88K d88""88b 888P" 888 888 888 d8P Y8b 88K | ||
# 888 88888888 888 888 "Y8888b. 888 888 888 888 888 888 88888888 "Y8888b. | ||
# Y88b. Y8b. 888 888 X88 Y88..88P 888 888 888 888 Y8b. X88 | ||
# "Y888 "Y8888 888 888 88888P' "Y88P" 888 888 888 888 "Y8888 88888P' | ||
{ localFlake }: | ||
{ | ||
config, | ||
lib, | ||
... | ||
}: | ||
let | ||
inherit (lib) | ||
mkIf | ||
mkMerge | ||
mkEnableOption | ||
; | ||
inherit (localFlake.lib.modules) mkOverrideAtNixvimModuleLevel; | ||
|
||
cfg = config.tensorfiles.nixvim.plugins.editor.spectre; | ||
_ = mkOverrideAtNixvimModuleLevel; | ||
in | ||
{ | ||
options.tensorfiles.nixvim.plugins.editor.spectre = { | ||
enable = mkEnableOption '' | ||
TODO | ||
''; | ||
|
||
withKeymaps = | ||
mkEnableOption '' | ||
Enable the related included keymaps. | ||
'' | ||
// { | ||
default = true; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable (mkMerge [ | ||
# |----------------------------------------------------------------------| # | ||
{ | ||
plugins.spectre = { | ||
enable = _ true; | ||
}; | ||
} | ||
# |----------------------------------------------------------------------| # | ||
(mkIf cfg.withKeymaps { | ||
keymaps = [ | ||
{ | ||
mode = "n"; | ||
key = "<leader>R"; | ||
action = "<cmd>Spectre<CR>"; | ||
options = { | ||
silent = true; | ||
desc = "Search & Replace"; | ||
}; | ||
} | ||
]; | ||
}) | ||
# |----------------------------------------------------------------------| # | ||
]); | ||
|
||
meta.maintainers = with localFlake.lib.maintainers; [ tsandrini ]; | ||
} |
Oops, something went wrong.