feat(nvim): add csharp config
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
919c3cbb66
commit
d311d5de3c
3 changed files with 45 additions and 1 deletions
44
common/home/neovim/langs/csharp.nix
Normal file
44
common/home/neovim/langs/csharp.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
inherit (config.vars) neovimIde;
|
||||||
|
in
|
||||||
|
mkIf neovimIde {
|
||||||
|
programs = {
|
||||||
|
neovim = {
|
||||||
|
extraPackages = builtins.attrValues {
|
||||||
|
inherit
|
||||||
|
(pkgs)
|
||||||
|
csharp-ls
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraLuaConfig =
|
||||||
|
# lua
|
||||||
|
''
|
||||||
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
pattern = {'cs'},
|
||||||
|
command = 'setlocal ts=4 sw=4 sts=0 expandtab',
|
||||||
|
});
|
||||||
|
|
||||||
|
local csharpls_extended = require('csharpls_extended');
|
||||||
|
|
||||||
|
require('lspconfig').csharp_ls.setup({
|
||||||
|
capabilities = require('cmp_nvim_lsp').default_capabilities(),
|
||||||
|
handlers = {
|
||||||
|
["textDocument/definition"] = csharpls_extended.handler,
|
||||||
|
["textDocument/typeDefinition"] = csharpls_extended.handler,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
'';
|
||||||
|
|
||||||
|
plugins = builtins.attrValues {
|
||||||
|
inherit (pkgs.vimPlugins) csharpls-extended-lsp-nvim;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -10,6 +10,7 @@ in {
|
||||||
imports = [
|
imports = [
|
||||||
./bash.nix
|
./bash.nix
|
||||||
./clang.nix
|
./clang.nix
|
||||||
|
./csharp.nix
|
||||||
./hyprlang.nix
|
./hyprlang.nix
|
||||||
./java.nix
|
./java.nix
|
||||||
./json.nix
|
./json.nix
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// Common usings for NetDaemon apps
|
// Common usings for NetDaemon apps
|
||||||
global using System;
|
global using System;
|
||||||
global using System.Reactive.Linq;
|
global using System.Reactive.Linq;
|
||||||
global using Microsoft.Extensions.Logging;
|
|
||||||
global using NetDaemon.AppModel;
|
global using NetDaemon.AppModel;
|
||||||
global using NetDaemon.HassModel;
|
global using NetDaemon.HassModel;
|
||||||
global using NetDaemon.HassModel.Integration;
|
global using NetDaemon.HassModel.Integration;
|
||||||
|
|
Loading…
Reference in a new issue