nixos-configs/homeManagerModules/neovim/langs/hyprlang/default.nix

32 lines
586 B
Nix
Raw Permalink Normal View History

{
config,
lib,
...
}: let
inherit (lib) mkIf;
cfg = config.programs.neovim;
in {
config = mkIf cfg.enable {
programs = {
neovim = {
extraLuaConfig =
2024-06-09 22:49:30 -04:00
# lua
''
vim.filetype.add({
2024-12-16 17:44:17 -05:00
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;
}