Fix occassional Neovim loading error

This commit is contained in:
Oliver Davies 2024-12-06 16:06:33 +00:00
parent 930473a896
commit bab5f8f4a8
4 changed files with 7 additions and 20 deletions

View file

@ -41,16 +41,10 @@
}; };
inherit (pkgs) mkShell; inherit (pkgs) mkShell;
inherit (pkgs.vimUtils) buildVimPlugin;
in in
{ {
packages.${system} = { packages.${system} = {
default = mkShell { buildInputs = with pkgs; [ bashInteractive ]; }; default = mkShell { buildInputs = with pkgs; [ bashInteractive ]; };
opdavies-nvim = buildVimPlugin {
name = "opdavies-nvim";
src = ./nvim;
};
}; };
formatter.${system} = pkgs.nixfmt-rfc-style; formatter.${system} = pkgs.nixfmt-rfc-style;

View file

@ -1,8 +1,8 @@
{ {
config, config,
inputs,
lib, lib,
pkgs, pkgs,
self,
... ...
}: }:
@ -141,19 +141,8 @@
# Themes # Themes
catppuccin-nvim catppuccin-nvim
# Configuration.
inputs.self.packages.${pkgs.system}.opdavies-nvim
]; ];
extraLuaConfig = ''
if vim.loader then
vim.loader.enable()
end
require "opdavies"
'';
extraPackages = with pkgs; [ extraPackages = with pkgs; [
# Languages # Languages
nodePackages.typescript nodePackages.typescript
@ -199,6 +188,11 @@
]; ];
}; };
xdg.configFile.nvim = {
source = "${self}/nvim";
recursive = true;
};
home.file.".markdownlint.yaml".text = '' home.file.".markdownlint.yaml".text = ''
default: true default: true

1
nvim/init.lua Normal file
View file

@ -0,0 +1 @@
require "opdavies"

View file

@ -1,5 +1,3 @@
pcall("require", impatient)
require "opdavies.globals" require "opdavies.globals"
require "opdavies.keymaps" require "opdavies.keymaps"
require "opdavies.options" require "opdavies.options"