Skip to content
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

NeoVim: remark_ls not picking up requireConfig setting #15

Closed
4 tasks done
kplattret opened this issue Jul 27, 2024 · 5 comments
Closed
4 tasks done

NeoVim: remark_ls not picking up requireConfig setting #15

kplattret opened this issue Jul 27, 2024 · 5 comments
Labels
📚 area/docs This affects documentation 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🦋 type/enhancement This is great to have

Comments

@kplattret
Copy link

kplattret commented Jul 27, 2024

Initial checklist

Affected packages and versions

[email protected]

Link to runnable example

No response

Steps to reproduce

  • remark-language-server 3.0.0
  • nodejs 18.20.2
  • npm 10.5.0

Add remark_ls to NeoVim using steps from the README.md (using nvim-lspconfig).

Expected behavior

It should work out of the box and I should be able to set requireConfig = true without any issue.

Actual behavior

I get the following error consistently, no matter what I try:

[ERROR][2024-07-27 20:08:20] .../vim/lsp/rpc.lua:770	"rpc"	"/Users/kevin/.local/share/nvim/mason/bin/remark-language-server"	"stderr"	"file:///Users/kevin/.local/share/nvim/mason/packages/remark-language-server/node_modules/remark-language-server/node_modules/unified-language-server/lib/index.js:172\n          (raw) => ({requireConfig: Boolean(raw.requireConfig)})\n                                                ^\n\nTypeError: Cannot read properties of null (reading 'requireConfig')\n    at file:///Users/kevin/.local/share/nvim/mason/packages/remark-language-server/node_modules/remark-language-server/node_modules/unified-language-server/lib/index.js:172:49\n    at async file:///Users/kevin/.local/share/nvim/mason/packages/remark-language-server/node_modules/remark-language-server/node_modules/unified-language-server/lib/index.js:324:31\n    at async Promise.all (index 0)\n    at async processDocuments (file:///Users/kevin/.local/share/nvim/mason/packages/remark-language-server/node_modules/remark-language-server/node_modules/unified-language-server/lib/index.js:287:5)\n    at async checkDocuments (file:///Users/kevin/.local/share/nvim/mason/packages/remark-language-server/node_modules/remark-language-server/node_modules/unified-language-server/lib/index.js:362:19)\n\nNode.js v18.20.2\n"

Runtime

Other (please specify in steps to reproduce)

Package manager

Other (please specify in steps to reproduce)

OS

macOS

Build and bundle tools

Other (please specify in steps to reproduce)

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jul 27, 2024
@remcohaszing
Copy link
Member

The requireConfig option was added after the documentation for several editors. Personally I use Visual Studio code. The updated documentation for other editors could be slightly wrong. It uses the requireConfig setting from the remark section. You probably know what that means in NeoVim better than I do. :)

I’m guessing it should look something like this:

require'lspconfig'.remark_ls.setup {
  settings = {
    remark = {
      requireConfig = true
    }
  }
}

Or this:

require'lspconfig'.remark_ls.setup {
  settings = {
    'remark.requireConfig' = true
  }
}

@kplattret
Copy link
Author

Thanks @remcohaszing, that first suggestion did the trick! 🙇

This comment has been minimized.

@remcohaszing
Copy link
Member

remcohaszing commented Jul 28, 2024

I’m glad it works! But which suggestion worked? (The first, I didn’t read properly.) We need to update our documentation.

@remcohaszing remcohaszing reopened this Jul 28, 2024
@remcohaszing remcohaszing added 📚 area/docs This affects documentation 🦋 type/enhancement This is great to have 👶 semver/patch This is a backwards-compatible fix 👍 phase/yes Post is accepted and can be worked on 🙆 yes/confirmed This is confirmed and ready to be worked on labels Jul 28, 2024
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Jul 28, 2024

This comment has been minimized.

@remcohaszing remcohaszing added the 💪 phase/solved Post is done label Jul 28, 2024
@github-actions github-actions bot removed 👍 phase/yes Post is accepted and can be worked on 🙆 yes/confirmed This is confirmed and ready to be worked on labels Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 area/docs This affects documentation 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🦋 type/enhancement This is great to have
Development

No branches or pull requests

2 participants