Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

plugins/nvim-highlight-colors: init#2105

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Tom-Hubrecht wants to merge2 commits intonix-community:main
base:main
Choose a base branch
Loading
fromTom-Hubrecht:nvim-highlight-colors

Conversation

@Tom-Hubrecht
Copy link

No description provided.

@Tom-Hubrecht
Copy link
Author

This adds a plugin for nvim-highlight-colors, it is a draft as the corresponding vimPlugin does not exist in nixpkgs and I do not intend to contribute it upstream.

@refaelsh
Copy link
Contributor

the corresponding vimPlugin does not exist in nixpkgs

In that case, is that even possible to add such a plugin tonixvim?

@refaelsh
Copy link
Contributor

Copy link
Member

@MattSturgeonMattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The CI failure seems to just be a typo. Otherwise this is more or less there, suggestions below are fairly minor. 😁

@@ -0,0 +1,96 @@
{
lib,
helpers,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

helpers is deprecated, you can uselib.nixvim instead:

Suggested change
helpers,

Comment on lines +10 to +16
inherit (helpers.defaultNullOpts)
mkBool
mkEnum
mkListOf
mkStr
mkStr'
;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

To match the style used elsewhere in nixvim:

Suggested change
inherit(helpers.defaultNullOpts)
mkBool
mkEnum
mkListOf
mkStr
mkStr'
;
inherit(lib.nixvim)defaultNullOpts;

mkStr'
;
in
helpers.neovim-plugin.mkNeovimPlugin config {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We (very) recently dropped theconfig arg:

Suggested change
helpers.neovim-plugin.mkNeovimPluginconfig{
lib.nixvim.neovim-plugin.mkNeovimPlugin{

in
helpers.neovim-plugin.mkNeovimPlugin config {
name = "nvim-highlight-colors";
defaultPackage = pkgs.vimPlugins.nvim-highlight-colors;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Watch out for#2139, if it is merged first you'll have to do:

Suggested change
defaultPackage=pkgs.vimPlugins.nvim-highlight-colors;
package="nvim-highlight-colors";

name = "nvim-highlight-colors";
defaultPackage = pkgs.vimPlugins.nvim-highlight-colors;

maintainers = [ helpers.maintainers.thubrecht ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
maintainers=[helpers.maintainers.thubrecht];
maintainers=[lib.maintainers.thubrecht];

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Could you introduce a test file please, you can reference other tests intests/test-sources/plugins and/or recently merged PRs.

Generally, we like to have anempty test case, adefaults test case and (ideally) anexample test case.


maintainers = [ helpers.maintainers.thubrecht ];

settingsOptions = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Note: becausesettings is a freeform option, there is no need to declare sub-options forevery upstream plugin option. Users can define any config they like, so having too many options can just end up being a maintenance burden.

The judgement call is yours to make though, I won't block a PR for having "too many" settings options 😁

Comment on lines +25 to +29
render = mkEnum [
"background"
"foreground"
"virtual"
] "background" "The render style used.";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
render=mkEnum[
"background"
"foreground"
"virtual"
]"background""The render style used.";
render=defaultNullOpts.mkEnumFirstDefault[
"background"
"foreground"
"virtual"
]"The render style used.";

Comment on lines +79 to +80
exclude_filetypes = mkListOf lib.stypes.str [ ] "A list of filetypes to exclude from highlighting.";
exclude_buftypes = mkListOf lib.stypes.str [ ] "A list of buftypes to exclude from highlighting.";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Typo:

Suggested change
exclude_filetypes=mkListOflib.stypes.str[]"A list of filetypes to exclude from highlighting.";
exclude_buftypes=mkListOflib.stypes.str[]"A list of buftypes to exclude from highlighting.";
exclude_filetypes=mkListOflib.types.str[]"A list of filetypes to exclude from highlighting.";
exclude_buftypes=mkListOflib.types.str[]"A list of buftypes to exclude from highlighting.";

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@MattSturgeonMattSturgeonMattSturgeon left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@Tom-Hubrecht@refaelsh@MattSturgeon

[8]ページ先頭

©2009-2025 Movatter.jp