1
0
Fork 0
forked from foxora/nix

added comment.nvim but need to fix visual mode

This commit is contained in:
foxora 2026-02-22 00:01:08 +00:00
parent bf1706b0fa
commit 2c76f1f6ef
3 changed files with 246 additions and 205 deletions

View file

@ -0,0 +1,23 @@
return {
{
"comment.nvim",
event = { "BufReadPost", "BufNewFile" },
after = function(plugin)
require("Comment").setup({
toggler = {
line = "<leader>cc",
block = "<leader>bc",
},
opLeader = {
line = "<leader>c",
block = "<leader>b",
},
extra = {
above = "<leader>c0",
below = "<leader>bo",
eol = "<leader>cA",
},
})
end,
},
}

View file

@ -5,4 +5,5 @@ require("lze").load({
{ import = "plugins.fyler" }, { import = "plugins.fyler" },
{ import = "plugins.mini-hipatterns" }, { import = "plugins.mini-hipatterns" },
{ import = "plugins.format" }, { import = "plugins.format" },
{ import = "plugins.comment" },
}) })

View file

@ -5,12 +5,13 @@
spkgs, spkgs,
mpkgs, mpkgs,
... ...
}: let }:
inherit let
(inputs.nixcats) inherit (inputs.nixcats)
utils utils
; ;
in { in
{
imports = [ imports = [
inputs.nixcats.homeModule inputs.nixcats.homeModule
]; ];
@ -25,9 +26,7 @@ in {
# add any plugins in inputs named "plugins-pluginName" to pkgs.neovimPlugins # add any plugins in inputs named "plugins-pluginName" to pkgs.neovimPlugins
# It will not apply to overall system, just nixCats. # It will not apply to overall system, just nixCats.
addOverlays = addOverlays =
/* # (import ./overlays inputs) ++
(import ./overlays inputs) ++
*/
[ [
(utils.standardPluginOverlay inputs) (utils.standardPluginOverlay inputs)
]; ];
@ -40,7 +39,8 @@ in {
# the .replace vs .merge options are for modules based on existing configurations, # the .replace vs .merge options are for modules based on existing configurations,
# they refer to how multiple categoryDefinitions get merged together by the module. # they refer to how multiple categoryDefinitions get merged together by the module.
# for useage of this section, refer to :h nixCats.flake.outputs.categories # for useage of this section, refer to :h nixCats.flake.outputs.categories
categoryDefinitions.replace = { categoryDefinitions.replace =
{
pkgs, pkgs,
settings, settings,
categories, categories,
@ -48,16 +48,17 @@ in {
name, name,
mkNvimPlugin, mkNvimPlugin,
... ...
} @ packageDef: { }@packageDef:
lspsAndRuntimeDeps = { {
general = with pkgs; [ lspsAndRuntimeDeps = with pkgs; {
general = [
ripgrep ripgrep
fd fd
]; ];
treesitter = with pkgs; [ treesitter = [
tree-sitter tree-sitter
]; ];
lang = with pkgs; { lang = {
lua = { lua = {
lsp = [ lua-language-server ]; lsp = [ lua-language-server ];
format = [ stylua ]; format = [ stylua ];
@ -97,8 +98,8 @@ in {
}; };
}; };
startupPlugins = { startupPlugins = with pkgs.vimPlugins; {
general = with pkgs.vimPlugins; [ general = [
lze lze
plenary-nvim plenary-nvim
nvim-notify nvim-notify
@ -106,33 +107,34 @@ in {
base16-nvim base16-nvim
mini-nvim mini-nvim
]; ];
treesitter = with pkgs.vimPlugins; [ treesitter = [
nvim-treesitter-textobjects nvim-treesitter-textobjects
nvim-treesitter.withAllGrammars nvim-treesitter.withAllGrammars
]; ];
}; };
optionalPlugins = {
general = with pkgs.vimPlugins; [ optionalPlugins = with pkgs.vimPlugins; {
general = [
]; ];
ui = with pkgs.vimPlugins; [ ui = [
dressing-nvim dressing-nvim
]; ];
qol = with pkgs.vimPlugins; [ qol = [
undotree undotree
mini-hipatterns mini-hipatterns
]; ];
telescope = with pkgs.vimPlugins; [ telescope = [
telescope-nvim telescope-nvim
telescope-fzf-native-nvim telescope-fzf-native-nvim
telescope-ui-select-nvim telescope-ui-select-nvim
]; ];
fyler = with pkgs.vimPlugins; [ fyler = [
fyler-nvim fyler-nvim
]; ];
lsp = with pkgs.vimPlugins; [ lsp = [
nvim-lspconfig nvim-lspconfig
]; ];
completion = with pkgs.vimPlugins; [ completion = [
blink-cmp blink-cmp
nvim-cmp nvim-cmp
luasnip luasnip
@ -147,10 +149,13 @@ in {
cmp-cmdline-history cmp-cmdline-history
lspkind-nvim lspkind-nvim
]; ];
format = with pkgs.vimPlugins; [ format = [
conform-nvim conform-nvim
]; ];
lang = with pkgs.vimPlugins; { comment = [
comment-nvim
];
lang = {
java = [ java = [
nvim-jdtls nvim-jdtls
]; ];
@ -164,6 +169,7 @@ in {
# libgit2 # libgit2
]; ];
}; };
environmentVariables = { environmentVariables = {
lang = { lang = {
rust.lsp = { rust.lsp = {
@ -181,6 +187,7 @@ in {
}; };
}; };
}; };
extraWrapperArgs = { extraWrapperArgs = {
test = [ test = [
''--set CATTESTVAR2 "It worked again!"'' ''--set CATTESTVAR2 "It worked again!"''
@ -206,14 +213,23 @@ in {
packageDefinitions.replace = { packageDefinitions.replace = {
# these are the names of your packages # these are the names of your packages
# you can include as many as you wish. # you can include as many as you wish.
auroranvim = {pkgs, ...}: { auroranvim =
{ pkgs, ... }:
{
# they contain a settings set defined above # they contain a settings set defined above
# see :help nixCats.flake.outputs.settings # see :help nixCats.flake.outputs.settings
settings = { settings = {
wrapRc = true; wrapRc = true;
# IMPORTANT: # IMPORTANT:
# your alias may not conflict with your other packages. # your alias may not conflict with your other packages.
aliases = ["auroravim" "auravim" "foxyvim" "avix" "fvix" "auim"]; aliases = [
"auroravim"
"auravim"
"foxyvim"
"avix"
"fvix"
"auim"
];
}; };
# and a set of categories that you want # and a set of categories that you want
# (and other information to pass to lua) # (and other information to pass to lua)
@ -226,8 +242,9 @@ in {
fyler = true; fyler = true;
lsp = true; lsp = true;
completion = true; completion = true;
format = true;
treesitter = true; treesitter = true;
format = true;
comment = true;
lang = { lang = {
lua = { lua = {