Skip to content

neovim/coc: fix withNodeJs value when enabling coc#3048

Merged
sumnerevans merged 1 commit intonix-community:masterfrom
addict3d:fix-neovim-coc-nodejs
Jun 22, 2022
Merged

neovim/coc: fix withNodeJs value when enabling coc#3048
sumnerevans merged 1 commit intonix-community:masterfrom
addict3d:fix-neovim-coc-nodejs

Conversation

@addict3d
Copy link
Copy Markdown
Contributor

Description

Coc needs nodejs. This changes the enabling logic to use 'boolean or' instead of an 'attr or default' expression.

Currently, nodejs is enabled by a 'select attrpath or default' expression:

withNodeJs = cfg.withNodeJs or cfg.coc.enable;

However, the option neovim.withNodeJs defaults to false and will exist, which means if you only set neovim.coc.enable = true; then node will be missing.

I don't know how to test for this from the test suite, but am willing to try if someone can suggest how to proceed.

CC @sumnerevans Looks like a very minor oversight from #2801

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

Copy link
Copy Markdown
Contributor

@sumnerevans sumnerevans left a comment

Choose a reason for hiding this comment

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

Ack, I write too much Python haha. Good catch.

@sumnerevans sumnerevans merged commit e622bad into nix-community:master Jun 22, 2022
jevy pushed a commit to jevy/home-manager that referenced this pull request Jul 1, 2022
spacekookie pushed a commit to spacekookie/home-manager that referenced this pull request Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants