-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugins/conform: init + test #667
Conversation
plugins/lsp/conform.nix
Outdated
logLevel = | ||
helpers.defaultNullOpts.mkNullable | ||
types.str | ||
"vim.log.levels.ERROR" | ||
" See :h log_levels "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do the same thing as here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct now:
logLevel =
helpers.ifNonNull' level
(helpers.mkRaw "vim.log.levels.${strings.toUpper level}");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems correct to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems correct to me
@GaetanLepage pointed out on matrix that this isn't how it should be done. This is what they said:
Hmmm
Not really
here is where you declare your option, so no "vim.log.levels." in front
Have I sent you an example ?
I suppose he meant that the options should not be hardcoded like this and it should only describe the datatype.
@evccyr You may now rebase on the |
You include the file as |
I'm just struggling with the logLevel for now. How should I do that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you avoid using types.attrs
and use types.attrsOf types.anything
? Could could look it up online, attrs
are not recursively merged, whereas types.attrsOf
can be.
Co-authored-by: Gaétan Lepage <[email protected]>
Adds support for the conform-nvim plugin.
I could not test this due to conform-nvim not being in nixpkgs-unstable yet.
I'll amend further changes.