Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion modules/home/neovim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
defaultEditor = true;
viAlias = true;
vimAlias = true;
performance.byteCompileLua.enable = true;
performance = {
byteCompileLua.enable = true;
combinePlugins.enable = true;
};

colorschemes.everforest = {
enable = true;
Expand Down
41 changes: 28 additions & 13 deletions modules/home/neovim/plugins/completion.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
{ pkgs, lib, ... }:
let
nodeBin = "${pkgs.nodejs}/bin/node";
in
{
programs.nixvim.plugins = {
lazydev.enable = true;
lspkind.enable = true;
programs.nixvim = {
extraPlugins = [
pkgs.vimPlugins.copilot-lua
pkgs.vimPlugins.copilot-cmp
pkgs.vimPlugins.copilot-lsp
];

copilot-lua = {
enable = true;
settings = {
suggestion.enabled = false;
panel.enabled = false;
copilot_node_command = "${pkgs.nodejs}/bin/node";
};
};
# copilot は node プロセスを起動するため、InsertEnter まで defer して起動時間を削減
extraConfigLua = ''
vim.api.nvim_create_autocmd("InsertEnter", {
once = true,
callback = function()
require("copilot").setup({
suggestion = { enabled = false },
panel = { enabled = false },
copilot_node_command = "${nodeBin}",
})
require("copilot_cmp").setup()
end,
})
'';

copilot-cmp.enable = true;
plugins = {
lazydev.enable = true;
lspkind.enable = true;

cmp = {
cmp = {
enable = true;
autoEnableSources = true;
settings = {
Expand Down Expand Up @@ -84,5 +98,6 @@
};
};
};
};
};
}
1 change: 0 additions & 1 deletion modules/home/neovim/plugins/editing.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ in
plugins = {
treesitter = {
enable = true;
folding.enable = true;
settings = {
auto_install = true;
sync_install = false;
Expand Down
Loading