mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
feat: update system
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.languages.c;
|
||||
in
|
||||
{
|
||||
options.presets.languages.c = {
|
||||
enable = lib.mkEnableOption "C/C++";
|
||||
cppcheck = lib.mkEnableOption "cppcheck";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@@ -13,12 +18,28 @@ in
|
||||
c = [ "clang-format" ];
|
||||
cpp = [ "clang-format" ];
|
||||
};
|
||||
lsp.servers.clangd = {
|
||||
none-ls = {
|
||||
enable = true;
|
||||
cmd = [
|
||||
"clangd"
|
||||
"--offset-encoding=utf-16"
|
||||
];
|
||||
sources.diagnostics = {
|
||||
cppcheck = lib.mkIf cfg.cppcheck {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
lsp.servers = {
|
||||
clangd = {
|
||||
enable = true;
|
||||
cmd = [
|
||||
"clangd"
|
||||
"--offset-encoding=utf-16"
|
||||
];
|
||||
settings.InlayHints = {
|
||||
Designators = true;
|
||||
Enabled = true;
|
||||
ParameterNames = true;
|
||||
DeducedTypes = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -42,7 +42,31 @@ in
|
||||
}
|
||||
];
|
||||
lsp.servers = {
|
||||
ts_ls.enable = true;
|
||||
ts_ls = {
|
||||
enable = true;
|
||||
settings = {
|
||||
typescript.inlayHints = {
|
||||
includeInlayParameterNameHints = "all";
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||
includeInlayFunctionParameterTypeHints = true;
|
||||
includeInlayVariableTypeHints = true;
|
||||
includeInlayVariableTypeHintsWhenTypeMatchesName = true;
|
||||
includeInlayPropertyDeclarationTypeHints = true;
|
||||
includeInlayFunctionLikeReturnTypeHints = true;
|
||||
includeInlayEnumMemberValueHints = true;
|
||||
};
|
||||
javascript.inlayHints = {
|
||||
includeInlayParameterNameHints = "all";
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||
includeInlayFunctionParameterTypeHints = true;
|
||||
includeInlayVariableTypeHints = true;
|
||||
includeInlayVariableTypeHintsWhenTypeMatchesName = true;
|
||||
includeInlayPropertyDeclarationTypeHints = true;
|
||||
includeInlayFunctionLikeReturnTypeHints = true;
|
||||
includeInlayEnumMemberValueHints = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
eslint.enable = lib.mkIf cfg.eslint true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -15,6 +15,10 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
conform-nvim.settings.formatters_by_ft.nix = [ "nixfmt" ];
|
||||
none-ls = {
|
||||
enable = true;
|
||||
sources.diagnostics.statix.enable = true;
|
||||
};
|
||||
lsp.servers.nil_ls.enable = true;
|
||||
nix.enable = true;
|
||||
};
|
||||
|
||||
@@ -14,6 +14,28 @@ in
|
||||
enable = true;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
settings.inlayHints = {
|
||||
bindingModeHints.enable = false;
|
||||
chainingHints.enable = true;
|
||||
closingBraceHints = {
|
||||
enable = true;
|
||||
minLines = 25;
|
||||
};
|
||||
closureReturnTypeHints.enable = "never";
|
||||
lifetimeElisionHints = {
|
||||
enable = "never";
|
||||
useParameterNames = false;
|
||||
};
|
||||
maxLength = 25;
|
||||
parameterHints.enable = true;
|
||||
reborrowHints.enable = "never";
|
||||
renderColons = true;
|
||||
typeHints = {
|
||||
enable = true;
|
||||
hideClosureInitialization = false;
|
||||
hideNamedConstructor = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.languages.svelte;
|
||||
in
|
||||
{
|
||||
options.presets.languages.svelte = {
|
||||
enable = lib.mkEnableOption "Svelte";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins.lsp.servers.svelte = {
|
||||
enable = true;
|
||||
settings.typescript.inlayHints = {
|
||||
parameterNames.enabled = "all";
|
||||
parameterTypes.enabled = true;
|
||||
variableTypes.enabled = true;
|
||||
propertyDeclarationTypes.enabled = true;
|
||||
functionLikeReturnTypes.enabled = true;
|
||||
enumMemberValues.enabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user