mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 23:00:39 +02:00
feat(neovim): abstract custom config boilerplate away
This commit is contained in:
parent
7b7458ccd5
commit
603b59cbe9
3 changed files with 89 additions and 24 deletions
|
@ -33,7 +33,12 @@ opt.title = false -- Sets the window title
|
|||
--opt.titlestring = "%t%( %M%)%( (%{expand(\"%:~:.:h\")})%) - nvim" -- The format for the window title
|
||||
|
||||
-- Hide line numbers in terminal windows
|
||||
vim.api.nvim_exec([[au BufEnter term://* setlocal nonumber]], false)
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
pattern = "term://*",
|
||||
callback = function()
|
||||
vim.bo.number = false
|
||||
end,
|
||||
})
|
||||
|
||||
----------------------------------------------------------------------------------------------------
|
||||
-- Editing behavior
|
||||
|
|
|
@ -3,23 +3,27 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.neovim-custom.package = let
|
||||
nvimConfig =
|
||||
pkgs.neovimUtils.makeNeovimConfig {
|
||||
wrapRc = false;
|
||||
withPython3 = true;
|
||||
withRuby = true;
|
||||
withNodeJs = true;
|
||||
#extraPython3Packages = p: [];
|
||||
#plugins = [
|
||||
# { plugin = pkgs.; config = ''''; optional = false; }
|
||||
#];
|
||||
}
|
||||
// {
|
||||
wrapperArgs = ["--add-flags" "--clean -u ${./aaa/init.lua}"];
|
||||
};
|
||||
in
|
||||
pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped nvimConfig;
|
||||
programs.neovim-custom = {
|
||||
config = {
|
||||
withPython3 = false;
|
||||
withRuby = false;
|
||||
withNodeJs = false;
|
||||
#extraPython3Packages = p: [];
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = neo-tree-nvim;
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
''
|
||||
require("neo-tree").setup {}
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
init = builtins.readFile ./aaa/init.lua;
|
||||
};
|
||||
|
||||
home.packages = let
|
||||
nvimConfig = pkgs.neovimUtils.makeNeovimConfig {
|
||||
|
@ -36,5 +40,4 @@
|
|||
"nvim/init.lua".source = ./init.lua;
|
||||
"nvim/lua".source = ./lua;
|
||||
};
|
||||
home.sessionVariables.E = "${config.programs.neovim-custom.package}/bin/nvim";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue