nixos-configs/homeManagerModules/neovim/langs/csharp.nix
matt1432 caaaba4381
All checks were successful
Discord / discord commits (push) Has been skipped
feat(nvim): omnisharp -> roslyn-ls
2024-12-11 14:00:13 -05:00

50 lines
1.1 KiB
Nix

self: {
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (self.inputs) vimplugin-roslyn-nvim-src;
cfg = config.programs.neovim;
in {
config = mkIf cfg.enableIde {
programs = {
neovim = {
extraPackages = builtins.attrValues {
inherit
(pkgs)
roslyn-ls
;
};
extraLuaConfig =
# lua
''
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'cs' },
command = 'setlocal ts=4 sw=4 sts=0 expandtab',
});
require('roslyn').setup({
capabilities = require('cmp_nvim_lsp').default_capabilities(),
exe = 'Microsoft.CodeAnalysis.LanguageServer',
});
'';
plugins = [
(pkgs.vimUtils.buildVimPlugin {
pname = "roslyn-nvim";
version = "0.0.0+${vimplugin-roslyn-nvim-src.shortRev}";
src = vimplugin-roslyn-nvim-src;
})
];
};
};
};
# For accurate stack trace
_file = ./csharp.nix;
}