mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
(hopefully) fix #65
This commit is contained in:
parent
03a80e3da1
commit
1a89cd2107
3 changed files with 108 additions and 20 deletions
|
@ -87,19 +87,6 @@ in
|
||||||
|
|
||||||
config =
|
config =
|
||||||
let
|
let
|
||||||
customRC =
|
|
||||||
(optionalString (config.extraConfigLuaPre != "") ''
|
|
||||||
${config.extraConfigLuaPre}
|
|
||||||
'') +
|
|
||||||
(optionalString (config.extraConfigVim != "") ''
|
|
||||||
vim.cmd([[
|
|
||||||
${config.extraConfigVim}
|
|
||||||
]])
|
|
||||||
'') +
|
|
||||||
(optionalString (config.extraConfigLua != "" || config.extraConfigLuaPost != "") ''
|
|
||||||
${config.extraConfigLua}
|
|
||||||
${config.extraConfigLuaPost}
|
|
||||||
'');
|
|
||||||
|
|
||||||
defaultPlugin = {
|
defaultPlugin = {
|
||||||
plugin = null;
|
plugin = null;
|
||||||
|
@ -121,6 +108,25 @@ in
|
||||||
{ nixvim = { start = map (x: x.plugin) normalizedPlugins; opt = [ ]; }; };
|
{ nixvim = { start = map (x: x.plugin) normalizedPlugins; opt = [ ]; }; };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
customRC =
|
||||||
|
''
|
||||||
|
vim.cmd([[
|
||||||
|
${neovimConfig.neovimRcContent}
|
||||||
|
]])
|
||||||
|
'' +
|
||||||
|
(optionalString (config.extraConfigLuaPre != "") ''
|
||||||
|
${config.extraConfigLuaPre}
|
||||||
|
'') +
|
||||||
|
(optionalString (config.extraConfigVim != "") ''
|
||||||
|
vim.cmd([[
|
||||||
|
${config.extraConfigVim}
|
||||||
|
]])
|
||||||
|
'') +
|
||||||
|
(optionalString (config.extraConfigLua != "" || config.extraConfigLuaPost != "") ''
|
||||||
|
${config.extraConfigLua}
|
||||||
|
${config.extraConfigLuaPost}
|
||||||
|
'');
|
||||||
|
|
||||||
extraWrapperArgs = builtins.concatStringsSep " " (
|
extraWrapperArgs = builtins.concatStringsSep " " (
|
||||||
(optional (config.extraPackages != [ ])
|
(optional (config.extraPackages != [ ])
|
||||||
''--prefix PATH : "${makeBinPath config.extraPackages}"'')
|
''--prefix PATH : "${makeBinPath config.extraPackages}"'')
|
||||||
|
@ -136,6 +142,6 @@ in
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
finalPackage = wrappedNeovim;
|
finalPackage = wrappedNeovim;
|
||||||
initContent = neovimConfig.neovimRcContent;
|
initContent = customRC;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
12
tests/flake.lock
generated
12
tests/flake.lock
generated
|
@ -97,12 +97,12 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 0,
|
"lastModified": 0,
|
||||||
"narHash": "sha256-p/xU46Ew3l56jrG0A+yeRLrOCxRMfAu3JBVvMP0bFUQ=",
|
"narHash": "sha256-7vhOkX4qovJR5Vm44lk6c81w3DkuGcQTRxGEnRJI8ro=",
|
||||||
"path": "/nix/store/h0ngn8s4pvbwifcc7b0waxmhrgkf5d62-source",
|
"path": "/nix/store/iz74dsm3s96n1f07w6blgw4bf9n2rl5c-source",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/h0ngn8s4pvbwifcc7b0waxmhrgkf5d62-source",
|
"path": "/nix/store/iz74dsm3s96n1f07w6blgw4bf9n2rl5c-source",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -116,12 +116,12 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 0,
|
"lastModified": 0,
|
||||||
"narHash": "sha256-p/xU46Ew3l56jrG0A+yeRLrOCxRMfAu3JBVvMP0bFUQ=",
|
"narHash": "sha256-7vhOkX4qovJR5Vm44lk6c81w3DkuGcQTRxGEnRJI8ro=",
|
||||||
"path": "/nix/store/h0ngn8s4pvbwifcc7b0waxmhrgkf5d62-source",
|
"path": "/nix/store/iz74dsm3s96n1f07w6blgw4bf9n2rl5c-source",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/h0ngn8s4pvbwifcc7b0waxmhrgkf5d62-source",
|
"path": "/nix/store/iz74dsm3s96n1f07w6blgw4bf9n2rl5c-source",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -118,6 +118,88 @@
|
||||||
termguicolors = true;
|
termguicolors = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
issue-65 = build {
|
||||||
|
colorschemes.gruvbox = {
|
||||||
|
enable = true;
|
||||||
|
contrastLight = "hard";
|
||||||
|
contrastDark = "hard";
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
number = true;
|
||||||
|
shiftwidth = 2;
|
||||||
|
tabstop = 2;
|
||||||
|
guifont = "FiraCode\ Nerd\ Font\ Mono:h14";
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
servers.rnix-lsp.enable = true;
|
||||||
|
servers.rust-analyzer.enable = true;
|
||||||
|
servers.jsonls.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nvim-tree = {
|
||||||
|
enable = true;
|
||||||
|
openOnSetup = true;
|
||||||
|
openOnTab = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
telescope = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nvim-cmp = {
|
||||||
|
formatting = {
|
||||||
|
format = ''
|
||||||
|
require("lspkind").cmp_format({
|
||||||
|
mode="symbol",
|
||||||
|
maxwidth = 50,
|
||||||
|
ellipsis_char = "..."
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
auto_enable_sources = true;
|
||||||
|
snippet = {
|
||||||
|
expand = ''
|
||||||
|
function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
enable = true;
|
||||||
|
sources = [
|
||||||
|
{ name = "nvim_lsp"; }
|
||||||
|
{
|
||||||
|
name = "luasnip";
|
||||||
|
option = {
|
||||||
|
show_autosnippets = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{ name = "path"; }
|
||||||
|
{ name = "buffer"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
barbar.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
globals.mapleader = " ";
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
which-key-nvim
|
||||||
|
# leap-nvim
|
||||||
|
vim-flutter
|
||||||
|
plenary-nvim
|
||||||
|
fidget-nvim
|
||||||
|
luasnip
|
||||||
|
lspkind-nvim
|
||||||
|
];
|
||||||
|
|
||||||
|
# extraConfigLua = (builtins.readFile ./nvim-extra-lua.lua);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
})) // {
|
})) // {
|
||||||
nixosConfigurations.nixvim-machine = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.nixvim-machine = nixpkgs.lib.nixosSystem {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue