nixos-configs/common/home/neovim/langs/web.nix
matt1432 8deffb3adb
All checks were successful
Discord / discord commits (push) Has been skipped
feat(nvim): coc -> lspconfig
2024-05-08 23:04:16 -04:00

46 lines
969 B
Nix

{
config,
pkgs,
lib,
...
}: let
inherit (config.vars) neovimIde;
inherit (pkgs) vimPlugins;
in
lib.mkIf neovimIde {
programs = {
neovim = {
withNodeJs = true;
extraPackages = with pkgs; [
nodejs_latest
nodePackages.npm
nodePackages.neovim
];
extraLuaConfig =
/*
lua
*/
''
vim.api.nvim_create_autocmd("FileType", {
pattern = { 'javascript' , 'typescript'},
command = 'setlocal ts=4 sw=4 sts=0 expandtab',
});
vim.api.nvim_create_autocmd("FileType", {
pattern = 'html',
command = 'setlocal ts=2 sw=2 expandtab',
});
vim.api.nvim_create_autocmd("FileType", {
pattern = 'scss',
command = 'setl iskeyword+=@-@',
});
'';
plugins = [
];
};
};
}