mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +02:00
perform some statix linting and fixes
This commit is contained in:
parent
eee375e97e
commit
efdcbe225f
57 changed files with 196 additions and 221 deletions
|
@ -117,7 +117,7 @@ in
|
|||
setupOptions = {
|
||||
server = cfg.server.extraOptions;
|
||||
extensions = {
|
||||
autoSetHints = cfg.extensions.autoSetHints;
|
||||
inherit (cfg.extensions) autoSetHints;
|
||||
inlay_hints = {
|
||||
only_current_line = cfg.extensions.inlayHints.onlyCurrentLine;
|
||||
only_current_line_autocmd = cfg.extensions.inlayHints.onlyCurrentLineAutocmd;
|
||||
|
@ -128,16 +128,11 @@ in
|
|||
max_len_align_padding = cfg.extensions.inlayHints.maxLenAlignPadding;
|
||||
right_align = cfg.extensions.inlayHints.rightAlign;
|
||||
right_align_padding = cfg.extensions.inlayHints.rightAlignPadding;
|
||||
highlight = cfg.extensions.inlayHints.highlight;
|
||||
priority = cfg.extensions.inlayHints.priority;
|
||||
inherit (cfg.extensions.inlayHints) highlight priority;
|
||||
};
|
||||
ast = {
|
||||
role_icons = {
|
||||
type = cfg.extensions.ast.roleIcons.type;
|
||||
declaration = cfg.extensions.ast.roleIcons.declaration;
|
||||
expression = cfg.extensions.ast.roleIcons.expression;
|
||||
statement = cfg.extensions.ast.roleIcons.statement;
|
||||
specifier = cfg.extensions.ast.roleIcons.specifier;
|
||||
inherit (cfg.extensions.ast.roleIcons) type declaration expression statement specifier;
|
||||
"template argument" = cfg.extensions.ast.roleIcons.templateArgument;
|
||||
};
|
||||
kind_icons = {
|
||||
|
@ -150,14 +145,14 @@ in
|
|||
TemplateParamObject = cfg.extensions.ast.kindIcons.templateParamObject;
|
||||
};
|
||||
highlights = {
|
||||
detail = cfg.extensions.ast.highlights.detail;
|
||||
inherit (cfg.extensions.ast.highlights) detail;
|
||||
};
|
||||
};
|
||||
memory_usage = {
|
||||
border = cfg.extensions.memoryUsage.border;
|
||||
inherit (cfg.extensions.memoryUsage) border;
|
||||
};
|
||||
symbol_info = {
|
||||
border = cfg.extensions.symbolInfo.border;
|
||||
inherit (cfg.extensions.symbolInfo) border;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -99,22 +99,22 @@ in {
|
|||
extraPlugins = [cfg.package];
|
||||
|
||||
globals = {
|
||||
mkdp_auto_start = mkIf (!isNull cfg.autoStart) cfg.autoStart;
|
||||
mkdp_auto_close = mkIf (!isNull cfg.autoClose) cfg.autoClose;
|
||||
mkdp_refresh_slow = mkIf (!isNull cfg.refreshSlow) cfg.refreshSlow;
|
||||
mkdp_command_for_global = mkIf (!isNull cfg.commandForGlobal) cfg.commandForGlobal;
|
||||
mkdp_open_to_the_world = mkIf (!isNull cfg.openToTheWorld) cfg.openToTheWorld;
|
||||
mkdp_open_ip = mkIf (!isNull cfg.openIp) cfg.openIp;
|
||||
mkdp_browser = mkIf (!isNull cfg.browser) cfg.browser;
|
||||
mkdp_echo_preview_url = mkIf (!isNull cfg.echoPreviewUrl) cfg.echoPreviewUrl;
|
||||
mkdp_browserfunc = mkIf (!isNull cfg.browserFunc) cfg.browserFunc;
|
||||
mkdp_preview_options = mkIf (!isNull cfg.previewOptions) cfg.previewOptions;
|
||||
mkdp_markdown_css = mkIf (!isNull cfg.markdownCss) cfg.markdownCss;
|
||||
mkdp_highlight_css = mkIf (!isNull cfg.highlightCss) cfg.highlightCss;
|
||||
mkdp_port = mkIf (!isNull cfg.port) cfg.port;
|
||||
mkdp_page_title = mkIf (!isNull cfg.pageTitle) cfg.pageTitle;
|
||||
mkdp_filetypes = mkIf (!isNull cfg.fileTypes) cfg.fileTypes;
|
||||
mkdp_theme = mkIf (!isNull cfg.theme) cfg.theme;
|
||||
mkdp_auto_start = mkIf (cfg.autoStart != null) cfg.autoStart;
|
||||
mkdp_auto_close = mkIf (cfg.autoClose != null) cfg.autoClose;
|
||||
mkdp_refresh_slow = mkIf (cfg.refreshSlow != null) cfg.refreshSlow;
|
||||
mkdp_command_for_global = mkIf (cfg.commandForGlobal != null) cfg.commandForGlobal;
|
||||
mkdp_open_to_the_world = mkIf (cfg.openToTheWorld != null) cfg.openToTheWorld;
|
||||
mkdp_open_ip = mkIf (cfg.openIp != null) cfg.openIp;
|
||||
mkdp_browser = mkIf (cfg.browser != null) cfg.browser;
|
||||
mkdp_echo_preview_url = mkIf (cfg.echoPreviewUrl != null) cfg.echoPreviewUrl;
|
||||
mkdp_browserfunc = mkIf (cfg.browserFunc != null) cfg.browserFunc;
|
||||
mkdp_preview_options = mkIf (cfg.previewOptions != null) cfg.previewOptions;
|
||||
mkdp_markdown_css = mkIf (cfg.markdownCss != null) cfg.markdownCss;
|
||||
mkdp_highlight_css = mkIf (cfg.highlightCss != null) cfg.highlightCss;
|
||||
mkdp_port = mkIf (cfg.port != null) cfg.port;
|
||||
mkdp_page_title = mkIf (cfg.pageTitle != null) cfg.pageTitle;
|
||||
mkdp_filetypes = mkIf (cfg.fileTypes != null) cfg.fileTypes;
|
||||
mkdp_theme = mkIf (cfg.theme != null) cfg.theme;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ in {
|
|||
'';
|
||||
|
||||
settings =
|
||||
helpers.mkNullOrOption (types.attrs)
|
||||
helpers.mkNullOrOption types.attrs
|
||||
''
|
||||
Here you can configure eclipse.jdt.ls specific settings
|
||||
See https://github.com/eclipse/eclipse.jdt.ls/wiki/Running-the-JAVA-LS-server-from-the-command-line#initialize-request
|
||||
|
@ -79,7 +79,7 @@ in {
|
|||
'';
|
||||
|
||||
initOptions =
|
||||
helpers.mkNullOrOption (types.attrs)
|
||||
helpers.mkNullOrOption types.attrs
|
||||
''
|
||||
Language server `initializationOptions`
|
||||
You need to extend the `bundles` with paths to jar files if you want to use additional
|
||||
|
@ -93,10 +93,10 @@ in {
|
|||
|
||||
config = let
|
||||
cmd =
|
||||
if isNull cfg.cmd
|
||||
if (cfg.cmd == null)
|
||||
then let
|
||||
data =
|
||||
if isNull cfg.data
|
||||
if (cfg.data == null)
|
||||
then
|
||||
throw ''
|
||||
You have to either set the 'plugins.nvim-jdtls.data' or the 'plugins.nvim-jdtls.cmd'
|
||||
|
@ -109,7 +109,7 @@ in {
|
|||
]
|
||||
++ ["-data" data]
|
||||
++ (
|
||||
optionals (!isNull cfg.configuration)
|
||||
optionals (cfg.configuration != null)
|
||||
["-configuration" cfg.configuration]
|
||||
)
|
||||
else cfg.cmd;
|
||||
|
|
|
@ -45,7 +45,7 @@ in {
|
|||
config = let
|
||||
cfg = config.plugins.openscad;
|
||||
fuzzyFinder =
|
||||
if isNull cfg.fuzzyFinder
|
||||
if (cfg.fuzzyFinder == null)
|
||||
then defaultFuzzyFinder
|
||||
else cfg.fuzzyFinder;
|
||||
in
|
||||
|
|
|
@ -89,7 +89,7 @@ in {
|
|||
"Customize highlight groups (setting this overrides colorscheme)"
|
||||
(
|
||||
mapAttrs
|
||||
(optionName: defaults: colorOption defaults)
|
||||
(optionName: colorOption)
|
||||
{
|
||||
SniprunVirtualTextOk = {
|
||||
bg = "#66eeff";
|
||||
|
@ -131,7 +131,7 @@ in {
|
|||
++ (
|
||||
optional
|
||||
(
|
||||
(!isNull cfg.display)
|
||||
(cfg.display != null)
|
||||
&& (any (hasPrefix "NvimNotify") cfg.display)
|
||||
)
|
||||
nvim-notify
|
||||
|
|
|
@ -27,6 +27,6 @@ in
|
|||
|
||||
extraPackages = [pkgs.ctags];
|
||||
|
||||
globals = mapAttrs' (name: value: nameValuePair ("tagbar_" + name) value) cfg.extraConfig;
|
||||
globals = mapAttrs' (name: nameValuePair ("tagbar_" + name)) cfg.extraConfig;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ in {
|
|||
toggle_language_display = cfg.keybindings.toggleLanguageDisplay;
|
||||
focus_language = cfg.keybindings.focusLanguage;
|
||||
unfocus_language = cfg.keybindings.unfocusLanguage;
|
||||
update = cfg.keybindings.update;
|
||||
inherit (cfg.keybindings) update;
|
||||
goto_node = cfg.keybindings.gotoNode;
|
||||
show_help = cfg.keybindings.showHelp;
|
||||
};
|
||||
|
|
|
@ -102,7 +102,7 @@ in {
|
|||
tsOptions =
|
||||
{
|
||||
highlight = {
|
||||
enable = cfg.enable;
|
||||
inherit (cfg) enable;
|
||||
disable =
|
||||
if (cfg.disabledLanguages != [])
|
||||
then cfg.disabledLanguages
|
||||
|
|
|
@ -40,6 +40,6 @@ in
|
|||
# Usefull for inverse search
|
||||
extraPackages = with pkgs; [pstree xdotool];
|
||||
|
||||
globals = mapAttrs' (name: value: nameValuePair ("vimtex_" + name) value) globals;
|
||||
globals = mapAttrs' (name: nameValuePair ("vimtex_" + name)) globals;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue