2024-05-18 19:43:43 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
2024-11-22 02:48:41 -05:00
|
|
|
pkgs,
|
2024-05-18 19:43:43 -04:00
|
|
|
...
|
|
|
|
}: let
|
2024-11-22 02:48:41 -05:00
|
|
|
inherit (lib) attrValues mkIf;
|
|
|
|
|
|
|
|
cfg = config.programs.neovim;
|
2024-05-18 19:43:43 -04:00
|
|
|
in
|
2024-11-22 02:48:41 -05:00
|
|
|
mkIf cfg.enableIde {
|
2024-05-18 19:43:43 -04:00
|
|
|
programs = {
|
|
|
|
neovim = {
|
2024-11-22 02:48:41 -05:00
|
|
|
extraPackages = attrValues {
|
2024-08-31 19:16:06 -04:00
|
|
|
inherit
|
|
|
|
(pkgs)
|
|
|
|
cargo
|
|
|
|
rustc
|
|
|
|
rust-analyzer
|
|
|
|
rustfmt
|
|
|
|
;
|
|
|
|
};
|
2024-05-18 19:43:43 -04:00
|
|
|
|
|
|
|
extraLuaConfig =
|
2024-06-09 22:49:30 -04:00
|
|
|
# lua
|
2024-05-18 19:43:43 -04:00
|
|
|
''
|
|
|
|
vim.api.nvim_create_autocmd('FileType', {
|
|
|
|
pattern = { 'rust' },
|
|
|
|
command = 'setlocal ts=4 sw=4 sts=0 expandtab',
|
|
|
|
});
|
|
|
|
|
2024-07-28 02:54:34 -04:00
|
|
|
require('lspconfig').rust_analyzer.setup({
|
|
|
|
capabilities = require('cmp_nvim_lsp').default_capabilities(),
|
|
|
|
});
|
2024-05-18 19:43:43 -04:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|