forked from foxora/nix
added comment.nvim but need to fix visual mode
This commit is contained in:
parent
bf1706b0fa
commit
2c76f1f6ef
3 changed files with 246 additions and 205 deletions
23
homes/modules/programs/neovim/lua/plugins/comment.lua
Normal file
23
homes/modules/programs/neovim/lua/plugins/comment.lua
Normal 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,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -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" },
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -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,234 +26,250 @@ 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)
|
||||||
];
|
];
|
||||||
# see the packageDefinitions below.
|
# see the packageDefinitions below.
|
||||||
# This says which of those to install.
|
# This says which of those to install.
|
||||||
packageNames = ["auroranvim"];
|
packageNames = [ "auroranvim" ];
|
||||||
|
|
||||||
luaPath = "${./.}";
|
luaPath = "${./.}";
|
||||||
|
|
||||||
# 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,
|
{
|
||||||
settings,
|
pkgs,
|
||||||
categories,
|
settings,
|
||||||
extra,
|
categories,
|
||||||
name,
|
extra,
|
||||||
mkNvimPlugin,
|
name,
|
||||||
...
|
mkNvimPlugin,
|
||||||
} @ packageDef: {
|
...
|
||||||
lspsAndRuntimeDeps = {
|
}@packageDef:
|
||||||
general = with pkgs; [
|
{
|
||||||
ripgrep
|
lspsAndRuntimeDeps = with pkgs; {
|
||||||
fd
|
general = [
|
||||||
];
|
ripgrep
|
||||||
treesitter = with pkgs; [
|
fd
|
||||||
tree-sitter
|
];
|
||||||
];
|
treesitter = [
|
||||||
lang = with pkgs; {
|
tree-sitter
|
||||||
lua = {
|
];
|
||||||
lsp = [ lua-language-server ];
|
lang = {
|
||||||
format = [ stylua ];
|
lua = {
|
||||||
};
|
lsp = [ lua-language-server ];
|
||||||
nix = {
|
format = [ stylua ];
|
||||||
lsp = [
|
};
|
||||||
nil
|
nix = {
|
||||||
nix-doc # TODO: i forgot what this is for
|
lsp = [
|
||||||
|
nil
|
||||||
|
nix-doc # TODO: i forgot what this is for
|
||||||
|
];
|
||||||
|
format = [ nixfmt ];
|
||||||
|
};
|
||||||
|
rust = {
|
||||||
|
lsp = [
|
||||||
|
cargo
|
||||||
|
mpkgs.rust-analyzer
|
||||||
|
];
|
||||||
|
format = [ rustfmt ];
|
||||||
|
};
|
||||||
|
zig = [
|
||||||
|
spkgs.zls # FIX: using spkgs version as zls is broken rn ;-;
|
||||||
];
|
];
|
||||||
format = [ nixfmt ];
|
elixir = [
|
||||||
};
|
elixir-ls
|
||||||
rust = {
|
];
|
||||||
lsp = [
|
gleam = [
|
||||||
cargo
|
gleam
|
||||||
mpkgs.rust-analyzer
|
];
|
||||||
|
haskell = {
|
||||||
|
lsp = [ haskell-language-server ];
|
||||||
|
format = [ ormolu ];
|
||||||
|
};
|
||||||
|
java = [
|
||||||
|
jdt-language-server
|
||||||
|
javaPackages.compiler.openjdk17
|
||||||
|
javaPackages.compiler.openjdk21
|
||||||
];
|
];
|
||||||
format = [ rustfmt ];
|
|
||||||
};
|
|
||||||
zig = [
|
|
||||||
spkgs.zls # FIX: using spkgs version as zls is broken rn ;-;
|
|
||||||
];
|
|
||||||
elixir = [
|
|
||||||
elixir-ls
|
|
||||||
];
|
|
||||||
gleam = [
|
|
||||||
gleam
|
|
||||||
];
|
|
||||||
haskell = {
|
|
||||||
lsp = [ haskell-language-server ];
|
|
||||||
format = [ ormolu ];
|
|
||||||
};
|
|
||||||
java = [
|
|
||||||
jdt-language-server
|
|
||||||
javaPackages.compiler.openjdk17
|
|
||||||
javaPackages.compiler.openjdk21
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
startupPlugins = {
|
|
||||||
general = with pkgs.vimPlugins; [
|
|
||||||
lze
|
|
||||||
plenary-nvim
|
|
||||||
nvim-notify
|
|
||||||
nvim-web-devicons
|
|
||||||
base16-nvim
|
|
||||||
mini-nvim
|
|
||||||
];
|
|
||||||
treesitter = with pkgs.vimPlugins; [
|
|
||||||
nvim-treesitter-textobjects
|
|
||||||
nvim-treesitter.withAllGrammars
|
|
||||||
];
|
|
||||||
};
|
|
||||||
optionalPlugins = {
|
|
||||||
general = with pkgs.vimPlugins; [
|
|
||||||
];
|
|
||||||
ui = with pkgs.vimPlugins; [
|
|
||||||
dressing-nvim
|
|
||||||
];
|
|
||||||
qol = with pkgs.vimPlugins; [
|
|
||||||
undotree
|
|
||||||
mini-hipatterns
|
|
||||||
];
|
|
||||||
telescope = with pkgs.vimPlugins; [
|
|
||||||
telescope-nvim
|
|
||||||
telescope-fzf-native-nvim
|
|
||||||
telescope-ui-select-nvim
|
|
||||||
];
|
|
||||||
fyler = with pkgs.vimPlugins; [
|
|
||||||
fyler-nvim
|
|
||||||
];
|
|
||||||
lsp = with pkgs.vimPlugins; [
|
|
||||||
nvim-lspconfig
|
|
||||||
];
|
|
||||||
completion = with pkgs.vimPlugins; [
|
|
||||||
blink-cmp
|
|
||||||
nvim-cmp
|
|
||||||
luasnip
|
|
||||||
friendly-snippets
|
|
||||||
cmp_luasnip
|
|
||||||
cmp-buffer
|
|
||||||
cmp-path
|
|
||||||
cmp-nvim-lua
|
|
||||||
cmp-nvim-lsp
|
|
||||||
cmp-cmdline
|
|
||||||
cmp-nvim-lsp-signature-help
|
|
||||||
cmp-cmdline-history
|
|
||||||
lspkind-nvim
|
|
||||||
];
|
|
||||||
format = with pkgs.vimPlugins; [
|
|
||||||
conform-nvim
|
|
||||||
];
|
|
||||||
lang = with pkgs.vimPlugins; {
|
|
||||||
java = [
|
|
||||||
nvim-jdtls
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# shared libraries to be added to LD_LIBRARY_PATH
|
|
||||||
# variable available to nvim runtime
|
|
||||||
sharedLibraries = {
|
|
||||||
general = with pkgs; [
|
|
||||||
# libgit2
|
|
||||||
];
|
|
||||||
};
|
|
||||||
environmentVariables = {
|
|
||||||
lang = {
|
|
||||||
rust.lsp = {
|
|
||||||
# it literally won't see the rust-analyzer provided to it
|
|
||||||
# if you don't use an envrionment variable to tell it
|
|
||||||
RUST_ANALYZER_CMD = "${mpkgs.rust-analyzer}/bin/rust-analyzer";
|
|
||||||
};
|
|
||||||
elixir.lsp = {
|
|
||||||
ELIXIR_LS_CMD = "${pkgs.elixir-ls}/scripts/language_server.sh";
|
|
||||||
};
|
|
||||||
java.lsp = {
|
|
||||||
JAVA_HOME = "${pkgs.javaPackages.compiler.openjdk17}";
|
|
||||||
OPENJDK_17 = "${pkgs.javaPackages.compiler.openjdk17}";
|
|
||||||
OPENJDK_21 = "${pkgs.javaPackages.compiler.openjdk21}";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
extraWrapperArgs = {
|
|
||||||
test = [
|
|
||||||
''--set CATTESTVAR2 "It worked again!"''
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# lists of the functions you would have passed to
|
|
||||||
# python.withPackages or lua.withPackages
|
|
||||||
|
|
||||||
# get the path to this python environment
|
startupPlugins = with pkgs.vimPlugins; {
|
||||||
# in your lua config via
|
general = [
|
||||||
# vim.g.python3_host_prog
|
lze
|
||||||
# or run from nvim terminal via :!<packagename>-python3
|
plenary-nvim
|
||||||
extraPython3Packages = {
|
nvim-notify
|
||||||
test = _: [];
|
nvim-web-devicons
|
||||||
|
base16-nvim
|
||||||
|
mini-nvim
|
||||||
|
];
|
||||||
|
treesitter = [
|
||||||
|
nvim-treesitter-textobjects
|
||||||
|
nvim-treesitter.withAllGrammars
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
optionalPlugins = with pkgs.vimPlugins; {
|
||||||
|
general = [
|
||||||
|
];
|
||||||
|
ui = [
|
||||||
|
dressing-nvim
|
||||||
|
];
|
||||||
|
qol = [
|
||||||
|
undotree
|
||||||
|
mini-hipatterns
|
||||||
|
];
|
||||||
|
telescope = [
|
||||||
|
telescope-nvim
|
||||||
|
telescope-fzf-native-nvim
|
||||||
|
telescope-ui-select-nvim
|
||||||
|
];
|
||||||
|
fyler = [
|
||||||
|
fyler-nvim
|
||||||
|
];
|
||||||
|
lsp = [
|
||||||
|
nvim-lspconfig
|
||||||
|
];
|
||||||
|
completion = [
|
||||||
|
blink-cmp
|
||||||
|
nvim-cmp
|
||||||
|
luasnip
|
||||||
|
friendly-snippets
|
||||||
|
cmp_luasnip
|
||||||
|
cmp-buffer
|
||||||
|
cmp-path
|
||||||
|
cmp-nvim-lua
|
||||||
|
cmp-nvim-lsp
|
||||||
|
cmp-cmdline
|
||||||
|
cmp-nvim-lsp-signature-help
|
||||||
|
cmp-cmdline-history
|
||||||
|
lspkind-nvim
|
||||||
|
];
|
||||||
|
format = [
|
||||||
|
conform-nvim
|
||||||
|
];
|
||||||
|
comment = [
|
||||||
|
comment-nvim
|
||||||
|
];
|
||||||
|
lang = {
|
||||||
|
java = [
|
||||||
|
nvim-jdtls
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# shared libraries to be added to LD_LIBRARY_PATH
|
||||||
|
# variable available to nvim runtime
|
||||||
|
sharedLibraries = {
|
||||||
|
general = with pkgs; [
|
||||||
|
# libgit2
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
environmentVariables = {
|
||||||
|
lang = {
|
||||||
|
rust.lsp = {
|
||||||
|
# it literally won't see the rust-analyzer provided to it
|
||||||
|
# if you don't use an envrionment variable to tell it
|
||||||
|
RUST_ANALYZER_CMD = "${mpkgs.rust-analyzer}/bin/rust-analyzer";
|
||||||
|
};
|
||||||
|
elixir.lsp = {
|
||||||
|
ELIXIR_LS_CMD = "${pkgs.elixir-ls}/scripts/language_server.sh";
|
||||||
|
};
|
||||||
|
java.lsp = {
|
||||||
|
JAVA_HOME = "${pkgs.javaPackages.compiler.openjdk17}";
|
||||||
|
OPENJDK_17 = "${pkgs.javaPackages.compiler.openjdk17}";
|
||||||
|
OPENJDK_21 = "${pkgs.javaPackages.compiler.openjdk21}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extraWrapperArgs = {
|
||||||
|
test = [
|
||||||
|
''--set CATTESTVAR2 "It worked again!"''
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# lists of the functions you would have passed to
|
||||||
|
# python.withPackages or lua.withPackages
|
||||||
|
|
||||||
|
# get the path to this python environment
|
||||||
|
# in your lua config via
|
||||||
|
# vim.g.python3_host_prog
|
||||||
|
# or run from nvim terminal via :!<packagename>-python3
|
||||||
|
extraPython3Packages = {
|
||||||
|
test = _: [ ];
|
||||||
|
};
|
||||||
|
# populates $LUA_PATH and $LUA_CPATH
|
||||||
|
extraLuaPackages = {
|
||||||
|
test = [ (_: [ ]) ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# populates $LUA_PATH and $LUA_CPATH
|
|
||||||
extraLuaPackages = {
|
|
||||||
test = [(_: [])];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# see :help nixCats.flake.outputs.packageDefinitions
|
# see :help nixCats.flake.outputs.packageDefinitions
|
||||||
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 =
|
||||||
# they contain a settings set defined above
|
{ pkgs, ... }:
|
||||||
# see :help nixCats.flake.outputs.settings
|
{
|
||||||
settings = {
|
# they contain a settings set defined above
|
||||||
wrapRc = true;
|
# see :help nixCats.flake.outputs.settings
|
||||||
# IMPORTANT:
|
settings = {
|
||||||
# your alias may not conflict with your other packages.
|
wrapRc = true;
|
||||||
aliases = ["auroravim" "auravim" "foxyvim" "avix" "fvix" "auim"];
|
# IMPORTANT:
|
||||||
};
|
# your alias may not conflict with your other packages.
|
||||||
# and a set of categories that you want
|
aliases = [
|
||||||
# (and other information to pass to lua)
|
"auroravim"
|
||||||
categories = {
|
"auravim"
|
||||||
general = true;
|
"foxyvim"
|
||||||
|
"avix"
|
||||||
|
"fvix"
|
||||||
|
"auim"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# and a set of categories that you want
|
||||||
|
# (and other information to pass to lua)
|
||||||
|
categories = {
|
||||||
|
general = true;
|
||||||
|
|
||||||
ui = true;
|
ui = true;
|
||||||
qol = true;
|
qol = true;
|
||||||
telescope = true;
|
telescope = true;
|
||||||
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 = {
|
||||||
lsp = true;
|
lsp = true;
|
||||||
format = true;
|
format = true;
|
||||||
|
};
|
||||||
|
nix = {
|
||||||
|
lsp = true;
|
||||||
|
format = true;
|
||||||
|
};
|
||||||
|
rust = {
|
||||||
|
lsp = true;
|
||||||
|
format = true;
|
||||||
|
};
|
||||||
|
zig = true;
|
||||||
|
elixir = true;
|
||||||
|
gleam = true;
|
||||||
|
haskell = {
|
||||||
|
lsp = true;
|
||||||
|
format = true;
|
||||||
|
};
|
||||||
|
java = true;
|
||||||
};
|
};
|
||||||
nix = {
|
|
||||||
lsp = true;
|
|
||||||
format = true;
|
|
||||||
};
|
|
||||||
rust = {
|
|
||||||
lsp = true;
|
|
||||||
format = true;
|
|
||||||
};
|
|
||||||
zig = true;
|
|
||||||
elixir = true;
|
|
||||||
gleam = true;
|
|
||||||
haskell = {
|
|
||||||
lsp = true;
|
|
||||||
format = true;
|
|
||||||
};
|
|
||||||
java = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue