nixos-configs/homeManagerModules/neovim/langs/hyprlang/default.nix
matt1432 0f627107ce
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(nvim): add _file and config attrs to all submodules
2024-12-21 23:34:10 -05:00

31 lines
586 B
Nix

{
config,
lib,
...
}: let
inherit (lib) mkIf;
cfg = config.programs.neovim;
in {
config = mkIf cfg.enable {
programs = {
neovim = {
extraLuaConfig =
# lua
''
vim.filetype.add({
pattern = { [ '.*/hypr/.*%.conf' ] = 'hyprlang' },
});
vim.api.nvim_create_autocmd('FileType', {
pattern = 'hyprlang',
command = 'setlocal ts=4 sw=4 sts=0 expandtab',
});
'';
};
};
};
# For accurate stack trace
_file = ./default.nix;
}