mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 11:54:11 +09:00
neovim
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.nvim-autopairs.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.blink-cmp = {
|
||||
enable = true;
|
||||
setupLspCapabilities = true;
|
||||
|
||||
settings = {
|
||||
keymap = {
|
||||
preset = "enter";
|
||||
|
||||
"<C-Space>" = [ "show" ];
|
||||
"<C-d>" = [ "scroll_documentation_up" ];
|
||||
"<C-e>" = [ "hide" ];
|
||||
"<C-f>" = [ "scroll_documentation_down" ];
|
||||
|
||||
"<Tab>" = [
|
||||
"accept"
|
||||
{
|
||||
__raw = ''
|
||||
function()
|
||||
local ok, copilot = pcall(require, "copilot.suggestion")
|
||||
if ok and copilot.is_visible() then
|
||||
copilot.accept()
|
||||
return true
|
||||
end
|
||||
end
|
||||
'';
|
||||
}
|
||||
"fallback"
|
||||
];
|
||||
"<S-Tab>" = [
|
||||
"select_prev"
|
||||
"fallback"
|
||||
];
|
||||
"<C-n>" = [
|
||||
"select_next"
|
||||
"fallback"
|
||||
];
|
||||
"<C-p>" = [
|
||||
"select_prev"
|
||||
"fallback"
|
||||
];
|
||||
};
|
||||
|
||||
completion.list.selection = {
|
||||
preselect = true;
|
||||
auto_insert = false;
|
||||
};
|
||||
|
||||
sources.default = [
|
||||
"lsp"
|
||||
"path"
|
||||
"buffer"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.comment.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
_: {
|
||||
programs.nixvim.plugins."conform-nvim" = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatters_by_ft = {
|
||||
javascript.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
|
||||
javascriptreact.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
|
||||
typescript.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
|
||||
typescriptreact.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
|
||||
json.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
|
||||
yaml.__raw = ''{ "prettierd", "prettier", stop_after_first = true }'';
|
||||
markdown.__raw = ''{ "prettierd", "prettier", stop_after_first = true }'';
|
||||
lua = [ "stylua" ];
|
||||
nix.__raw = ''{ "nix_fmt", "alejandra", stop_after_first = true }'';
|
||||
sh = [ "shfmt" ];
|
||||
};
|
||||
formatters.nix_fmt = {
|
||||
command = "nixfmt";
|
||||
};
|
||||
format_on_save.__raw = ''
|
||||
function(_)
|
||||
return { timeout_ms = 1000, lsp_format = "fallback" }
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.copilot-lua = {
|
||||
enable = true;
|
||||
settings = {
|
||||
suggestion = {
|
||||
auto_trigger = true;
|
||||
keymap.enabled = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ lib, ... }@args:
|
||||
lib.mkMerge [
|
||||
(import ./autopairs.nix args)
|
||||
(import ./blink-cmp.nix args)
|
||||
(import ./comment.nix args)
|
||||
(import ./conform.nix args)
|
||||
(import ./copilot.nix args)
|
||||
(import ./flash.nix args)
|
||||
(import ./git-conflict.nix args)
|
||||
(import ./git.nix args)
|
||||
(import ./gitsigns.nix args)
|
||||
(import ./glance.nix args)
|
||||
(import ./lsp-signature.nix args)
|
||||
(import ./snacks.nix args)
|
||||
(import ./spectre.nix args)
|
||||
(import ./surround.nix args)
|
||||
(import ./todo-comments.nix args)
|
||||
(import ./treesitter.nix args)
|
||||
(import ./trouble.nix args)
|
||||
(import ./wakatime.nix args)
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.flash-nvim ];
|
||||
extraConfigLua = ''
|
||||
require("flash").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.git-conflict-nvim ];
|
||||
extraConfigLua = ''
|
||||
require("git-conflict").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPackages = [ pkgs.lazygit ];
|
||||
|
||||
plugins = {
|
||||
lazygit.enable = true;
|
||||
diffview.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
_: {
|
||||
# git change view
|
||||
programs.nixvim.plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings = {
|
||||
signs = {
|
||||
add = {
|
||||
text = "+";
|
||||
};
|
||||
change = {
|
||||
text = "~";
|
||||
};
|
||||
delete = {
|
||||
text = "_";
|
||||
};
|
||||
topdelete = {
|
||||
text = "‾";
|
||||
};
|
||||
changedelete = {
|
||||
text = "~";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.glance-nvim ];
|
||||
extraConfigLua = ''
|
||||
require("glance").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.lsp-signature = {
|
||||
enable = true;
|
||||
settings = {
|
||||
hint_enable = true;
|
||||
hint_prefix = " ";
|
||||
floating_window = true;
|
||||
bind = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.snacks-nvim ];
|
||||
|
||||
extraConfigLua = ''
|
||||
require("snacks").setup({
|
||||
picker = {
|
||||
enabled = true,
|
||||
|
||||
actions = require("trouble.sources.snacks").actions,
|
||||
|
||||
win = {
|
||||
input = {
|
||||
keys = {
|
||||
["<C-t>"] = {
|
||||
"trouble_open",
|
||||
mode = { "n", "i" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
notifier = { enabled = true },
|
||||
words = { enabled = true },
|
||||
scroll = { enabled = true },
|
||||
dim = { enabled = true },
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPackages = [ pkgs.ripgrep ];
|
||||
extraPlugins = [ pkgs.vimPlugins.nvim-spectre ];
|
||||
extraConfigLua = ''
|
||||
require("spectre").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.nvim-surround.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.todo-comments-nvim ];
|
||||
extraConfigLua = ''
|
||||
require("todo-comments").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
extraPlugins = [ pkgs.vimPlugins.nvim-ts-autotag ];
|
||||
extraConfigLua = ''
|
||||
require("nvim-ts-autotag").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.trouble.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim.extraPlugins = [ pkgs.vimPlugins.vim-wakatime ];
|
||||
}
|
||||
Reference in New Issue
Block a user